monit-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wrong Display of System CPU Usage


From: Martin Pala
Subject: Re: Wrong Display of System CPU Usage
Date: Tue, 06 Feb 2007 17:14:20 +0100
User-agent: Thunderbird 1.5.0.9 (X11/20061222)

Thanks for the patch :)

It was added to cvs ... Matt's and Alex's problem regarding linux cpu usage statistics should be solved.


Martin



Ron Avriel wrote:
Hi,

On one of my Linux systems monit erroneously reports the system CPU usage as “82.6%us, 0.0%sy, 17.3%wa”, while the system is almost completely idle.

I traced down the problem to /proc/stat reporting CPU times larger than LONG_MAX, while the code assumes they’re (signed) long.

In function used_system_cpu_sysdep() in file process/sysdep_LINUX.c in , changing all “long” variables to “unsigned long long” and changing sscanf %ld to %llu fixed the problem.

BTW, the CPU times monit reads are the sum of all CPUs times, so for a four CPU system the problem occurs after 124 days.


Thanks for great product,
Ron

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



--
To unsubscribe:
http://lists.nongnu.org/mailman/listinfo/monit-general




reply via email to

[Prev in Thread] Current Thread [Next in Thread]