cpu usage display conky vs. top

Mateusz Marzantowicz mmarzantowicz at osdf.com.pl
Sun Jul 21 09:02:10 UTC 2013


On 21.07.2013 09:55, lee wrote:
> Mateusz Marzantowicz <mmarzantowicz at osdf.com.pl> writes:
>
>> On 19.07.2013 12:32, lee wrote:
>>> Suvayu Ali <fatkasuvayu+linux at gmail.com> writes:
>>>
>>>> On Thu, Jul 18, 2013 at 05:13:12PM +0200, lee wrote:
>>>>> Hi,
>>>>>
>>>>> does anyone know what conky displays as CPU usage for a process?  The
>>>>> values are different in conky and top, for example, top might show 11.6
>>>>> for a process while conky says 3.01.
>>> BTW, conky also ignores an update interval specified for mail checking.
>>> I specified an hour and it updates every 10 seconds.  Maybe I'll write
>>> my own monitor so I do know what it does, or stay with xosview ...
>>>
>>>
>> Answer for all your questions is in conky's source code. In file
>> src/linux.cc, there is a function called get_cpu_count which grabs data
>> from /proc/stat . After this function you'll find several other
>> functions that open /proc/stat .
> Did you find an explanation for why it displays different numbers than
> top does or why it ignores the update interval for checking mail?  I
> thought it probably uses the same data sources for this information and
> didn't really want to look at the source code.
>
>

I can download source code for top and try to compare it with conky.
This is the olny reliable way to know the difference. I strongly
recommend that you check source code yourself because it's the fastest
method for answering questions not answered in documentation about how
software is designed.



Mateusz Marzantowicz


More information about the users mailing list