From nobody@FreeBSD.org  Sat Jan 24 21:01:35 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6C1E9106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 24 Jan 2009 21:01:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 5048E8FC1C
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 24 Jan 2009 21:01:35 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n0OL1YKP005784
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 24 Jan 2009 21:01:34 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n0OL1YDw005783;
	Sat, 24 Jan 2009 21:01:34 GMT
	(envelope-from nobody)
Message-Id: <200901242101.n0OL1YDw005783@www.freebsd.org>
Date: Sat, 24 Jan 2009 21:01:34 GMT
From: Eugen Konkov <kes-kes@yandex.ru>
To: freebsd-gnats-submit@FreeBSD.org
Subject: can not obtain which process take all CPU time
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         130954
>Category:       bin
>Synopsis:       ps(1): can not obtain which process take all CPU time
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    vwe
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jan 24 21:10:00 UTC 2009
>Closed-Date:    Sun Feb 24 22:31:45 UTC 2013
>Last-Modified:  Sun Feb 24 22:31:45 UTC 2013
>Originator:     Eugen Konkov
>Release:        7.1-RELEASE
>Organization:
ISP Konkov
>Environment:
kes# uname -a
FreeBSD kes.net.ua 7.1-RELEASE FreeBSD 7.1-RELEASE #0: Sat Jan  3 01:15:39 EET 2009     kes@kes.net.ua:/usr/obj/usr/src/sys/KES_KERN_v7  i386

>Description:
There is 0% idle but in process list I can not see which process take all processor time. pls FIX


top -S 

last pid: 97785;  load averages:  4.96,  3.22,  2.50   up 14+00:36:54  23:02:21
846 processes: 6 running, 820 sleeping, 1 zombie, 18 waiting, 1 lock
CPU: 55.2% user,  0.0% nice, 23.0% system, 21.1% interrupt,  0.7% idle
Mem: 293M Active, 26M Inact, 145M Wired, 19M Cache, 60M Buf, 3700K Free
Swap: 2048M Total, 1985M Used, 63M Free, 96% Inuse, 828K Out

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
97785 firebird      1  59    0 23120K  5628K select   0:00  5.27% fb_inet_serve
97625 www           1  47    0 20892K  7272K select   0:00  1.76% httpd
69112 root          1   8    0  3124K   464K nanslp  24:31  1.27% monitord
   43 root          1 -16    -     0K     8K psleep  15:01  0.98% pagedaemon
   11 root          1 171 ki31     0K     8K RUN    132.7H  0.68% idle: cpu0
94835 www           1  44    0 56372K 29404K RUN     35:08  0.68% python2.5
97782 root          1  44    0  4556K  2604K RUN      0:00  0.59% top
 5156 root          1  44    0  9024K   540K select  77:59  0.49% snmpd
96593 firebird      1  44    0 23120K  4248K select   0:11  0.39% fb_inet_serve
97766 root         12  -8    0 12288K  9116K piperd   0:00  0.39% perl5.8.8
91638 www           1  44    0 45108K 32304K select   0:40  0.29% python2.5

top -S -C
last pid: 97812;  load averages:  3.68,  3.31,  2.60   up 14+00:38:09  23:03:36
846 processes: 7 running, 819 sleeping, 1 zombie, 18 waiting, 1 lock
CPU: 54.8% user,  0.0% nice, 16.3% system, 28.5% interrupt,  0.4% idle
Mem: 290M Active, 31M Inact, 146M Wired, 18M Cache, 60M Buf, 3700K Free
Swap: 2048M Total, 1987M Used, 61M Free, 97% Inuse, 540K Out

  PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME    CPU COMMAND
69112 root          1   8    0  3124K   464K nanslp  24:31  0.98% monitord
 5156 root          1  44    0  9024K   540K select  77:59  0.68% snmpd
   11 root          1 171 ki31     0K     8K RUN    132.7H  0.59% idle: cpu0
86377 www           1  44    0 31796K 15112K select   2:35  0.49% python2.5
97812 root          1  44    0  4556K  2588K RUN      0:00  0.49% top
   43 root          1 -16    -     0K     8K psleep  15:01  0.29% pagedaemon
   12 root          1 -44    -     0K     8K WAIT   162.1H  0.00% swi1: net
   42 root          1 -68    -     0K     8K -      276:57  0.00% dummynet
   13 root          1 -32    -     0K     8K *Giant 113:09  0.00% swi4: clock s
   15 root          1 -16    -     0K     8K -       36:14  0.00% yarrow
94835 www           1  44    0 56372K 29024K select  35:08  0.00% python2.5
 5231 www           1  44    0 43060K 25972K select  24:10  0.00% python2.5

>How-To-Repeat:
you can run to gzip something big
>Fix:


>Release-Note:
>Audit-Trail:

From: Mikolaj Golub <to.my.trociny@gmail.com>
To: Eugen Konkov <kes-kes@yandex.ru>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/130954: can not obtain which process take all CPU time
Date: Sun, 25 Jan 2009 01:56:57 -0800 (PST)

 Can you specify how you run gzip? Do you run gzip on one large file or rather
 there are many gzip processes spawned one by one?
 
 I can't reproduce this on 7.1-RELEASE-p1 amd64 and 7.0-STABLE (Jun18 2008)
 i386 (I don't have 7.1-RELEASE i386 at present).
 
 I have been observing the same on my loaded nagios host (6.3 i386), but I
 interpret it in this way. There are many short living processes spawned every
 second here, which are born and die faster then top update its statistics, so
 the top can't show them.
 
 You can check if it is your case, running something like this in the problem
 period:
 
   while sleep 1; do sysctl kern.lastpid; done
 
 If last pid grows fast you have the case I have described above.
 
 If it is not your case and you are observing the problem running one gzip
 process on large file, can you check if you see the same running something
 like this:
 
 gzip -c - < /dev/random > /dev/null
 
 If you don't, add file system IO:
 
 gzip -c - < /dev/random > test
 
 gzip -c - < test > /dev/null
 
 gzip -c - < test > test1
 
 Also, it would be nice to check if you have your world in sync with kernel.
 I think '/usr/bin/top -v', 'ident /usr/bin/top' could be helpful here.
 
 -- 
 Mikolaj Golub
State-Changed-From-To: open->suspended 
State-Changed-By: vwe 
State-Changed-When: Sat Aug 21 14:36:26 UTC 2010 
State-Changed-Why:  
submitter has been asked a question long time ago 
please note: ``ps axu'' sometimes gives better results for such problems 


Responsible-Changed-From-To: freebsd-bugs->vwe 
Responsible-Changed-By: vwe 
Responsible-Changed-When: Sat Aug 21 14:36:26 UTC 2010 
Responsible-Changed-Why:  
track 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130954 

From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru>
To: bug-followup@FreeBSD.org, kes-kes@yandex.ru
Cc:  
Subject: Re: bin/130954: ps(1): can not obtain which process take all CPU time
Date: Thu, 8 Dec 2011 04:20:28 +0200

  ps ax|grep bzip
 50409  ??  RN     1:49,11 /usr/bin/bzip2 -f9 /home/kes/backup/firebird/2011-1
 this is BD about 200Mb, pids are not fast.
 
 last pid: 50440;  load averages:  1.67,  0.80,  0.35   up 29+13:31:57  04:23:41
 73 processes:  2 running, 71 sleeping
 CPU:  0.4% user, 98.5% nice,  1.1% system,  0.0% interrupt,  0.0% idle
 Mem: 56M Active, 288M Inact, 120M Wired, 20M Cache, 60M Buf, 3620K Free
 Swap: 2048M Total, 188M Used, 1859M Free, 9% Inuse
 
   PID USERNAME    THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
  6271 bind          4  44    0 33904K  7712K select   0:08  0.49% named
  8121 root          1  44    0  9024K  1448K select  98:01  0.00% snmpd
  8283 icecast       6   8    0  8812K  1752K nanslp   8:15  0.00% icecast
  8131 root          1  44    0 33228K  2956K select   7:50  0.00% perl5.8.8
  8160 pgsql         1  44    0 42472K  1872K select   5:06  0.00% postgres
   698 root          1  44    0  3180K   564K select   3:20  0.00% syslogd
  8161 pgsql         1  44    0 42472K  1532K select   2:41  0.00% postgres
 50409 root          1 116   20 11380K  7244K RUN      2:10  0.00% bzip2
  8306 root          1   4    0  3124K   952K kqread   1:42  0.00% dovecot
  8368 root          1  44    0  5752K   400K select   1:37  0.00% sshd
  8258 postfix       1   4    0  5168K   880K kqread   1:36  0.00% qmgr
  8420 root          1  55    0  3236K   256K select   1:23  0.00% inetd
  8247 root          1   4    0  5168K   488K kqread   1:06  0.00% master
  8308 vmail         1   4    0  4276K   812K kqread   0:53  0.00% dovecot-auth
  8162 pgsql         1  44    0 42472K  1600K select   0:42  0.00% postgres
  8163 pgsql         1  44    0 10552K  1484K select   0:24  0.00% postgres
  8022 root          1  44    0  6992K   460K select   0:22  0.00% proftpd
 
  bzip2 is currently runned, but with low priority,
  maybe because of that CPU is not calculated??
 

From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru>
To: bug-followup@FreeBSD.org, kes-kes@yandex.ru
Cc:  
Subject: Re: bin/130954: ps(1): can not obtain which process take all CPU time
Date: Thu, 8 Dec 2011 04:29:53 +0200

 # top -v
 top: version 3.5beta12
 
 #ident /usr/bin/top
 /usr/bin/top:
      $FreeBSD: src/lib/csu/i386-elf/crti.S,v 1.7 2005/05/19 07:31:06 dfr Exp $
      $FreeBSD: src/lib/csu/i386-elf/crtn.S,v 1.6 2005/05/19 07:31:06 dfr Exp $
      $FreeBSD: src/lib/csu/common/crtbrand.c,v 1.4.20.1 2007/12/06 13:43:43 kib Exp $
      $FreeBSD: src/lib/csu/i386-elf/crt1.c,v 1.15 2005/10/07 22:13:17 bde Exp $
 
 
State-Changed-From-To: suspended->feedback 
State-Changed-By: jh 
State-Changed-When: Tue Dec 13 14:28:25 UTC 2011 
State-Changed-Why:  
Can you still reproduce this on recent FreeBSD versions? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130954 

From: =?windows-1251?B?yu7t/Oru4iDF4uPl7ejp?= <kes-kes@yandex.ru>
To: bug-followup@FreeBSD.org, kes-kes@yandex.ru
Cc:  
Subject: Re: bin/130954: ps(1): can not obtain which process take all CPU time
Date: Sun, 15 Jan 2012 00:58:52 +0200

 , Bug-followup.
 
 10-CURRENT works fine
 
 may close
 
 -- 
  ,
                            mailto:kes-kes@yandex.ru
 
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Sun Feb 24 22:31:07 UTC 2013 
State-Changed-Why:  
Submitter notes that it works on 10-CURRENT. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=130954 
>Unformatted:
