[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: system/489: top(1) shown more than 100% CPU
- To: bugs_(_at_)_cvs_(_dot_)_openbsd_(_dot_)_org
- Subject: Re: system/489: top(1) shown more than 100% CPU
- From: Felix Schroeter <uk1o_(_at_)_schlund_(_dot_)_de>
- Date: Tue, 7 Jul 1998 03:00:02 -0600 (MDT)
- Delivery-date: Tue Jul 7 01:59:03 1998
- Reply-to: Felix Schroeter <uk1o_(_at_)_schlund_(_dot_)_de>
The following reply was made to PR system/489; it has been noted by GNATS.
From: Felix Schroeter <uk1o_(_at_)_schlund_(_dot_)_de>
To: form_(_at_)_vs_(_dot_)_itam_(_dot_)_nsc_(_dot_)_ru, gnats_(_at_)_openbsd_(_dot_)_org
Cc: Subject: Re: system/489: top(1) shown more than 100% CPU
Date: Tue, 7 Jul 1998 10:51:29 +0200
Hello!
On Thu, Jun 11, 1998 at 12:02:02PM +0700, Oleg Safiullin wrote:
> [...]
> >Synopsis: top(1) shown more than 100% CPU
> [...]
> sometime top(1) shows more than 100% CPU:
> $ top -Ibs1 -d1
> load averages: 1.99, 1.80, 1.58 11:57:05
> 33 processes: 2 running, 30 idle, 1 zombie
> Memory: Real: 4384K/26M act/tot Free: 31M Swap: 8K/128M used/tot
> PID USERNAME PRI NICE SIZE RES STATE WAIT TIME CPU COMMAND
> 25261 root 105 20 140K 428K run - 27:59 104.25% cracker
> [...]
That's because of the way, the CPU percentage is calculated in the
kernel. It's a decaying average where the decay factor depends on
the load average. Look at the comments in /sys/kern/kern_synch.c and
the locations messing with the p_pctcpu field of the proc structure
for more details.
Regards, Felix.
Visit your host, monkey.org