On 7/2/05, Oliver J. Morais <[EMAIL PROTECTED]> wrote:
> OpenBSD 3.7-current (GENERIC) #212: Mon Jun 27 21:48:43 MDT 2005 on i386
> Compiling xpdf I see the following top-output (top -S -ocpu 10)
> 
> load averages:  1.97,  1.55,  0.97                                   16:16:04
> 65 processes:  2 running, 62 idle, 1 on processor
> CPU states: 88.5% user,  0.0% nice, 10.0% system,  0.3% interrupt,  1.2% idle
> Memory: Real: 62M/124M act/tot  Free: 366M  Swap: 0K/1024M used/tot
> 
>   PID USERNAME PRI NICE  SIZE   RES STATE    WAIT     TIME    CPU COMMAND
> 16836 moo        2    0   19M   23M sleep    select   0:18  0.00% Xorg
>    11 root     -18    0    0K   26M sleep    reaper   0:03  0.00% reaper
> 10255 moo        2    0 3504K 4280K sleep    select   0:01  0.00% xterm
> 23656 root      10    0 8956K 2748K sleep    wait     0:00  0.00% make
> 25307 root      64    0   19M   11M run      -        0:00  0.00% cc1
> 15256 moo        2    0 7216K 7660K sleep    poll     0:00  0.00% xscreensaver
> 21127 moo        2    0 3516K 4232K run      -        0:00  0.00% xterm
>    13 root      18    0    0K   26M sleep    syncer   0:00  0.00% update
>  4698 root       2    0  660K  392K idle     kqread   0:00  0.00% apmd
>  3048 root       2    0 1484K 1020K sleep    select   0:00  0.00% sendmail
> 
> So: 88.5% User, 10.0% System looks OK, but where are the CPU-consuming 
> processes
> in the list?
> 
> ,----[ man top - bugs ]-
> | As with ps(1), things can change while ttp is collecting information for
> | an update.  The picture it gives is only a close approximation to reality.
> `----
> 
> I don't think an approximation of this scale is correct ;-)
> 
> Another try:
> 
> ,----[ md5 -t ]-
> | while true; do md5 -t; done
> |
> | top output:
> |
> | load averages:  1.81,  1.72,  1.48                                     
> 16:28:13
> | 52 processes:  2 running, 49 idle, 1 on processor
> | CPU states:  100% user,  0.0% nice,  0.0% system,  0.0% interrupt,  0.0% 
> idle
> | Memory: Real: 48M/109M act/tot  Free: 381M  Swap: 0K/1024M used/tot
> |
> |   PID USERNAME PRI NICE  SIZE   RES STATE    WAIT     TIME    CPU COMMAND
> | 32635 moo       56    0 2904K  172K run      -        0:00  1.71% md5
> | 17994 moo        2    0 3148K 3748K sleep    select   0:00  0.05% xterm
> | 16836 moo        2    0   19M   23M sleep    select   0:21  0.00% Xorg
> `----
> 
> 100% User but md5 only showing up with 1,71%?
> 
> Either I don't see the obvious or there's something broken.
> 
> 
The percent displayed in the process list is an average on the
process' lifetime (or something like that).  The numbers at the top
about the CPU usage are live numbers directly reported by the kernel.

All it takes to find that out is a little bit of observation and
deduction.  From the second output you provided you should see md5's
CPU usage go up rapidly.  Now, if you're not happy with that, you're
welcome to fix it yourself

-- 
"They allowed us to set up a separate division almost, that is physically,
geographically, psychologically and spiritually different from what Bill 
himself calls the Borg"
 - Peter Moore, V.P. in charge of Xbox 360 marketing at Microsoft.

Reply via email to