Package: procps
Version: 2:3.3.12-2
Severity: wishlist
File: /usr/share/man/man1/ps.1.gz

Man page says

AIX FORMAT DESCRIPTORS
       This ps supports AIX format descriptors, which work somewhat like the
       formatting codes of printf(1) and printf(3).  For example, the normal
       default output can be produced with this: ps -eo "%p %y %x %c".  The
       NORMAL codes are described in the next section.

$ ps -o "%p %y %x %c"
  PID TTY          TIME COMMAND
 1580 pts/2    00:00:00 bash
 1817 pts/2    00:00:00 ps
$ ps
  PID TTY          TIME CMD
 1580 pts/2    00:00:00 bash
 1818 pts/2    00:00:00 ps

So they actually differ by COMMAND vs. CMD. So that paragraph is wrong.

Also don't use -e, as the default is many lines less than with -e.

Also mention one can mix % and non % items, but must use separate -o stanzas:

$ ps -o pid -o %c
  PID COMMAND
 1212 bash
 1920 ps

Also please mention, quite near the top of the page, what the default
output in fact is.

OK I found it is
$ ps -o "%p %y %x" -o ucmd

By the way, also

       CODE   NORMAL   HEADER...
       %y     tty      TTY

is wrong.
       %y     tty      TTY
should be
       %y     tname    TTY
as tty will produce TT.

$ ps -o %y -o tty -o tname|sed 2q
TTY      TT       TTY
pts/0    pts/0    pts/0

(Perhaps also add a --limit option, so one doesn't need sed when testing
as above.)

Also at
       Print only the process IDs of syslogd:
          ps -C syslogd -o pid=
mention how to get rid of blanks. Mention that the only way is
to apparently alas rely on external programs:
# ps -C rsyslogd -o pid= | tr -d ' '
424

Also as I above do, use rsyslogd instead of syslogd so people can test
without editing, as rsyslogd is what more people perhaps use these days.

By the way, this is busted for n=1,
$ for n in `seq 5`;do echo -n $n:; ps -e --lines $n --rows $n --headers|wc -l; 
done
1:116
2:230
3:173
4:154
5:144

Also be very careful, sometime on the man page you say "screen",
sometimes you say "page", when apparently talking about the same thing.
In fact there is a second meaning of "page" also there too... (memory page).

Maybe they should all be "page" as we are talking more of a printer like
output than top(1) output...

Reply via email to