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