Coder Social home page Coder Social logo

xhmikosr / perfmonbar Goto Github PK

View Code? Open in Web Editor NEW
373.0 17.0 44.0 1.2 MB

Displays performance counters on the Windows Taskbar

Home Page: https://xhmikosr.github.io/perfmonbar/

License: GNU General Public License v3.0

Inno Setup 12.57% C++ 66.11% C 0.95% Batchfile 16.28% PowerShell 4.09%
c-plus-plus windows dll monitoring perfmon monitor cpp

perfmonbar's Introduction

Perfmonbar

Build Status Coverity Scan Build Status

Website: https://xhmikosr.github.io/perfmonbar/

Screenshot

Notes

  • You will have to edit the default config.xml to match your system.
  • The default config.xml will not work for non-English systems. You have to adjust the config file, see below.
  • For the known issues see issues.

Configuration

The config.xml file must be adapted in the following cases:

  • You have a non-English Windows system running. The search strings in the config.xml file must be adapted to the language of the operating system, otherwise the corresponding strings will not be found by Perfmonbar and nothing will be displayed in the taskbar.
  • You want to display other information in the taskbar. To do this, you have to find the appropriate and available strings and change them in the config.xml file.
  • You want to change the appearance of the information in the taskbar. To do this, you need to change the corresponding properties in the config.xml file.

Where is the config.xml file?

Usually, the config.xml file can be found under:

C:\Users\{User}\AppData\Roaming\PerfmonBar\config.xml

To quickly get to the directory, you can simply type %APPDATA%\PerfmonBar.

How to find the desired settings?

Open a console and run the command typeperf -q > counters.txt

Then you can search the file counters.txt for the desired performance counters that are available on your computer. The counters are unfortunately called differently in every single language.

perfmonbar's People

Contributors

cmconti avatar dependabot[bot] avatar franky1 avatar jscblack avatar kasper93 avatar radek-bruha avatar volkanite avatar xhmikosr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

perfmonbar's Issues

cpu temp counter

is there a cpu temp counter available??

amd ryzen windows 10 x64

document how to uninstall, and/or provide an uninstall script

Hi, thanks for building and maintaining perfmonbar! It doesn't quite support my needs, so I'd like to uninstall it. I can't find an option how to do so. May I suggest adding something to the README, if it's easy to do as an end-user, or adding an option in the toolbar itself, if not, to help people uninstall? Thank you!

How to handle special character

Hello,

my network card is named : Intel(R) Wi-Fi 6 AX201 160MHz with 2 parenthesis after Intel. (copy/paste from registry.)

when I use the counter : \Network Interface(*)\Bytes Total/sec

and try to relace the * with the network card, This i not working probably do to misunderstanding of parenthesis by the perfmonbar or a tips I do not know.

Thanks for answering and/or help to me;

Problem with deskband size

I have a problem where the deskband in really small, defaults to the size of PerfBar.cpp/line 62/DESKBANDINFO::ptMinSize.x which is 10. I had to change this value to 60 and recompile to get anything useful. Should it not update the size by itself? Can I set the minimum size through config file? I'm on win 7 x64.

Before:
toosmall
After(60 just to test):
after

Not completely visible

The text is not visible completely. I am seeing only first 2 to 3 characters. See screenshot below.
image

I am using Windows 10 Pro 20H2 19042.1110 .

It might be a problem with total width or horizontal offset of the toolbar.
Any ideas how to fix it?

Look into offering User installation too

Inno Setup 6.x has improved in this area so it's possible to install to a folder without requiring Administrator rights.

We need to adapt the core code to work either way, and make sure upgrades are seamless.

PerfmonBar doesn't work on non English systems

@kasper93: if you have some time, I'd really like some help with this. I cannot figure out where it fails. I know for sure it's not Configuration::GetConfigPath() not Configuration::Read().

TIA

EDIT:
Apparently CPerfMon::GetValues() fails.

PDH_STATUS pdhStatus = PdhCollectQueryData(_query);

if (pdhStatus != ERROR_SUCCESS) {
    return stdext::hash_map<std::wstring, double>();
}

EDIT 2:
OK, I think I made some more progress. It must be because PdhAddCounter takes into account the locale.

Support for GPU usage indicator

Hello,
First, thank you very much for the app.

I would like to know if it is possible to monitor the GPU usage. I am trying to do so using the counter: "\GPU Engine(*)\Utilization Percentage" but I am almost always getting 0.0%. When I test the counter in the shell, I see there are multiple values and the first one is almost always 0. So I assume we have to display the sum of all the values:
typeperf "\GPU Engine(*)\Utilization Percentage
image

Is it possible to display the sum of these values?

Thanks again.

Locked taskbar obscures PerfMonBar

This stumped me for a while... Maybe more of a heads up.

After installing and enabling PerfMonBar, all I could see was this:

image

Found I had to unlock the taskbar, drag and resize it, then I could see PerfMonBar and could re-lock the taskbar.

image

Thanks

-- Virus -- on latest version : 1.0.7.185

Hi
I've tried to install this 1.0.7.185 with Avast Antivirus, it's detected a lot of virus during installation and running, I've tried use some exception but it's a lot, it seems no correct !

Support Windows light theme

Hi,
I'm using Auto Dark Mode.
It can automatically switch between the dark and light themes of Windows 10 at scheduled times.
When Windows 10 theme is light, the perfmonbar text color remains white.
image
I want the Perfmonbar text color to change automatically between black and white based Windows 10 theme.

Support for "add" and "subtract" operations

I'm trying to read CPU temp, but the counter comes back in Kelvin - whereas I want Celcius. All I need to to is subtract 273.15 from the counter value. Really you would only need to implement an "add" then I can just put in a negative number.

OffsetX?

it looks out of place, how i can configure for the horizontal alignment?

I have VS2019, and I cannot build both perfmonbar-1.0.4.152.zip and perfmonbar-1.0.5.171.zip

Greetings!

I have VS2019, and I cannot build both perfmonbar-1.0.4.152.zip and perfmonbar-1.0.5.171.zip
Result is:

Severity	Code	Description	Project	File	Line	Suppression State
Error	RC1015	cannot open include file 'Version.h'.	PerfmonBar	C:\PerfMonBar\source\src\PerfmonBar.rc	10	

What am I doing wrong?
By the way, next line #include "winresrc.h" is not realistic too: no such file delivered.

(That's what I am doing because Windows Defender insistently destroys .exe of release, and it cannot be switched off by domain rules)

Thank you!

Increase the refresh rate for the counters -\LogicalDisk(*)\Free Megabytes- and -\LogicalDisk(*)\% Free Space

This PERFMONBAR is a very nice program.
Would it be possible to increase the refresh rate for the counters --"\LogicalDisk()\Free Megabytes"-- and --"\LogicalDisk()% Free Space"-- ?
At the moment they seem to update about ,maybe, every 3 minutes.
There seem to be very few programs that show free disk space as a number on the taskbar/system tray - one I have come across is (the perhaps obscure) -freespacemonitor-
-- https://web.archive.org/web/20181117014923/https://solvalou.com/downloads/freespacemonitor.php -- .
Freespacemonitor updates about ,maybe, every 5 seconds.It shows,in the system tray,in one icon ,the free space as a number in GB and below that the free space as a percentage.Mouseover the systray icon and it shows in a tooltip the free space in MB -this can be done to easily verify that the figures are being regularly updated.
Another program is -traydiskfree- -- https://sourceforge.net/projects/traydiskfree/ -- .I have not tried traydiskfree -it requires old visual basic runtimes and perhaps registering dll files and whatever else.
The obvious problem with showing a number in a single icon is space -the lack of.Therefore,the paucity of programs,no?
There are ,of course, programs that place icons in the systray in the form of bars or pie charts ,and so on, that will show the free disk space as a number when hovered over.
If the counters --"\LogicalDisk()\Free Megabytes"-- and --"\LogicalDisk()% Free Space"-- are chosen, I think it would be a good idea to have PERFMONBAR update them every 5 seconds or so.
However,if this is not possible then ;"no problem", and if it is possible but you don't want to do it ,again ;"no problem".
I have a 256 GB ssd - I like to keep track of free space.
Is PERFMONBAR using a Windows default for polling the aforementioned counters ,while other programs actively poll them ??
Thanks for reading.
Oh , I should mention that in PERFMONBAR I have --"\LogicalDisk()\Free Megabytes"-- showing in GB with 3 decimals and --"\LogicalDisk()% Free Space"-- showing 2 decimals.

Support Windows 11

Anyone got it working on Windows 11 yet? And if not, is there any chance on perfmonbar getting updated to Windows 11?

Not working with Intel Network Interface

My NIC according to Windows 7 is this:
Intel(R) 82566DM-2 Gigabit Network Connection
That is not the ® symbol but two parenthesis around an R. Not sure if the () is causing the issue.

CPU counter shows inaccurate data

Hello sir, Good day.
After using this tool for sometime I found that the CPU data showed by it is different than the one showed in my performance from the Task Manager, see : https://i.imgur.com/OROQ0wz.mp4

Here's my entire config.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- you can reload the configuration file with right click -> Performance Monitor - (Reload Configuration) -->
<perfbar>
    <counters>
        <!-- you can run `typeperf -q>counters.txt` to list all available counters on your system -->
        <counter name="cpu" value="\Processor Information(_Total)\% Processor Time"/>
        <counter name="mem" value="\Memory\Available Bytes"/>
        <!--<counter name="netin" value="\Network Interface(Intel[R] Ethernet Connection [2] I219-V)\Bytes Received/sec"/>-->
        <counter name="netin" value="\Intel[R] Dual Band Wireless-AC 3160\Bytes Received/sec"/>
        <counter name="netout" value="\Intel[R] Dual Band Wireless-AC 3160\Bytes Sent/sec"/>
        <counter name="freediskC" value="\LogicalDisk(C:)\Free Megabytes"/>
        <counter name="processCount" value="\System\Processes"/>
    </counters>
    <pages>
        <!-- use left button click on the performance bar to switch between the pages -->
        <page offsetY="9">
            <lines>
                <line fontFamily="Arimo" fontSize="9" fontItalic="false" fontBold="false" fontColor="FFFFFF">
                    <display prefix="CPU: " suffix="% " counter="cpu"/>
                    <display prefix="· RAM: " suffix=" GB" counter="mem" decimals="2" divide="1073741824"/>
                </line>
            </lines>
        </page>
    </pages>
</perfbar>

Am I doing something wrong?

Is it possible after silent install to auto run perfmonbar

I was able to install and configure perfmonbar bar and configure it for my needs. Next steps is to silently install configure and enable it without user interaction.
here are the steps I foresee:

  1. do install with option /silent
  2. replace config.xml with my config
  3. enable perfmonbar to be visible(if needed reload config also)

1 and 2 are easy. I need some help how to do 3 in automatic way - is this possible?

Value is centered automatically

Is it possible float value to the left or to the right instead of centering it? I tried to play with characters attribute, but it's no help for the case.

Let me show you what I mean. I have CPU and RAM counters and want those to have the same width, so that my other counters go nicely aligned.

Everything is cool if both CPU and RAM have two digits in the value.
image

But it looks bad, when CPU consumption is not that high.
image

Notice how arrows for download and upload speeds change their position. Moreover they jump all the time as values change and it disturbs.

Temporarily fixed by moving counters around, but it's not ideal.
image

Thanks for the app!

Not displaying when HDR is enabled

Nothing displays when windows HDR option enables.
How to configure the line node of the configuration XML, or it's a bug of display rendering.

Continue to update with taskbar hidden?

Currently when the task bar auto hides perfmonbar seems to stop running and display jumbled text, updating only after a short delay after showing the task bar again. Is it possible to change this behavior?

Can perfmonbar take maximum of all column output of type perf

Hi thank for awesome utility program.

I'm trying to get my computer CUDA load/utilization, but the problem is CUDA id is dynamic, as shown below.

It keeps add new PID as new task is added. Is there any method to calculate the maksimum load of these out type perf column output. (the PID can grown from and reduce to 1 according to the work load)

Thanks

'PS C:\Users\andib> typeperf "\GPU Engine(*_Cuda)\Utilization Percentage"

'"(PDH-CSV 4.0)","\ANDINI\GPU Engine(pid_4_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage"
'"05/16/2020 08:41:18.335","0.000000"
'"05/16/2020 08:41:19.336","0.000000"
'"05/16/2020 08:41:20.337","0.000000"

'PS C:\Users\andib> typeperf '\GPU Engine(*_Cuda)\Utilization Percentage'

'"(PDH-CSV 4.0)","\ANDINI\GPU Engine(pid_2616_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_16720_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_3272_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_16660_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_4_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage"
"05/16/2020 08:49:10.558","0.000000","0.000000","0.000000","0.000000","0.000000"
"05/16/2020 08:49:11.559","0.000000","0.000000","0.000000","0.000000","0.000000"
"05/16/2020 08:49:12.562","0.000000","0.000000","0.000000","0.000000","0.000000"
"05/16/2020 08:49:13.566","0.000000","0.000000","0.000000","0.000000","0.000000"
"05/16/2020 08:49:14.568","0.000000","0.000000","0.000000","0.000000","0.000000"

'PS C:\Users\andib> typeperf '\GPU Engine(*_Cuda)\Utilization Percentage'

'"(PDH-CSV 4.0)","\ANDINI\GPU Engine(pid_6752_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_1596_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_11828_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_13568_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_18248_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_2616_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_16720_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_3272_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_16660_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage","\ANDINI\GPU Engine(pid_4_luid_0x00000000_0x000154C7_phys_0_eng_8_engtype_Cuda)\Utilization Percentage"
"05/16/2020 08:49:54.093","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","93.848162","0.000000"
"05/16/2020 08:49:55.169","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","96.760047","0.000000"
"05/16/2020 08:49:56.221","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","95.196571","0.000000"
"05/16/2020 08:49:57.279","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","94.176305","0.000000"
"05/16/2020 08:49:58.367","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","94.657825","0.000000"
"05/16/2020 08:49:59.398","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","0.000000","95.981860","0.000000"

How to get counter name?

I ran this:
typeperf -q > counters.txt

And it doesn't tell me the counter name, which is used by the config....

image

typeperf does not work correctly compared to Get-Counter

I don't find the good library to use correctly (I'm new to development). And I compare with Get-Counter which works well like

PS C:\Users\Nicolas2k> Get-Counter

Timestamp                  CounterSamples
---------                  --------------
12/05/2021 11:17:40        \\interface réseau(realtek usb gbe family controller)\total des octets/s :
                           1667,6025962895

                           \interface réseau(intel[r] wireless-ac 9560 160mhz)\total des octets/s :
                           0

                           \processeur(_total)\% temps processeur :
                           3,82065933233076

                           \mémoire\pourcentage d’octets dédiés utilisés :
                           55,1774257689662

                           \mémoire\défauts de cache/s :
                           2,96024129518845

                           \disque physique(_total)\pourcentage du temps disque :
                           0,368183912546921

                           \disque physique(_total)\taille de file d’attente du disque actuelle :
                           0

So, half counter works under perfmonbar.

Possibility to configure minimum characters length of show value?

Hello,
firstly I want to thank you for this awesome project, because it's finally one that can be completely configurable to my needs.

Still I would like to have one small request: Could you add possibility to configure minimum characters length of show value?

I would appreciate it, because I wanted show multiple values on same line, but as you can see in this screenshot, because my RAM usage is lower than 10 GB, first line is not perfectly aligned with second one.

Screenshot

I would like to have some option which I could tell that minimum RAM value length must be 4 characters (XX(dot)X) and then both lines would be perfectly aligned. Same thing go for other values, because if any of other values became larger than 10, lines are shifted again.

Thank you for considering my request.

Network speed seems wrong

I compared the readings for MB/s against windows Task Manager. They seemed out by 8:
Default in congif.xml: display prefix=" · D: " suffix=" MB/s" counter="netin" decimals="1" divide="1048576"
I had change to this: display prefix=" || U: " suffix=" MB/s" counter="netout" decimals="1" divide="131072"
This is 1024*1024/8.

Now my MB/s matches Task Manager.

Thanks for the program.

Battery status not available

Hi Fellas,
When trying to read battery status(*)remaining capacity perfmonbar has no access to counters as that feature needs to be run as a admin. typeperf is fine when run from cmd as admin, however when run as normal it shows no valid counters.
Oh, admin is added to log performance group but that has no effect.
Is there a way to run perfmonbar with administrator priviliges so battery status can be read?
Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.