Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2001 01:56:52 -0600
From:      Dan Nelson <dnelson@allantgroup.com>
To:        void <float@firedrake.org>
Cc:        questions@FreeBSD.ORG
Subject:   Re: top output -- what's going on here?
Message-ID:  <20011223075652.GA69221@dan.emsphone.com>
In-Reply-To: <20011223063011.A30966@parhelion.firedrake.org>
References:  <20011223063011.A30966@parhelion.firedrake.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




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