|
From: | Ron Avriel |
Subject: | Wrong Display of System CPU Usage |
Date: | Tue, 06 Feb 2007 15:33:11 +0000 |
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 theyre (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/
[Prev in Thread] | Current Thread | [Next in Thread] |