procps/ps
Craig Small bcb837b8c7 First cut at subset=pid proc mount handling
The procfs mount option subset=pid only shows the processes, not things
such as /proc/stat etc.

For certain programs, this should mean they still work, but have reduced
functionality. This is the first cut at some of them.

pgrep - Removed always loading uptime which we never used anyway. The
program now works fine unless we use --older. Add note in man page
stating it will silently fail.

ps - Load boot time and memory total only when required instead of
always. Changed the error messages to something the user actually
cares about "can't get system boot time" vs "create a structure".
Works for most fields except starts and percent memory.

uptime - Give more useful error messages if uptime not available.

vmstat - move header generation after testing for required proc
files, makes the default output more consistent with the rest
of the options.

References:
 procps-ng/procps#227
 https://www.kernel.org/doc/html/latest/filesystems/proc.html#chapter-4-configuring-procfs
 6814ef2d99

Signed-off-by: Craig Small <csmall@dropbear.xyz>
2021-12-16 20:36:00 +11:00
..
common.h ps: added 2 new fields for displaying autogroup values 2021-08-09 22:00:23 +10:00
COPYING license: update FSF addresses 2012-03-04 08:04:24 +11:00
display.c ps: ignore SIGURG 2021-10-14 07:50:37 +11:00
global.c ps: added 2 new fields for displaying autogroup values 2021-08-09 22:00:23 +10:00
HACKING docs: remove old information from HACKING 2012-01-13 22:42:38 +01:00
help.c library: cleanup of library includes 2016-04-16 17:03:57 +10:00
output.c First cut at subset=pid proc mount handling 2021-12-16 20:36:00 +11:00
parser.c ps: eliminated inadvertent trailing double semi-colons 2020-04-10 14:37:15 +10:00
ps.1 docs: Fix comment for priority 2021-09-15 21:36:40 +10:00
regression procps 010114 2002-02-01 22:47:29 +00:00
select.c ps: Match on truncated 16 char for -C 2020-09-24 22:19:11 +10:00
sortformat.c all: make buildable again for new 'misc.h' header file 2021-01-21 17:30:25 +11:00
stacktrace.c misc: just eliminate several 'unused' warning messages 2016-07-26 07:59:48 +10:00