When a program is spending most of its time waiting on the disk, other CPU monitors report CPU usage of roughly 15% per core while the lcdproc SMP CPU monitor reports that CPU1 (my second core) is wavering between 95% and 100%, roughly.
Which system are you using? Please post the output of 'uname -a'.
Linux monolith 2.6.25-gentoo-r7 #5 SMP PREEMPT Wed Aug 20 07:21:19 EDT 2008 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 5000+ AuthenticAMD GNU/Linux
The lcdproc client uses information from /proc/stat. Looking at the code I can't find an obvious error. Could you supply an example of your /proc/stat, especially if the problem happens?
Here's a cat of /proc/stat while MVing a large movie from one drive to another. Aside from MV, the CPU was at 0% on the first core and wavering below 5% on the second.
That single MV was enough to make the lcdproc monitor jump to wavering between 25% and 100% on the second core, despite being I/O-bound and not a significant CPU consumer according to other monitors.
File Added: proc_stat3.txt
Result of a single file copy while the CPU was otherwise unoccupied
I spotted the problem: When retrieving the load values, the iowait time is ignored in the overall load value. Therefore the real CPU load is close to the overall load value resulting in a high load percentage.
This affects not only SMP load screen, but normal CPU screen as well.
1st patch to address this issue
Does the attached patch fixes the problem for you?
My life has become VERY busy in the last little while. I'm not sure how long it'll be before I can test your patch. It'll be at least a week though.
Fix commited to CVS. Bug closed as 'fixed' after 4 weeks without response. Please reopen it if the problem persists.