History log of /netbsd-current/bin/ps/ps.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.32 14-Sep-2021 christos

use emalloc and friends, add ktrace flag printing.


# 1.31 14-Sep-2021 christos

Provide symbolic printing of some keywords by capitalizing them.


# 1.30 10-Sep-2021 rillig

bin: remove unnecessary lint comment CONSTCOND

Since 2021-01-31, lint no longer warns about 'do ... while (0)'.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.29 02-Dec-2016 christos

branches: 1.29.14;
provide a tree like display with -d, from FreeBSD


# 1.28 28-Nov-2016 rin

Calculate CPU usage (pcpu) once per process if it is required. This change
significantly improves performance for slow machines when output is sorted
by pcpu.

ok martin


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base tls-maxphys-base
# 1.27 20-Apr-2014 dholland

branches: 1.27.6;
Use an enum type for PRINTMODE vs. WIDTHMODE. Compiler output diffs have
been checked.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.26 02-Oct-2006 apb

branches: 1.26.40; 1.26.46; 1.26.60;
* When all columns are given null customised headers, the blank header
line is not printed at all. This is specified in P1003.1-2004
(SUSv3), and is useful.

* Customised headers may contain embedded space, commas and equals
signs. To specify multiple customised headers, use multiple -o or -O
options. This is specified (for "-o", not for "-O") in P1003.1-2004
(SUSv3), and is useful.

* When a column is given a null (blank) customised header, it keeps its
default minimum width. This is specified in P1003.1-2004 (SUSv3), and
seems harmless.

* Fix a bug that made it impossible to print the same keyword multiple
times, with different customised headers each time. (Previously, the
last customised header was used for all instances of the keyword.)

* Make the behaviour of "-O" more useful. The first -O option adds
the default keywords only if there have not yet been any formatting
options, and multiple -O options now insert their keywords in adjacent
positions. Now {ps -j -O %cpu} is like {ps -j} with one extra column;
Previously, it would have had all the columns implied by "-j", plus
all the default columns, plus the extra column specified by "-O".

* Convert from home-grown linked lists to SIMPLEQ lists.

Discussed in tech-userlevel.


Revision tags: abandoned-netbsd-4-base
# 1.25 26-Jun-2005 christos

sprinkle a little const, and now everything compiles with WARNS=3


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.24 27-Mar-2004 simonb

Add support for the POSIX.2 "args" and "comm" keywords. "args" is just
an alias for "command", and "comm" shows just argv[0] and not the whole
argument list.

Fix for part of PR standards/11224.


# 1.23 27-Mar-2004 simonb

#define<TAB>


# 1.22 27-Mar-2004 simonb

KNF, ANSFify, de-__P, unC++ify, white space nits.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 06-Mar-2003 dsl

- add keywords for utime, stime and ctime (output sss.ssssss if small)
- fiddle with keyword table - mainly to keep width under 80 cols
- add -k keylist so sort output
- don't use logs to work out field width, get -MAXINT right
- user defined headers can be 1 char (actually they can be zero length)
so ?? in tty column isn't guaranteed to be wider than header
- remove some long long casts (compiles on sparc64 still)
- use kvm_openfiles(NULL, NULL, NULL, KVN_NO_FILES, ..) unless core file
specified,
(approved by christos)


# 1.19 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.18 24-Apr-2002 nathanw

Since kinfo_proc2 has many values that are 64-bit, ps needs to know
that they're 64-bit, and grab them out of memory appropriately. Otherwise,
big-endian systems get the wrong end of the 64-bit value and lose.

Keywords affected: inblk, majflt, minflt, msgrcv, msgsnd, nivcsw, nsigs,
nswap, nvcsw, and oublk.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.17 07-Jun-2000 simonb

branches: 1.17.4;
Calculate field widths on the fly so that all columns line up nicely
and make more effective use of screen real estate when some columns
(eg USER and VSZ) didn't need the full default width.


Revision tags: minoura-xpg4dl-base
# 1.16 26-May-2000 simonb

branches: 1.16.2;
Use new sysctl/kvm interfaces. This will stop the "proc size mismatch"
errors when internal kernel structures change size. Also remove
the sgid bit - all live kernel data is accessed through the sysctl
interface.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.15 03-May-1999 mrg

oops, fix merge botch in previous..


# 1.14 03-May-1999 mrg

limit session to 6 chars. from Geoff Wing <gcw@pobox.com> and fixes his PR#7506


# 1.13 16-Apr-1999 christos

Add support for printing wide sigset_t properly.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.12 02-Oct-1996 ws

Fix p_nice vs. NZERO code.
Remove some unnecessary casts.
Remove an unused time format field.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.11 29-Sep-1995 cgd

add INT32 and UINT32 variable type specifiers. some of the variables
that are printed are of fixed size.


# 1.10 15-Aug-1995 cgd

Kenneth Stailey pointed out that his previous fix was incorrect. RE and SL
should be bounded at 127, not 99.


# 1.9 14-Aug-1995 cgd

as suggested in PR 1347, by Kenneth Stailey, make "RE" and "SL" fields
show up as two digits, max, displaying "99" if > 99. allow any field with
an unsigned value to be specified as printing that way (though right now
it's only used for RE and SL, which are both unsigned longs). This fix
is substantially different than that suggested in the PR.


# 1.8 18-May-1995 mycroft

Create and strvis(3) the argument and environment lists only as needed.
Do not keep extra copies around.


# 1.7 08-May-1995 cgd

add the ability to understand and print INT and UINT-sized variables.


# 1.6 21-Mar-1995 cgd

convert to new RCS id conventions.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.5 09-May-1994 cgd

clean up import


# 1.4 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base netbsd-0-8 netbsd-alpha-1
# 1.3 23-Mar-1993 cgd

changed "Id" to "Header" for rcsids


# 1.2 22-Mar-1993 cgd

added rcs ids to all files


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.30 10-Sep-2021 rillig

bin: remove unnecessary lint comment CONSTCOND

Since 2021-01-31, lint no longer warns about 'do ... while (0)'.

No functional change.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-8-2-RELEASE netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 netbsd-8-1-RELEASE netbsd-8-1-RC1 pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 netbsd-8-0-RELEASE phil-wifi-base pgoyette-compat-0625 netbsd-8-0-RC2 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 netbsd-8-0-RC1 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base matt-nb8-mediatek-base perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107
# 1.29 02-Dec-2016 christos

branches: 1.29.14;
provide a tree like display with -d, from FreeBSD


# 1.28 28-Nov-2016 rin

Calculate CPU usage (pcpu) once per process if it is required. This change
significantly improves performance for slow machines when output is sorted
by pcpu.

ok martin


Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base tls-maxphys-base
# 1.27 20-Apr-2014 dholland

branches: 1.27.6;
Use an enum type for PRINTMODE vs. WIDTHMODE. Compiler output diffs have
been checked.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.26 02-Oct-2006 apb

branches: 1.26.40; 1.26.46; 1.26.60;
* When all columns are given null customised headers, the blank header
line is not printed at all. This is specified in P1003.1-2004
(SUSv3), and is useful.

* Customised headers may contain embedded space, commas and equals
signs. To specify multiple customised headers, use multiple -o or -O
options. This is specified (for "-o", not for "-O") in P1003.1-2004
(SUSv3), and is useful.

* When a column is given a null (blank) customised header, it keeps its
default minimum width. This is specified in P1003.1-2004 (SUSv3), and
seems harmless.

* Fix a bug that made it impossible to print the same keyword multiple
times, with different customised headers each time. (Previously, the
last customised header was used for all instances of the keyword.)

* Make the behaviour of "-O" more useful. The first -O option adds
the default keywords only if there have not yet been any formatting
options, and multiple -O options now insert their keywords in adjacent
positions. Now {ps -j -O %cpu} is like {ps -j} with one extra column;
Previously, it would have had all the columns implied by "-j", plus
all the default columns, plus the extra column specified by "-O".

* Convert from home-grown linked lists to SIMPLEQ lists.

Discussed in tech-userlevel.


Revision tags: abandoned-netbsd-4-base
# 1.25 26-Jun-2005 christos

sprinkle a little const, and now everything compiles with WARNS=3


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.24 27-Mar-2004 simonb

Add support for the POSIX.2 "args" and "comm" keywords. "args" is just
an alias for "command", and "comm" shows just argv[0] and not the whole
argument list.

Fix for part of PR standards/11224.


# 1.23 27-Mar-2004 simonb

#define<TAB>


# 1.22 27-Mar-2004 simonb

KNF, ANSFify, de-__P, unC++ify, white space nits.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 06-Mar-2003 dsl

- add keywords for utime, stime and ctime (output sss.ssssss if small)
- fiddle with keyword table - mainly to keep width under 80 cols
- add -k keylist so sort output
- don't use logs to work out field width, get -MAXINT right
- user defined headers can be 1 char (actually they can be zero length)
so ?? in tty column isn't guaranteed to be wider than header
- remove some long long casts (compiles on sparc64 still)
- use kvm_openfiles(NULL, NULL, NULL, KVN_NO_FILES, ..) unless core file
specified,
(approved by christos)


# 1.19 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.18 24-Apr-2002 nathanw

Since kinfo_proc2 has many values that are 64-bit, ps needs to know
that they're 64-bit, and grab them out of memory appropriately. Otherwise,
big-endian systems get the wrong end of the 64-bit value and lose.

Keywords affected: inblk, majflt, minflt, msgrcv, msgsnd, nivcsw, nsigs,
nswap, nvcsw, and oublk.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.17 07-Jun-2000 simonb

branches: 1.17.4;
Calculate field widths on the fly so that all columns line up nicely
and make more effective use of screen real estate when some columns
(eg USER and VSZ) didn't need the full default width.


Revision tags: minoura-xpg4dl-base
# 1.16 26-May-2000 simonb

branches: 1.16.2;
Use new sysctl/kvm interfaces. This will stop the "proc size mismatch"
errors when internal kernel structures change size. Also remove
the sgid bit - all live kernel data is accessed through the sysctl
interface.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.15 03-May-1999 mrg

oops, fix merge botch in previous..


# 1.14 03-May-1999 mrg

limit session to 6 chars. from Geoff Wing <gcw@pobox.com> and fixes his PR#7506


# 1.13 16-Apr-1999 christos

Add support for printing wide sigset_t properly.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.12 02-Oct-1996 ws

Fix p_nice vs. NZERO code.
Remove some unnecessary casts.
Remove an unused time format field.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.11 29-Sep-1995 cgd

add INT32 and UINT32 variable type specifiers. some of the variables
that are printed are of fixed size.


# 1.10 15-Aug-1995 cgd

Kenneth Stailey pointed out that his previous fix was incorrect. RE and SL
should be bounded at 127, not 99.


# 1.9 14-Aug-1995 cgd

as suggested in PR 1347, by Kenneth Stailey, make "RE" and "SL" fields
show up as two digits, max, displaying "99" if > 99. allow any field with
an unsigned value to be specified as printing that way (though right now
it's only used for RE and SL, which are both unsigned longs). This fix
is substantially different than that suggested in the PR.


# 1.8 18-May-1995 mycroft

Create and strvis(3) the argument and environment lists only as needed.
Do not keep extra copies around.


# 1.7 08-May-1995 cgd

add the ability to understand and print INT and UINT-sized variables.


# 1.6 21-Mar-1995 cgd

convert to new RCS id conventions.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.5 09-May-1994 cgd

clean up import


# 1.4 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base netbsd-0-8 netbsd-alpha-1
# 1.3 23-Mar-1993 cgd

changed "Id" to "Header" for rcsids


# 1.2 22-Mar-1993 cgd

added rcs ids to all files


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.29 02-Dec-2016 christos

provide a tree like display with -d, from FreeBSD


# 1.28 28-Nov-2016 rin

Calculate CPU usage (pcpu) once per process if it is required. This change
significantly improves performance for slow machines when output is sorted
by pcpu.

ok martin


Revision tags: pgoyette-localcount-20161104 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base tls-maxphys-base
# 1.27 20-Apr-2014 dholland

Use an enum type for PRINTMODE vs. WIDTHMODE. Compiler output diffs have
been checked.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE yamt-pagecache-tag8 netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-6-1-1-RELEASE riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 agc-symver-base netbsd-6-1-RC2 netbsd-6-1-RC1 yamt-pagecache-base8 netbsd-6-0-1-RELEASE yamt-pagecache-base7 netbsd-5-2-RELEASE netbsd-5-2-RC1 matt-nb6-plus-nbase yamt-pagecache-base6 netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231 matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE jym-xensuspend-nbase netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 jym-xensuspend-base netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 mjf-devfs2-base netbsd-4-0-1-RELEASE wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-fixsa-newbase wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-baseX yamt-pf42-base2 wrstuden-revivesa-base yamt-pf42-base keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking wrstuden-fixsa-base-1 netbsd-4-0-RELEASE cube-autoconf-base netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 matt-armv6-base matt-mips64-base hpcarm-cleanup-base wrstuden-fixsa-base netbsd-4-base
# 1.26 02-Oct-2006 apb

branches: 1.26.40; 1.26.46; 1.26.60;
* When all columns are given null customised headers, the blank header
line is not printed at all. This is specified in P1003.1-2004
(SUSv3), and is useful.

* Customised headers may contain embedded space, commas and equals
signs. To specify multiple customised headers, use multiple -o or -O
options. This is specified (for "-o", not for "-O") in P1003.1-2004
(SUSv3), and is useful.

* When a column is given a null (blank) customised header, it keeps its
default minimum width. This is specified in P1003.1-2004 (SUSv3), and
seems harmless.

* Fix a bug that made it impossible to print the same keyword multiple
times, with different customised headers each time. (Previously, the
last customised header was used for all instances of the keyword.)

* Make the behaviour of "-O" more useful. The first -O option adds
the default keywords only if there have not yet been any formatting
options, and multiple -O options now insert their keywords in adjacent
positions. Now {ps -j -O %cpu} is like {ps -j} with one extra column;
Previously, it would have had all the columns implied by "-j", plus
all the default columns, plus the extra column specified by "-O".

* Convert from home-grown linked lists to SIMPLEQ lists.

Discussed in tech-userlevel.


Revision tags: abandoned-netbsd-4-base
# 1.25 26-Jun-2005 christos

sprinkle a little const, and now everything compiles with WARNS=3


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-3-base netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.24 27-Mar-2004 simonb

Add support for the POSIX.2 "args" and "comm" keywords. "args" is just
an alias for "command", and "comm" shows just argv[0] and not the whole
argument list.

Fix for part of PR standards/11224.


# 1.23 27-Mar-2004 simonb

#define<TAB>


# 1.22 26-Mar-2004 simonb

KNF, ANSFify, de-__P, unC++ify, white space nits.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 06-Mar-2003 dsl

- add keywords for utime, stime and ctime (output sss.ssssss if small)
- fiddle with keyword table - mainly to keep width under 80 cols
- add -k keylist so sort output
- don't use logs to work out field width, get -MAXINT right
- user defined headers can be 1 char (actually they can be zero length)
so ?? in tty column isn't guaranteed to be wider than header
- remove some long long casts (compiles on sparc64 still)
- use kvm_openfiles(NULL, NULL, NULL, KVN_NO_FILES, ..) unless core file
specified,
(approved by christos)


# 1.19 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 nathanw_sa_before_merge fvdl_fs64_base nathanw_sa_base netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.18 24-Apr-2002 nathanw

Since kinfo_proc2 has many values that are 64-bit, ps needs to know
that they're 64-bit, and grab them out of memory appropriately. Otherwise,
big-endian systems get the wrong end of the 64-bit value and lose.

Keywords affected: inblk, majflt, minflt, msgrcv, msgsnd, nivcsw, nsigs,
nswap, nvcsw, and oublk.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base
# 1.17 06-Jun-2000 simonb

branches: 1.17.4;
Calculate field widths on the fly so that all columns line up nicely
and make more effective use of screen real estate when some columns
(eg USER and VSZ) didn't need the full default width.


Revision tags: minoura-xpg4dl-base
# 1.16 25-May-2000 simonb

branches: 1.16.2;
Use new sysctl/kvm interfaces. This will stop the "proc size mismatch"
errors when internal kernel structures change size. Also remove
the sgid bit - all live kernel data is accessed through the sysctl
interface.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base comdex-fall-1999-base
# 1.15 02-May-1999 mrg

oops, fix merge botch in previous..


# 1.14 02-May-1999 mrg

limit session to 6 chars. from Geoff Wing <gcw@pobox.com> and fixes his PR#7506


# 1.13 16-Apr-1999 christos

Add support for printing wide sigset_t properly.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.12 02-Oct-1996 ws

Fix p_nice vs. NZERO code.
Remove some unnecessary casts.
Remove an unused time format field.


Revision tags: netbsd-1-2-PATCH001 netbsd-1-2-RELEASE netbsd-1-2-BETA netbsd-1-2-base netbsd-1-1-PATCH001 netbsd-1-1-RELEASE netbsd-1-1-base
# 1.11 29-Sep-1995 cgd

add INT32 and UINT32 variable type specifiers. some of the variables
that are printed are of fixed size.


# 1.10 15-Aug-1995 cgd

Kenneth Stailey pointed out that his previous fix was incorrect. RE and SL
should be bounded at 127, not 99.


# 1.9 13-Aug-1995 cgd

as suggested in PR 1347, by Kenneth Stailey, make "RE" and "SL" fields
show up as two digits, max, displaying "99" if > 99. allow any field with
an unsigned value to be specified as printing that way (though right now
it's only used for RE and SL, which are both unsigned longs). This fix
is substantially different than that suggested in the PR.


# 1.8 18-May-1995 mycroft

Create and strvis(3) the argument and environment lists only as needed.
Do not keep extra copies around.


# 1.7 08-May-1995 cgd

add the ability to understand and print INT and UINT-sized variables.


# 1.6 21-Mar-1995 cgd

convert to new RCS id conventions.


Revision tags: netbsd-1-0-PATCH06 netbsd-1-0-PATCH05 netbsd-1-0-PATCH04 netbsd-1-0-PATCH03 netbsd-1-0-PATCH02 netbsd-1-0-PATCH1 netbsd-1-0-PATCH0 netbsd-1-0-RELEASE netbsd-1-0-base
# 1.5 08-May-1994 cgd

clean up import


# 1.4 01-Aug-1993 mycroft

Add RCS identifiers.


Revision tags: netbsd-0-9-RELEASE netbsd-0-9-BETA netbsd-0-9-ALPHA2 netbsd-0-9-ALPHA netbsd-0-9-base netbsd-0-8 netbsd-alpha-1
# 1.3 22-Mar-1993 cgd

changed "Id" to "Header" for rcsids


# 1.2 22-Mar-1993 cgd

added rcs ids to all files


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.27 20-Apr-2014 dholland

Use an enum type for PRINTMODE vs. WIDTHMODE. Compiler output diffs have
been checked.


# 1.26 02-Oct-2006 apb

branches: 1.26.40; 1.26.46; 1.26.60;
* When all columns are given null customised headers, the blank header
line is not printed at all. This is specified in P1003.1-2004
(SUSv3), and is useful.

* Customised headers may contain embedded space, commas and equals
signs. To specify multiple customised headers, use multiple -o or -O
options. This is specified (for "-o", not for "-O") in P1003.1-2004
(SUSv3), and is useful.

* When a column is given a null (blank) customised header, it keeps its
default minimum width. This is specified in P1003.1-2004 (SUSv3), and
seems harmless.

* Fix a bug that made it impossible to print the same keyword multiple
times, with different customised headers each time. (Previously, the
last customised header was used for all instances of the keyword.)

* Make the behaviour of "-O" more useful. The first -O option adds
the default keywords only if there have not yet been any formatting
options, and multiple -O options now insert their keywords in adjacent
positions. Now {ps -j -O %cpu} is like {ps -j} with one extra column;
Previously, it would have had all the columns implied by "-j", plus
all the default columns, plus the extra column specified by "-O".

* Convert from home-grown linked lists to SIMPLEQ lists.

Discussed in tech-userlevel.


# 1.25 26-Jun-2005 christos

sprinkle a little const, and now everything compiles with WARNS=3


# 1.24 27-Mar-2004 simonb

Add support for the POSIX.2 "args" and "comm" keywords. "args" is just
an alias for "command", and "comm" shows just argv[0] and not the whole
argument list.

Fix for part of PR standards/11224.


# 1.23 27-Mar-2004 simonb

#define<TAB>


# 1.22 27-Mar-2004 simonb

KNF, ANSFify, de-__P, unC++ify, white space nits.


# 1.21 07-Aug-2003 agc

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.


# 1.20 06-Mar-2003 dsl

- add keywords for utime, stime and ctime (output sss.ssssss if small)
- fiddle with keyword table - mainly to keep width under 80 cols
- add -k keylist so sort output
- don't use logs to work out field width, get -MAXINT right
- user defined headers can be 1 char (actually they can be zero length)
so ?? in tty column isn't guaranteed to be wider than header
- remove some long long casts (compiles on sparc64 still)
- use kvm_openfiles(NULL, NULL, NULL, KVN_NO_FILES, ..) unless core file
specified,
(approved by christos)


# 1.19 18-Jan-2003 thorpej

Merge the nathanw_sa branch.


# 1.18 24-Apr-2002 nathanw

Since kinfo_proc2 has many values that are 64-bit, ps needs to know
that they're 64-bit, and grab them out of memory appropriately. Otherwise,
big-endian systems get the wrong end of the 64-bit value and lose.

Keywords affected: inblk, majflt, minflt, msgrcv, msgsnd, nivcsw, nsigs,
nswap, nvcsw, and oublk.


# 1.17 06-Jun-2000 simonb

branches: 1.17.4;
Calculate field widths on the fly so that all columns line up nicely
and make more effective use of screen real estate when some columns
(eg USER and VSZ) didn't need the full default width.


# 1.16 25-May-2000 simonb

branches: 1.16.2;
Use new sysctl/kvm interfaces. This will stop the "proc size mismatch"
errors when internal kernel structures change size. Also remove
the sgid bit - all live kernel data is accessed through the sysctl
interface.


# 1.15 02-May-1999 mrg

oops, fix merge botch in previous..


# 1.14 02-May-1999 mrg

limit session to 6 chars. from Geoff Wing <gcw@pobox.com> and fixes his PR#7506


# 1.13 16-Apr-1999 christos

Add support for printing wide sigset_t properly.


# 1.12 02-Oct-1996 ws

Fix p_nice vs. NZERO code.
Remove some unnecessary casts.
Remove an unused time format field.


# 1.11 29-Sep-1995 cgd

add INT32 and UINT32 variable type specifiers. some of the variables
that are printed are of fixed size.


# 1.10 15-Aug-1995 cgd

Kenneth Stailey pointed out that his previous fix was incorrect. RE and SL
should be bounded at 127, not 99.


# 1.9 13-Aug-1995 cgd

as suggested in PR 1347, by Kenneth Stailey, make "RE" and "SL" fields
show up as two digits, max, displaying "99" if > 99. allow any field with
an unsigned value to be specified as printing that way (though right now
it's only used for RE and SL, which are both unsigned longs). This fix
is substantially different than that suggested in the PR.


# 1.8 18-May-1995 mycroft

Create and strvis(3) the argument and environment lists only as needed.
Do not keep extra copies around.


# 1.7 08-May-1995 cgd

add the ability to understand and print INT and UINT-sized variables.


# 1.6 21-Mar-1995 cgd

convert to new RCS id conventions.


# 1.5 08-May-1994 cgd

clean up import


# 1.4 01-Aug-1993 mycroft

Add RCS identifiers.


# 1.3 22-Mar-1993 cgd

changed "Id" to "Header" for rcsids


# 1.2 22-Mar-1993 cgd

added rcs ids to all files


# 1.1 21-Mar-1993 cgd

branches: 1.1.1;
Initial revision


# 1.1.1.2 08-May-1994 cgd

new ps, to match libkvm


# 1.1.1.1 21-Mar-1993 cgd

initial import of 386bsd-0.1 sources


# 1.16.2.1 22-Jun-2000 minoura

Sync w/ netbsd-1-5-base.


# 1.17.4.2 24-Apr-2002 nathanw

Parallel change to mainline: handle 64-bit values properly.


# 1.17.4.1 23-Apr-2002 nathanw

Add support for handling multi-LWP processes by selecting one LWP as
"representative" of the process.
Also add a -s option that prints a line for each LWP.
While I'm here, remove the /proc fallback code.


# 1.26.60.1 10-Aug-2014 tls

Rebase.


# 1.26.46.1 19-Aug-2014 tls

Rebase to HEAD as of a few days ago.


# 1.26.40.1 22-May-2014 yamt

sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")