Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2006 09:01:01 +1030
From:      Greg 'groggy' Lehey <>
To:        Fr0zen <>
Subject:   Re: Process States Explanation
Message-ID:  <>
In-Reply-To: <000301c72274$37d8e320$1401a8c0@amd>
References:  <000301c72274$37d8e320$1401a8c0@amd>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

[Format recovered--see]

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. */
	} 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.

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
See complete headers for address and phone numbers.

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.4.3 (FreeBSD)



Want to link to this message? Use this URL: <>