Date: Tue, 19 Dec 2006 09:01:01 +1030 From: Greg 'groggy' Lehey <grog@FreeBSD.org> To: Fr0zen <fr0zen@sbcglobal.net> Cc: freebsd-questions@freebsd.org Subject: Re: Process States Explanation Message-ID: <20061218223101.GM4364@wantadilla.lemis.com> In-Reply-To: <000301c72274$37d8e320$1401a8c0@amd> References: <000301c72274$37d8e320$1401a8c0@amd>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061218223101.GM4364>