From owner-freebsd-questions@FreeBSD.ORG Mon Dec 18 22:55:08 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1785A16A407 for ; Mon, 18 Dec 2006 22:55:08 +0000 (UTC) (envelope-from grog@lemis.com) Received: from ext-gw.lemis.com (ext-gw.lemis.com [150.101.14.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1E94B43CA3 for ; Mon, 18 Dec 2006 22:53:28 +0000 (GMT) (envelope-from grog@lemis.com) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.135]) by ext-gw.lemis.com (Postfix) with ESMTP id BC71B1331E5; Tue, 19 Dec 2006 09:01:01 +1030 (CST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id BB0169C4CB; Tue, 19 Dec 2006 09:01:01 +1030 (CST) Date: Tue, 19 Dec 2006 09:01:01 +1030 From: Greg 'groggy' Lehey To: Fr0zen Message-ID: <20061218223101.GM4364@wantadilla.lemis.com> References: <000301c72274$37d8e320$1401a8c0@amd> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="t5NgoZwlhlUmGr82" Content-Disposition: inline In-Reply-To: <000301c72274$37d8e320$1401a8c0@amd> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 VoIP: sip:0871270137@sip.internode.on.net WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: freebsd-questions@freebsd.org Subject: Re: Process States Explanation X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Dec 2006 22:55:08 -0000 --t5NgoZwlhlUmGr82 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [Format recovered--see http://www.lemis.com/email/email-format.html] Single line paragraph On Monday, 18 December 2006 at 1:06:13 -0600, Fr0zen wrote: > > Where can I get a good list of what each process state means? That depends on what you mean by process state. The real definition is in /usr/include/sys/proc.h, but there are now only three states: enum { PRS_NEW = 0, /* In creation */ PRS_NORMAL, /* threads can be run. */ PRS_ZOMBIE } p_state; /* (j/c) S* process status. */ Maybe you mean the thread state, also described in the same file, but I doubt it. There are two other possibilities: - The information reported by ps(1) in the STAT column. This is described, not surprisingly, in the man page ps(1). - The information reported by ps(1) in the MWCHAN column. This is a name passed by a part of the kernel when it sleeps, so any process with a value in MWCHAN is sleeping. The names are frequently associated with the name of the function doing the sleeping. In general, you need to understand the kernel code to make a lot of sense of them. Still, if you do a 'ps al' you'll see a number of names again and again: ttyin Waiting for character input select Waiting for a select() to complete wait Waiting for something to happen, possibly time limited (>= 1 second) nanslp Waiting for < 1 second. Maybe we should write up some of these. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers. --t5NgoZwlhlUmGr82 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFFhxalIubykFB6QiMRAohPAJ9OPBEY9HXIELAg5l4y2zirbQLbvgCghTTW RaxMFTHMAuqUErouqcueycA= =e9Zm -----END PGP SIGNATURE----- --t5NgoZwlhlUmGr82--