Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Mar 2007 10:40:57 -0500
From:      Bill Moran <wmoran@potentialtech.com>
To:        "Grant Peel" <gpeel@thenetnow.com>
Cc:        questions@freebsd.org
Subject:   Re: top
Message-ID:  <20070302104057.d07c6d1b.wmoran@potentialtech.com>
In-Reply-To: <003301c75cda$dad952d0$6501a8c0@GRANT>
References:  <002401c75cd9$1a1e7210$6501a8c0@GRANT> <20070302095103.d6fbb8b3.wmoran@potentialtech.com> <003301c75cda$dad952d0$6501a8c0@GRANT>

next in thread | previous in thread | raw e-mail | index | archive | help

Please don't top-post.  Please don't turn public discussions into private
ones.  Please read:
http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-questions/index.html

Format recovered, response in-line.

In response to "Grant Peel" <gpeel@thenetnow.com>:
> ----- Original Message ----- 
> From: "Bill Moran" <wmoran@potentialtech.com>
> 
> > In response to "Grant Peel" <gpeel@thenetnow.com>:
> >
> >> Hi all,
> >>
> >> FreeBSD 'top' 6.n does not seem to show anything when the i flag (don't
> >> display idle processes). the whole display (below the mem and cpu
> >> information header) goes blank.
> >>
> >> Any ideas?
> >
> > Maybe all your processes are idle?  What's the header look like when you
> > do this?  99.9% idle, perhaps?
> 
> I have seen it drop to < 50% idle, with no process showing. Again, this is 
> when 'i' is selected.
> 
> HEre is a quick capture I was able to get, note nothing showing in the 
> process section. This had to be set to 5 secs refresh as I couldn't capture 
> the cup usage fast enough at 1 second.

I played with this a bit.  It seems that top calculates whether a process
is "idle" or not with a heavy bias toward "idle".  I didn't look in to the
code, but it seems like a process has to be running for the lion's share of
the calculated timeslice for it to be considered non-idle.

I don't know if this is intended behaviour or not, but it's not "broken", at
worst it's "badly dinged" ;)  Try this in another shell while watching
top:
while true; do STUFF="$PATH"; done
and it will show up.  My guess is that your usage is caused by many small
processes, each taking up a small portion of the total CPU, but none taking
up enough CPU to be considered non-idle by top.

> 
> 
> last pid: 20389;  load averages:  0.01,  0.23,  0.38 
> up 93+11:18:57  09:53:35
> 106 processes: 2 running, 102 sleeping, 2 zombie
> CPU states:  8.0% user,  0.0% nice,  1.5% system,  0.0% interrupt, 90.5% 
> idle
> Mem: 191M Active, 64M Inact, 125M Wired, 3768K Cache, 60M Buf, 110M Free
> Swap: 2048M Total, 189M Used, 1859M Free, 9% Inuse, 4K In
> 
>   PID USERNAME      THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND

-- 
Bill Moran
http://www.potentialtech.com



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