Package: procps
Version: 1:3.2.5-1
Severity: normal

Of the default output of 'ps' the man page says:

    % man ps | grep -A 4 -n "^By default,"
    35:By default, ps selects all processes with the same effective user ID 
(EUID) as
    36-the curent user and associated with the same terminal as the invoker. It
    37-displays the process ID (PID), the terminal associated with the process 
(TTY),
    38-the cumulated CPU time in [dd-]hh:mm:ss format (TIME), and the 
executable name
    39-(CMD). Output is unsorted by default.

...in short PID,TTY,TIME,CMD -- all of which upper case header names
have lower case code equivalents that are valid input for 'ps'.  The
default format is the same as:

    % ps o pid,tty,time,ucmd t  # note the 'ucmd' instead of 'cmd'
      PID TT           TIME CMD
     1048 pts/3    00:00:00 bash
     1054 pts/3    00:00:00 ps

...compare that with 'cmd', which shows the arguments:

    % ps o pid,tty,time,cmd t
      PID TT           TIME CMD
     1048 pts/3    00:00:00 bash
     1064 pts/3    00:00:00 ps o pid,tty,time,cmd t


The cause of this bug report is that I got confused while trying to add
a field to the default.  I used 'cmd' and kept seeing unwanted command
line arguments that were very noticeable when grepping.

It would be better if the man page described the default behavior with
lower case codes that are specific instead of headers that sometimes
aren't; or perhaps with both codes and headers.  If the defaults vary
depending on the platform, maybe a table would best describe things.


If it matters, here's my 'ps' variables, which are nothing much:

    # show environmental variable values pertaining to 'ps'
    # (very ad hoc!)
    % for f in `man ps | grep -A 50 "^ENVIRONMENT VARIABLES$" | grep -B 50 
"^_XPG$" | grep -v "^ \|^$\|^ENV\|^The"`; do eval echo \$f=\$$f ; done
    Reformatting ps(1), please wait...
    COLUMNS=101
    LINES=34
    PS_PERSONALITY=
    CMD_ENV=
    I_WANT_A_BROKEN_PS=
    LC_TIME=
    PS_COLORS=
    PS_FORMAT=
    PS_SYSMAP=
    PS_SYSTEM_MAP=
    POSIXLY_CORRECT=
    POSIX2=
    UNIX95=
    _XPG=


Hope this helps...



-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-1-686
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set to C)

Versions of packages procps depends on:
ii  libc6                         2.3.5-7    GNU C Library: Shared libraries an
ii  libncurses5                   5.5-1      Shared libraries for terminal hand

Versions of packages procps recommends:
ii  psmisc                        21.6-1     Utilities that use the proc filesy

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to