Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 May 2009 21:26:52 GMT
From:      Yuri <yuri@tsoft.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/134344: 'top' shows user CPU value that's not equal to the total of all processes CPU values
Message-ID:  <200905072126.n47LQqrf068440@www.freebsd.org>
Resent-Message-ID: <200905072130.n47LU3I6077227@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         134344
>Category:       kern
>Synopsis:       'top' shows user CPU value that's not equal to the total of all processes CPU values
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu May 07 21:30:03 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Yuri
>Release:        7.2-PRERELEASE
>Organization:
n/a
>Environment:
FreeBSD xxx.xxx.xxx 7.2-PRERELEASE FreeBSD 7.2-PRERELEASE #0: Wed May  6 12:22:10 PDT 2009     root@xxx.xxx.xxx:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
See the example below, taken on the machine with single CPU.
92.5% != (42.77%+8.89%+3.27%+0.20%=55.13%)

I constantly observe variations like that.
I tried to discuss the issue on freebsd-hackers but discussion got nowhere.

Also how come top says there are 3 processes running and it shows
4 processes having nonzero CPU percentage?

--------------------------------------------------------------------------
last pid: 13673;  load averages:  1.23,  1.16,  0.97                                                                                 up 0+11:14:40  14:16:07
178 processes: 3 running, 174 sleeping, 1 stopped
CPU: 92.5% user,  0.0% nice,  7.1% system,  0.4% interrupt,  0.0% idle
Mem: 1528M Active, 131M Inact, 226M Wired, 67M Cache, 112M Buf, 38M Free
Swap: 16G Total, 248K Used, 16G Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    CPU COMMAND
13414 yuri          1 105    0   245M   212M RUN      5:26 42.77% xapp
 1660 yuri          2   4    0   213M 56540K select   0:00  8.89% konsole
 1575 yuri          1  46    0 76104K 30504K select  33:18  3.27% kded4
 1514 yuri          1  45    0   234M   193M select  14:19  0.20% Xorg
 1652 yuri          1  44    0 61880K 22500K select   3:52  0.00% kmix
 1797 yuri          1  44    0   344M 38764K select   0:59  0.00% skype
 2021 root          1   8   20 37128K 32004K wait     0:58  0.00% ruby18
 1638 yuri          1  44    0 40376K 19252K select   0:57  0.00% nepomukservicestub
 1631 yuri          1  44    0   238M 35156K select   0:48  0.00% krunner
 1708 yuri          1  44    0   344M 38764K select   0:46  0.00% skype
 1583 yuri          1  44    0 75680K 24708K select   0:33  0.00% kwin
 1692 yuri          1  44    0 70580K 32112K select   0:31  0.00% dolphin
 1716 yuri          1  44    0 78140K 27176K select   0:26  0.00% korgac
 1674 yuri          1  44    0 93112K 30884K select   0:22  0.00% okular
 1712 yuri          1  44    0 54012K 18092K select   0:14  0.00% klipper
88511 yuri          1  44    0 30568K 21136K select   0:12  0.00% ddd
11165 yuri          1  44    0 16736K  7672K select   0:11  0.00% vim
 1798 yuri          1   8    0   344M 38764K nanslp   0:07  0.00% skype
12997 yuri          1  98    0 34148K 27940K STOP     0:07  0.00% app
  966 root          1  44    0  3268K   872K select   0:06  0.00% moused
88512 yuri          1  44    0 95920K 86984K select   0:06  0.00% gdb
 1709 yuri          6  44    0 24264K 12584K select   0:06  0.00% licq
88263 yuri          6  44    0   189M   104M select   0:03  0.00% soffice.bin
 1567 yuri          1  44    0  5392K  3780K select   0:03  0.00% dbus-daemon
88250 yuri          1  44    0  5124K  1732K select   0:02  0.00% gam_server
 1237 root          1  44    0  4672K  1892K select   0:02  0.00% ntpd
 1573 yuri          1  44    0 43464K 21256K select   0:02  0.00% klauncher
 1633 yuri          1  44    0 59312K 24188K select   0:01  0.00% kcalc
 1380 root          1  44    0 11232K  5076K select   0:01  0.00% httpd
 1572 yuri          1  44    0 35376K 13292K select   0:01  0.00% kdeinit4
 1796 yuri          1   0    0   344M 38764K linuxf   0:01  0.00% skype
 2022 root          1  -8    0  3128K   640K piperd   0:01  0.00% tee
 1314 daemon        1  44    0  3156K  1068K select   0:01  0.00% healthd
 1608 yuri          1  44    0 51204K 15528K select   0:01  0.00% kaccess
 1403 root          1  44    0  5876K  2556K select   0:01  0.00% sendmail

>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905072126.n47LQqrf068440>