From owner-freebsd-doc@FreeBSD.ORG Sat Nov 6 16:00:48 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 A7B6416A4CE for ; Sat, 6 Nov 2004 16:00:48 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8793543D4C for ; Sat, 6 Nov 2004 16:00:48 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id iA6G0mnR022774 for ; Sat, 6 Nov 2004 16:00:48 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id iA6G0mYD022766; Sat, 6 Nov 2004 16:00:48 GMT (envelope-from gnats) Resent-Date: Sat, 6 Nov 2004 16:00:48 GMT Resent-Message-Id: <200411061600.iA6G0mYD022766@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, Jilles Tjoelker Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 08B5116A4CE for ; Sat, 6 Nov 2004 15:50:14 +0000 (GMT) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 009E343D58 for ; Sat, 6 Nov 2004 15:50:12 +0000 (GMT) (envelope-from jilles@stack.nl) Received: from hammer.stack.nl (hammer.stack.nl [IPv6:2001:610:1108:5010::153]) by mailhost.stack.nl (Postfix) with ESMTP id 66DC61F17E for ; Sat, 6 Nov 2004 16:50:11 +0100 (CET) Received: by hammer.stack.nl (Postfix, from userid 1677) id 2D2EA6207; Sat, 6 Nov 2004 16:50:11 +0100 (CET) Message-Id: <20041106155011.2D2EA6207@hammer.stack.nl> Date: Sat, 6 Nov 2004 16:50:11 +0100 (CET) From: Jilles Tjoelker To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: docs/73618: [PATCH] Several improvements to man 1 ps X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Jilles Tjoelker List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Nov 2004 16:00:48 -0000 >Number: 73618 >Category: docs >Synopsis: [PATCH] Several improvements to man 1 ps >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Nov 06 16:00:47 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Jilles Tjoelker >Release: FreeBSD 6.0-CURRENT amd64 >Organization: MCGV Stack >Environment: System: FreeBSD hammer.stack.nl 6.0-CURRENT FreeBSD 6.0-CURRENT #3: Mon Nov 1 18:36:46 CET 2004 marcolz@hammer.stack.nl:/usr/obj/usr/src/sys/HAMMER amd64 >Description: * Document the fact that empty heading text suppresses the heading line (e.g. 'ps -o pid='), as this is very useful in scripts. * Describe logname keyword more completely. * Describe the printing of arguments more completely. * Put lockname in the correct alphabetical order in the list of all keywords. * Correct sentence in standards section. >How-To-Repeat: man ps >Fix: --- ps.1.patch begins here --- --- src/bin/ps/ps.1.orig Sat Nov 6 16:05:11 2004 +++ src/bin/ps/ps.1 Sat Nov 6 16:39:13 2004 @@ -187,6 +187,7 @@ sign and a string. This causes the printed header to use the specified string instead of the standard header. +If all keywords have empty header texts, no header line is written. .It Fl p Display information about processes which match the specified process IDs. .It Fl r @@ -310,6 +311,9 @@ If the name is invalid or unknown, then .Dq ???\& is displayed. +.It Cm logname +The login name associated with the session the process is in (see +.Xr getlogin 2 ) . .It Cm mwchan The event name if the process is blocked normally, or the lock name if the process is blocked on a lock. @@ -414,18 +418,26 @@ and a process which is blocked while trying to exit is listed as .Dq Li . -If the command vector cannot be located (usually because it has not -been set, as is the case of system processes and/or kernel threads) -the command name is printed within square brackets. +If the arguments cannot be located (usually because it has not been set, as is +the case of system processes and/or kernel threads) the command name is printed +within square brackets. The .Nm -utility +utility first tries to obtain the arguments cached by the kernel (if they were +shorter than the value of the +.Va kern.ps_arg_cache_limit +sysctl). +The process can change the arguments shown with +.Xr setproctitle 3 . +Otherwise, +.Nm makes an educated guess as to the file name and arguments given when the process was created by examining memory or the swap area. The method is inherently somewhat unreliable and in any event a process -is entitled to destroy this information, so the names cannot be depended -on too much. +is entitled to destroy this information. The ucomm (accounting) keyword can, however, be depended on. +If the arguments are unavailable or do not agree with the ucomm keyword, +the value for the ucomm keyword is appended to the arguments in parentheses. .Sh KEYWORDS The following is a complete list of the available keywords and their meanings. @@ -465,8 +477,10 @@ MAC label .It Cm lim memoryuse limit +.It Cm lockname +lock currently blocked on (as a symbolic name) .It Cm logname -login name of user who started the process +login name of user who started the session .It Cm lstart time started .It Cm majflt @@ -477,8 +491,6 @@ total messages received (reads from pipes/sockets) .It Cm msgsnd total messages sent (writes on pipes/sockets) -.It Cm lockname -lock currently blocked on (as a symbolic name) .It Cm mwchan wait channel or lock currently blocked on .It Cm nice @@ -624,7 +636,7 @@ .Xr sysctl 8 , .Xr mutex 9 .Sh STANDARDS -For historical reasons, +For historical reasons, the .Nm utility under .Fx --- ps.1.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: