Table of Contents
lps - show process data
lps [ -s ] [ -c ] [ -u ] [ -L proclimit]
[ min-uid [ max-uid ] ]
lps shows process data in SPACE separated columns and is primarily
designed to be used in scripts.
With "min-uid" and "max-uid" a range of effective user ids of processes can
be specified.
The twelve columns of lps output are:
- age
- The process age (default unit: minutes). Don’t mix it up with "running
time"!
- pid
- The process ID.
- user
- The user name of the effective user id.
If the user name cannot be retrieved then the effective user id is printed.
- RSS
- The resident set size in KB, taken from /proc/pid/stat.
- VPID
- The virtual
process ID, taken from /proc/pid/stat. On systems not supporting VPID "0"
will be printed.
- CTID/FNID
- The virtual private server ID (OpenVZ), taken
from /proc/pid/stat. On systems not supporting CTID "0" will be printed.
- procname
- The name of the process as shown in /proc/pid/stat.
- sockusage
- If the process has at least one open socket then "socket" will be printed
in this column.
- root
- The (ch)root of the process in fs as shown in /proc/pid/root.
- cwd
- The working dir of the process in fs as shown in /proc/pid/cwd.
- exe
- The file executable of the process as shown in /proc/pid/exe.
- cmdline
- The
complete process command line as shown in /proc/pid/cmdline.
- -s
- Show process age in seconds instead of minutes.
- -c
- Suppress normal output.
Show total count of processes.
- -u
- Suppress normal output. Show up to 3 users
with topmost process counts.
- -L proclimit
- Suppress normal output. Show top
user if top user’s procs reaches proclimit.
nagios-check-longuserprocesses(1)
http://downloads.tuxad.de/
Show process data with effective user
id >= 1 (all processes except root processes) and sort output by process
age: $ lps 1 | sort -n
Step through process list:
$ lps -s 10000|while read AGE PID USER RSS VPID
CTID PROCNAME MUCHMOREVARS;do if [ $AGE ...
The maximum internal absolute pathname length is 16384 chars.
Frank
Bergmann, http://www.tuxad.com
Table of Contents