From owner-freebsd-questions@FreeBSD.ORG Sat Oct 1 18:39:00 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DA3D1065670 for ; Sat, 1 Oct 2011 18:39:00 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from asmtp2.iomartmail.com (asmtp2.iomartmail.com [62.128.201.249]) by mx1.freebsd.org (Postfix) with ESMTP id 2D0EF8FC18 for ; Sat, 1 Oct 2011 18:38:59 +0000 (UTC) Received: from asmtp2.iomartmail.com (localhost.localdomain [127.0.0.1]) by asmtp2.iomartmail.com (8.13.8/8.13.8) with ESMTP id p91IcwF4025263; Sat, 1 Oct 2011 19:38:58 +0100 Received: from orange.esperance-linux.co.uk (host-92-22-130-66.as13285.net [92.22.130.66]) (authenticated bits=0) by asmtp2.iomartmail.com (8.13.8/8.13.8) with ESMTP id p91Icuit025254; Sat, 1 Oct 2011 19:38:57 +0100 Received: by orange.esperance-linux.co.uk (Postfix, from userid 1001) id 2FC6533C1F; Sat, 1 Oct 2011 19:38:56 +0100 (BST) Date: Sat, 1 Oct 2011 19:38:56 +0100 From: Frank Shute To: ??????? ??????? Message-ID: <20111001183856.GA35442@orange.esperance-linux.co.uk> References: <3691887.20111001203849@yandex.ru> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZPt4rx8FFjLCG7dd" Content-Disposition: inline In-Reply-To: <3691887.20111001203849@yandex.ru> User-Agent: Mutt/1.4.2.3i X-Face: *}~{PHnDTzvXPe'wl_-f%!@+r5; VLhb':*DsX%wEOPg\fDrXWQJf|2\,92"DdS%63t*BHDyQ|OWo@Gfjcd72eaN!4%NE{0]p)ihQ1MyFNtWL X-Operating-System: FreeBSD 8.2-STABLE amd64 X-Organisation: 'shute.org.uk' Cc: freebsd-questions@freebsd.org Subject: Re: top: how to obtain which process take CPU time X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 18:39:00 -0000 --ZPt4rx8FFjLCG7dd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 01, 2011 at 08:38:49PM +0300, ??????? ??????? wrote: > > hi, Freebsd-questions. >=20 > last pid: 92665; load averages: 2.40, 2.68, 4.75 up 5+02:45:23 20= :29:07 > 218 processes: 3 running, 215 sleeping > CPU: 59.6% user, 0.0% nice, 40.4% system, 0.0% interrupt, 0.0% idle > Mem: 225M Active, 81M Inact, 115M Wired, 3936K Cache, 60M Buf, 64M Free > Swap: 2048M Total, 190M Used, 1857M Free, 9% Inuse >=20 > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > 92520 cacti 1 -8 0 22796K 12656K piperd 0:00 1.46% php > 92593 cacti 1 -8 0 4620K 2316K piperd 0:00 1.46% perl5.8= .8 > 92594 cacti 1 8 0 3460K 1120K wait 0:00 1.46% sh > 92592 cacti 1 8 0 3460K 1120K wait 0:00 1.46% sh > 92595 cacti 1 55 0 5448K 2692K select 0:00 1.37% snmpget > 92518 cacti 1 8 0 23820K 12896K nanslp 0:00 0.98% php > 92528 cacti 1 -8 0 22796K 12640K piperd 0:00 0.98% php > 92555 cacti 1 -8 0 4620K 2332K piperd 0:00 0.98% perl5.8= .8 > 92556 root 1 96 0 3280K 1292K select 0:00 0.98% sudo > 92554 cacti 1 8 0 3460K 1120K wait 0:00 0.98% sh > 92542 cacti 1 8 0 3460K 1128K wait 0:00 0.98% sh > 92543 cacti 1 -8 0 10200K 3664K piperd 0:00 0.78% rrdtool > 81166 firebird 1 45 0 23344K 6188K select 0:08 0.49% fb_inet= _serve That looks to me like quite a weak system and has got 3 running processes and 215 sleeping. I can easily see that 59.6% of your CPU is being used and your load averages being as they are. >=20 > top -SIHP > last pid: 99336; load averages: 1.47, 2.05, 3.66 up 5+02:52:06 20= :35:50 > 291 processes: 6 running, 266 sleeping, 18 waiting, 1 lock > CPU: 52.2% user, 0.0% nice, 27.9% system, 0.0% interrupt, 19.9% idle > Mem: 236M Active, 81M Inact, 115M Wired, 3436K Cache, 60M Buf, 54M Free > Swap: 2048M Total, 189M Used, 1858M Free, 9% Inuse >=20 > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU COMMAND > 11 root 171 ki31 0K 8K RUN 70.1H 27.59% idle: cpu0 > 98502 cacti 8 0 23820K 12932K nanslp 0:00 0.20% php > 44054 root 8 0 3124K 524K nanslp 0:56 0.10% monitord > 99051 root 44 0 3496K 2020K RUN 0:00 0.10% top > 99331 cacti -8 0 4620K 2332K piperd 0:00 0.00% perl5.8.8 > 99326 cacti -8 0 4620K 2332K piperd 0:00 0.00% perl5.8.8 > 99333 root 46 0 3240K 1008K select 0:00 0.00% ping > 99328 root 45 0 3240K 972K select 0:00 0.00% ping > 99332 root 47 0 3280K 1292K select 0:00 0.00% sudo > 99327 root 47 0 3280K 1292K select 0:00 0.00% sudo >=20 > It is unclear which process take CPU time. > is there any other tool, which help me to see processes that take CPU? >=20 I don't think another tool would help. You've just got a weak system running lots of processes. None very big but they all add up to quite a big chunk of CPU. It looks like it's handling it OK though. Regards, --=20 Frank Contact info: http://www.shute.org.uk/misc/contact.html --ZPt4rx8FFjLCG7dd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (FreeBSD) iEYEARECAAYFAk6HXj8ACgkQHduKvUAgeK414ACgtsTYLj0JVf72pU8MaVCDDoR/ k7YAn0fnpdj0MIE04xKfT0SktqrV+voJ =C8O8 -----END PGP SIGNATURE----- --ZPt4rx8FFjLCG7dd--