From owner-freebsd-questions Mon Jul 1 7:54:35 2002 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 B538F37B400 for ; Mon, 1 Jul 2002 07:54:31 -0700 (PDT) Received: from mail.gbronline.com (mail.gbronline.com [12.145.226.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2381243E13 for ; Mon, 1 Jul 2002 07:54:31 -0700 (PDT) (envelope-from kdk@daleco.biz) Received: from daleco [12.145.226.175] by mail.gbronline.com (SMTPD32-7.10) id ACC75262009C; Mon, 01 Jul 2002 09:52:55 -0500 Message-ID: <025f01c2210f$237fcf80$aae2910c@fbccarthage.com> From: "Kevin Kinsey, DaleCo, S.P." To: "Dan Nelson" Cc: References: <021001c2210c$9f4f6560$aae2910c@fbccarthage.com> <20020701144431.GA15191@dan.emsphone.com> Subject: Re: More about top(1) Date: Mon, 1 Jul 2002 09:54:01 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 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 ----- Original Message ----- From: "Dan Nelson" To: "Kevin Kinsey, DaleCo, S.P." Cc: 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