From owner-freebsd-questions@FreeBSD.ORG Sun Jan 1 21:19:04 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D68A016A41F for ; Sun, 1 Jan 2006 21:19:04 +0000 (GMT) (envelope-from racerx@makeworld.com) Received: from makeworld.com (makeworld.com [216.201.122.110]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C5E443D48 for ; Sun, 1 Jan 2006 21:19:04 +0000 (GMT) (envelope-from racerx@makeworld.com) Received: from makeworld.com ([127.0.0.1]) by localhost (makeworld.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 09053-05; Sun, 1 Jan 2006 15:19:02 -0600 (CST) Received: by makeworld.com (Postfix, from userid 1008) id F052361C9; Sun, 1 Jan 2006 15:19:01 -0600 (CST) Received: from [216.201.122.106] (racerx.makeworld.com [216.201.122.106]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by makeworld.com (Postfix) with ESMTP id C8CBA6101; Sun, 1 Jan 2006 15:19:01 -0600 (CST) Message-ID: <43B84751.6030203@makeworld.com> Date: Sun, 01 Jan 2006 15:19:13 -0600 From: Chris User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051225) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kirk Strauser References: <200601011334.18506.kirk@strauser.com> In-Reply-To: <200601011334.18506.kirk@strauser.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on makeworld.com Cc: freebsd-questions@freebsd.org Subject: Re: What's using my system? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: RacerX@makeworld.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Jan 2006 21:19:05 -0000 Kirk Strauser wrote: > I'm staring at "top" running on my 6.0-STABLE system. It's my desktop > machine, and also serves a light web/mail load (including a few jails). > Basically, the system should be idle about 99% of the time when I'm not > actively doing something on it. And yet it's not. > > The CPU never gets above about 75% idle, but top never shows any processes > doing much of anything. The "last pid" field only rarely increases, so I'm > relatively sure there's no processing forking off children that die too > quickly for top to notice them. > > So, what could be using my CPU? And other than top and tailing various > logfiles, what tools could help me find out? > > Example top output: > > > last pid: 72475; load averages: 0.26, 0.80, 1.69 up 28+21:59:16 13:26:30 > 214 processes: 4 running, 210 sleeping > CPU states: 14.7% user, 0.0% nice, 10.5% system, 3.9% interrupt, 70.9% idle > Mem: 752M Active, 186M Inact, 219M Wired, 63M Cache, 112M Buf, 23M Free > Swap: 4096M Total, 161M Used, 3934M Free, 3% Inuse > > PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND > 61660 root 1 96 0 89288K 74624K select 37:50 1.71% Xorg > 61791 kirk 1 96 0 34704K 25600K select 12:17 1.12% kdeinit > 61822 kirk 1 96 0 40616K 28980K select 14:55 1.03% kdeinit > 68111 kirk 1 96 0 33584K 23292K select 0:16 0.15% kdeinit > 1525 ldap 3 20 0 134M 7136K kserel 80:59 0.00% slapd > 61811 kirk 3 20 -76 16516K 10860K kserel 76:40 0.00% artsd > 1442 mysql 5 20 0 59576K 2752K kserel 44:14 0.00% mysqld > 1449 nagios 3 20 0 3900K 1228K kserel 37:36 0.00% nagios > 61864 kirk 3 96 0 78260K 61128K RUN 25:34 0.00% amarokapp > 83630 bind 1 4 0 12024K 8704K select 14:49 0.00% named > 1400 mailman 1 8 0 8828K 2716K nanslp 14:15 0.00% python2.3 > 1403 mailman 1 8 0 8532K 4088K nanslp 13:35 0.00% python2.3 > 1397 mailman 1 8 0 9016K 2700K nanslp 12:47 0.00% python2.3 > 1398 mailman 1 8 0 8792K 5216K nanslp 12:26 0.00% python2.3 > Try this: top -S -n 50 man top is helpful -- Best regards, Chris When your opponent is down, kick him.