From owner-freebsd-questions Sat Dec 22 23:57:19 2001 Delivered-To: freebsd-questions@freebsd.org Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by hub.freebsd.org (Postfix) with ESMTP id 40A8537B41B for ; Sat, 22 Dec 2001 23:57:16 -0800 (PST) Received: (from dan@localhost) by dan.emsphone.com (8.11.6/8.11.6) id fBN7urQ70111; Sun, 23 Dec 2001 01:56:53 -0600 (CST) (envelope-from dan) Date: Sun, 23 Dec 2001 01:56:52 -0600 From: Dan Nelson To: void Cc: questions@FreeBSD.ORG Subject: Re: top output -- what's going on here? Message-ID: <20011223075652.GA69221@dan.emsphone.com> References: <20011223063011.A30966@parhelion.firedrake.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011223063011.A30966@parhelion.firedrake.org> User-Agent: Mutt/1.3.24i X-OS: FreeBSD 5.0-CURRENT X-message-flag: Outlook Error Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In the last episode (Dec 23), void said: > Top is telling me that 56.6% of my CPU is in use, but the WCPU and > CPU columns both add up to under 2%. What's the reason for this > inconsistency? > > last pid: 97907; load averages: 3.90, 3.78, 2.17 up 0+00:27:44 01:26:15 > 73 processes: 4 running, 43 sleeping, 26 stopped > CPU states: 56.6% user, 0.0% nice, 43.4% system, 0.0% interrupt, 0.0% idle > Mem: 37M Active, 56M Inact, 19M Wired, 8980K Cache, 22M Buf, 1280K Free > Swap: 401M Total, 1296K Used, 400M Free, 48K Out > > PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND > 11777 root -6 0 2456K 1836K piperd 0:05 1.07% 1.07% ruby16 > 94954 root 2 0 828K 668K select 0:00 0.50% 0.20% make You didn't say what the system was doing when you ran top, but because you're running ruby16 and make, I assume this is during a portbuild operation. The pre-build dependency checks make heavy use of base Unix shell commands like sed, awk, sh, test, uname, etc. These run and exit almost instantly, so they usually don't even show up in top. They are counted in the CPU usage stats, though. I bet if you watch the "last pid" field for a while, you'll see it zipping through a couple hundred processes/second. If you have process accounting turned on, you should also be able to see the commands if you run "lastcomm". -- Dan Nelson dnelson@allantgroup.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message