ps: add -q/q/--quick-pid option

This commit introduces a new option q/-q/--quick-pid
to the 'ps' command. The option does a similar job
to the p/-p/--pid option (i.e. selection of PIDs
listed in the comma separated list that follows
the option), but the new option is optimized
for speed.
In cases where users only need to specify a list
of PIDs to be shown and don't need other selection
options, forest type output and sorting options,
the new option is recommended as it decreases
the initial processing delay by avoiding reading
the necessary information from all the processes
running on the system and by simplifying
the internal filtering logic.
This commit is contained in:
Jaromir Capik
2014-07-10 21:14:02 +02:00
parent 6cd8691720
commit e751606fcc
6 changed files with 131 additions and 4 deletions

View File

@@ -41,6 +41,7 @@
#define SEL_SESS 12
#define SEL_COMM 13
#define SEL_PPID 14
#define SEL_PID_QUICK 15
/* Since an enum could be smashed by a #define, it would be bad. */
#define U98 0 /* Unix98 standard */ /* This must be 0 */