From owner-freebsd-doc@FreeBSD.ORG Sun Jan 4 04:10:28 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5537F16A4CF for ; Sun, 4 Jan 2004 04:10:28 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 115A143D5A for ; Sun, 4 Jan 2004 04:10:22 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i04CALFR024463 for ; Sun, 4 Jan 2004 04:10:21 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i04CALHf024462; Sun, 4 Jan 2004 04:10:21 -0800 (PST) (envelope-from gnats) Resent-Date: Sun, 4 Jan 2004 04:10:21 -0800 (PST) Resent-Message-Id: <200401041210.i04CALHf024462@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Colin Percival Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 55CED16A4CF for ; Sun, 4 Jan 2004 04:09:57 -0800 (PST) Received: from fafnir.daemonology.net (h24-87-233-42.vc.shawcable.net [24.87.233.42]) by mx1.FreeBSD.org (Postfix) with SMTP id C883443D2F for ; Sun, 4 Jan 2004 04:09:54 -0800 (PST) (envelope-from cperciva@fafnir.daemonology.net) Received: (qmail 13023 invoked by uid 0); 4 Jan 2004 12:10:10 -0000 Message-Id: <20040104121010.13022.qmail@fafnir.daemonology.net> Date: 4 Jan 2004 12:10:10 -0000 From: Colin Percival To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/60890: sync ps.1 with print.c and sys/proc.h X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Colin Percival List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jan 2004 12:10:28 -0000 >Number: 60890 >Category: docs >Synopsis: sync ps.1 with print.c and sys/proc.h >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sun Jan 04 04:10:21 PST 2004 >Closed-Date: >Last-Modified: >Originator: Colin Percival >Release: FreeBSD 5.2-RC i386 >Organization: >Environment: System: FreeBSD fafnir.daemonology.net 5.2-RC FreeBSD 5.2-RC #2: Fri Jan 2 17:59:36 GMT 2004 cperciva@fafnir.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: ps.1 is out of touch with reality. In particular: 1. The '>', 'A', and 'S' states were removed in August 1997. 2. The 'W' state was added in September 2000. 3. The 'J' state is listed in the wrong place. 4. The list of flags from sys/proc.h hasn't been updated since April 1996. >How-To-Repeat: man ps >Fix: --- ps.1.diff begins here --- Index: ps.1 =================================================================== RCS file: /usr/cvs/src/bin/ps/ps.1,v retrieving revision 1.65 diff -u -r1.65 ps.1 --- ps.1 8 Sep 2003 19:57:13 -0000 1.65 +++ ps.1 4 Jan 2004 11:56:06 -0000 @@ -211,24 +211,30 @@ The flags associated with the process as in the include file .In sys/proc.h : -.Bl -column P_NOCLDSTOP P_NOCLDSTOP +.Bl -column P_STOPPED_SINGLE 0x4000000 .It Dv "P_ADVLOCK" Ta No "0x00001 Process may hold a POSIX advisory lock" .It Dv "P_CONTROLT" Ta No "0x00002 Has a controlling terminal" -.It Dv "P_INMEM" Ta No "0x00004 Loaded into memory" -.It Dv "P_NOCLDSTOP" Ta No "0x00008 No SIGCHLD when children stop" +.It Dv "P_KTHREAD" Ta No "0x00004 Kernel thread" +.It Dv "P_NOLOAD" Ta No "0x00008 Ignore during load avg calculations" .It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" -.It Dv "P_SELECT" Ta No "0x00040 Selecting; wakeup/waiting danger" -.It Dv "P_SINTR" Ta No "0x00080 Sleep is interruptible" +.It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" .It Dv "P_SUGID" Ta No "0x00100 Had set id privileges since last exec" .It Dv "P_SYSTEM" Ta No "0x00200 System proc: no sigs, stats or swapping" -.It Dv "P_TIMEOUT" Ta No "0x00400 Timing out during sleep" +.It Dv "P_SINGLE_EXIT" Ta No "0x00400 Threads suspending should exit, not wait" .It Dv "P_TRACED" Ta No "0x00800 Debugged process being traced" -.It Dv "P_WAITED" Ta No "0x01000 Debugging process has waited for child" +.It Dv "P_WAITED" Ta No "0x01000 Someone is waiting for us" .It Dv "P_WEXIT" Ta No "0x02000 Working on exiting" .It Dv "P_EXEC" Ta No "0x04000 Process called exec" -.It Dv "P_OWEUPC" Ta No "0x20000 Owe process an addupc() call at next ast" -.It Dv "P_SWAPPING" Ta No "0x40000 Process is being swapped" +.It Dv "P_SA" Ta No "0x08000 Using scheduler activations" +.It Dv "P_CONTINUED" Ta No "0x10000 Proc has continued from a stopped state" +.It Dv "P_STOPPED_SIG" Ta No "0x20000 Stopped due to SIGSTOP/SIGTSTP" +.It Dv "P_STOPPED_TRACE" Ta No "0x40000 Stopped because of tracing" +.It Dv "P_STOPPED_SINGLE" Ta No "0x80000 Only one thread can continue" +.It Dv "P_PROTECTED" Ta No "0x100000 Do not kill on memory overcommit" +.It Dv "P_SIGEVENT" Ta No "0x200000 Process pending signals changed" +.It Dv "P_JAILED" Ta No "0x1000000 Process is in jail" +.It Dv "P_INEXEC" Ta No "0x4000000 Process is in execve()" .El .It label The MAC label of the process. @@ -271,11 +277,6 @@ Marks a process in disk (or other short term, uninterruptible) wait. .It I Marks a process that is idle (sleeping for longer than about 20 seconds). -.It J -Marks a process which is in -.Xr jail 2 . -The hostname of the prison can be found in -.Ql /proc//status . .It L Marks a process that is waiting to acquire a lock. .It R @@ -284,6 +285,8 @@ Marks a process that is sleeping for less than about 20 seconds. .It T Marks a stopped process. +.It W +Marks an idle interrupt thread. .It Z Marks a dead process (a ``zombie''). .El @@ -298,18 +301,13 @@ The process has raised .Tn CPU scheduling priority. -.It > -The process has specified a soft limit on memory requirements and is -currently exceeding that limit; such a process is (necessarily) not -swapped. -.It A -the process has asked for random page replacement -.Pf ( Dv MADV_RANDOM , -from -.Xr madvise 2 , -for example, lisp in a garbage collect). .It E The process is trying to exit. +.It J +Marks a process which is in +.Xr jail 2 . +The hostname of the prison can be found in +.Ql /proc//status . .It L The process has pages locked in core (for example, for raw .Tn I/O ) . @@ -318,15 +316,6 @@ .Tn CPU scheduling priority (see .Xr setpriority 2 ) . -.It S -The process has asked for -.Tn FIFO -page replacement -.Pf ( Dv MADV_SEQUENTIAL , -from -.Xr madvise 2 , -for example, a large image processing program using virtual memory to -sequentially address voluminous data). .It s The process is a session leader. .It V --- ps.1.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: