From owner-freebsd-questions@FreeBSD.ORG Tue Nov 2 08:54:45 2004 Return-Path: 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 5883D16A4CE for ; Tue, 2 Nov 2004 08:54:45 +0000 (GMT) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id EC18643D46 for ; Tue, 2 Nov 2004 08:54:43 +0000 (GMT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])iA28saoL065144 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 2 Nov 2004 08:54:36 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)iA28sZB4065143; Tue, 2 Nov 2004 08:54:35 GMT (envelope-from matthew) Date: Tue, 2 Nov 2004 08:54:35 +0000 From: Matthew Seaman To: Hugo Silva Message-ID: <20041102085435.GA64847@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Hugo Silva , freebsd-questions@freebsd.org References: <55762.81.84.174.68.1099340221.squirrel@81.84.174.68> <9395922d0411011545170e2ad6@mail.gmail.com> <56019.81.84.174.68.1099350383.squirrel@81.84.174.68> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <56019.81.84.174.68.1099350383.squirrel@81.84.174.68> User-Agent: Mutt/1.4.2.1i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.5.6 (smtp.infracaninophile.co.uk [IPv6:::1]); Tue, 02 Nov 2004 08:54:36 +0000 (GMT) X-Virus-Scanned: clamd / ClamAV version devel-20040904, clamav-milter version 0.75l on smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.8 required=5.0 tests=ALL_TRUSTED,AWL autolearn=ham version=3.0.1 X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: Process states? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2004 08:54:45 -0000 --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Nov 01, 2004 at 11:06:23PM -0000, Hugo Silva wrote: > > On Mon, 1 Nov 2004 20:17:01 -0000 (GMT), Hugo Silva > > wrote: > >> I'd like to know where I could get a complete list of the possible > >> process > >> states shown in ps , and their meanings ? > > > > A good starting point is > > $ man ps > > > > You could also try: > > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/basics-proces= ses.html > man ps / freebsd handbook don't speak about this, afaik. What exactly do you mean by 'state'. If you mean the STAT column in 'ps -aux' output, then that is documented in ps(1) --=20 % ps -aux | head -4 USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND root 0 0.0 0.0 0 0 ?? DLs Tue03PM 0:00.00 (swappe= r) matthew 65033 0.0 0.1 512 384 p2 R+ 8:40AM 0:00.00 ps -aux matthew 65007 0.0 0.1 972 448 ?? Is 8:38AM 0:00.00 /usr/loc= al/libex ^^^^ Look for the description of the 'state' keyword. From the small sample above, 'DLs' means 'process in disk wait, pages locked in core, session leader'; 'R+' means 'Runnable process, process in foreground process group of its controlling terminal' and 'Is' means 'Idle process, process is session leader' Most of the state descriptions are pretty transparent. One thing that might not be obvious at first glance is the concept of 'session leaders' -- 'sessions' are the same thing as 'process groups' (see setsid(2), setpgid(2)). Generally your login shell will be a 'session leader' and all of the programs you run interactively will belong to that session. Daemon processes generally put themselves into their own sessions. On the other hand, one thing that is not at all well documented is the 'STATE' column in top(1) output. As far as I can tell, that state is either RUN for a process that is actually running at the moment, or the name of a procedure where the process is sleeping, waiting on IO or some other condition for the kernel to give it a time slot. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQFBh0tLiD657aJF7eIRArZ2AJsGSZqLQy5CdDVZ0sQj0nnZ4rhlrwCdH1nj iHf2Jns6AfgKRHU45mC60Ck= =jFAJ -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA--