Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/bin/ps Pull up revisions 1.40-1.42 (requested by hubertf):



details:   https://anonhg.NetBSD.org/src/rev/d68a6fd7d758
branches:  netbsd-1-5
changeset: 490555:d68a6fd7d758
user:      jhawk <jhawk%NetBSD.org@localhost>
date:      Sat Jan 27 07:06:40 2001 +0000

description:
Pull up revisions 1.40-1.42 (requested by hubertf):
  Clarify meaning of COMMANDs printed in parentheses. Addresses PR11930.

diffstat:

 bin/ps/ps.1 |  46 +++++++++++++++++++++++++++++++++++++++-------
 1 files changed, 39 insertions(+), 7 deletions(-)

diffs (61 lines):

diff -r c54603587c3d -r d68a6fd7d758 bin/ps/ps.1
--- a/bin/ps/ps.1       Sat Jan 27 06:58:29 2001 +0000
+++ b/bin/ps/ps.1       Sat Jan 27 07:06:40 2001 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: ps.1,v 1.36.4.1 2000/06/25 14:32:15 simonb Exp $
+.\"    $NetBSD: ps.1,v 1.36.4.2 2001/01/27 07:06:40 jhawk Exp $
 .\"
 .\" Copyright (c) 1980, 1990, 1991, 1993, 1994
 .\"    The Regents of the University of California.  All rights reserved.
@@ -379,13 +379,45 @@
 has a parent that has not yet waited for the process (in other words, a zombie)
 is listed as ``<defunct>'', and a process which is blocked while trying
 to exit is listed as ``<exiting>''.
+.Pp
 .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.
-The ucomm (accounting) keyword can, however, be depended on.
+will try to locate the processes' argument vector from the user
+area in order to print the command name and arguments. This method
+is not reliable because a process is allowed to destroy this
+information. The ucomm (accounting) keyword will always contain
+the real command name as contained in the process structure's p_comm field.
+.Pp
+To indicate that the argument vector has been tampered with,
+.Nm
+will append the real command name to the output within parentheses
+if the basename of the first argument in the argument vector
+does not match the contents of the real command name.  A special
+case of the above is system processes and/or kernel threads
+which are shown within parentheses because they do not set their
+argument vector.
+.Pp
+In addition,
+.Nm
+checks for the following two situations and does not append the
+real command name parenthesized:
+.Bl -tag -width indent
+.It -shellname
+The login process traditionally adds a
+.Sq -
+in front of the shell name to indicate a login shell. 
+.Nm
+will not append parenthesized the command name if it matches with
+the name in the the first argument of the argument vector, skipping
+the leading
+.Sq - .
+.It daemonname: current-activity
+Daemon processes frequently report their current activity by setting
+their name to be like ``daemonname: current-activity''.
+.Nm
+will not append parenthesized the command name, if the string preceeding the
+.Sq \:
+in the first argument of the argument vector matches the command name.
+.El
 .Sh KEYWORDS
 The following is a complete list of the available keywords and their
 meanings.



Home | Main Index | Thread Index | Old Index