CPU counter shows inaccurate data
M7amma opened this issue · comments
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?
Probably not, but the counters are using the Windows API so I'm not sure if there's something that can be done here.
If you want to see the same percentage that is shown in the Windows Task Manager, you need to use this counter:
\Processor Information(_Total)\% Processor Utility
I had the same feeling, dug around a bit and found this article.