Bug 125 - procps/top: Incorrect summary CPU percentage utilization on 2.4 kernels
Summary: procps/top: Incorrect summary CPU percentage utilization on 2.4 kernels
Status: VERIFIED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.13.x
Hardware: All Linux
: P3 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-23 17:11 UTC by Leonid
Modified: 2009-04-05 07:58 UTC (History)
1 user (show)

See Also:
Host:
Target: linux-mips
Build: 1.13.2


Attachments
Fix (600 bytes, patch)
2009-02-23 17:11 UTC, Leonid
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonid 2009-02-23 17:11:33 UTC
Created attachment 71 [details]
Fix

I got an incorrect summary CPU percentage utilization with "top" utility in busybox 1.13.2 (even with latest patches from 2009-02-14) builded for MIPS32 platform on 2.4.37 Linux kernel & uClibc 0.9.29.

Example of top output:
=================================================================
Mem: 18344K used, 11836K free, 0K shrd, 2320K buff, 7064K cached
CPU: 300% usr2700% sys 0% nic47500% idle 0% io 0% irq 0% sirq
Load average: 0.07 0.07 0.07 1/37 392
PID PPID USER STAT VSZ %MEM %CPU COMMAND
=================================================================

Sample content of /proc/stat:
=================================================================
cpu  127 0 846 22406                                                            
cpu0 127 0 846 22406                                                            
page 1840 0                                                                     
swap 0 0                                                                        
intr 24436 0 0 0 48 1009 0 0 23379 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
disk_io:                                                                        
ctxt 2285                                                                       
btime 4294967292                                                                
processes 155                                                                   
=================================================================

Patch attached, solves the problem.
Comment 1 Denys Vlasenko 2009-03-03 11:55:57 UTC
Fixed in revision 25501, thanks!