Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jul 2002 09:54:01 -0500
From:      "Kevin Kinsey, DaleCo, S.P." <kdk@daleco.biz>
To:        "Dan Nelson" <dnelson@allantgroup.com>
Cc:        <freebsd-questions@FreeBSD.ORG>
Subject:   Re: More about top(1)
Message-ID:  <025f01c2210f$237fcf80$aae2910c@fbccarthage.com>
References:  <021001c2210c$9f4f6560$aae2910c@fbccarthage.com> <20020701144431.GA15191@dan.emsphone.com>

next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- 
From: "Dan Nelson" <dnelson@allantgroup.com>
To: "Kevin Kinsey, DaleCo, S.P." <kdk@daleco.biz>
Cc: <freebsd-questions@FreeBSD.ORG>
Sent: Monday, July 01, 2002 9:44 AM
Subject: Re: More about top(1)


> In the last episode (Jul 01), Kevin Kinsey, DaleCo, S.P. said:
> > On my system, 'top' seems to show a larger number of "state"
> > descriptors than the manpage would indicate.
> > 
> > Googling "top(1)" brought up the HTML manpages for OpenBSD, which is
> > the same, of course <?!> (where was ours, I wonder?)
> 
> man top

Well, yeah, I meant, "Why doesn't Google list the
HTML manpages at freebsd.org?..."  "man top"
is the one source I read before posting, other than
perusing the results at google...

>  
> > What's a resource for learning more about 'top'?  Or, more
> > specifically, what is 'poll' 'nanslp' 'piperd'?
> 
> The "STATE" column describes where in the kernel a process is waiting
> for something to happen.  Any time kernel code calls a sleep function,
> it has to pass a text string describing why it's sleeping.  From
> /sys/kern/sys_pipe.c, for example:
> 
>     /*
>      * If the other side is blocked, wake it up saying that
>      * we want to close it down.
>      */
>     while (cpipe->pipe_busy) {
>         wakeup(cpipe);
>         cpipe->pipe_state |= PIPE_WANT | PIPE_EOF;
>         msleep(cpipe, PIPE_MTX(cpipe), PRIBIO, "pipecl", 0);
>     }
> 
> In this example "pipecl" would show up in the STATE column of top for a
> process that's waiting for the other end of a pipe to close.  There is
> no definitive index of sleep strings.  

That's the answer to my question!!  Unfortunately,
it seems to be equal to "unless you can read code 
in C, you're not going to figure this one out..."

>Grep the kernel source for it if
> you really want to know what the code is doing.  Under current, STATEs
> with an asterisk in front of them are mutexes.  The only one you're
> likely to ever see is *Giant.
> 
> -- 
> Dan Nelson
> dnelson@allantgroup.com

Thank you very much...

KDK


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?025f01c2210f$237fcf80$aae2910c>