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
The twelve columns of lps output are:
- The process age (default unit: minutes). Don’t mix it up with "running
- The process ID.
- The user name of the effective user id.
If the user name cannot be retrieved then the effective user id is printed.
- The resident set size in KB, taken from /proc/pid/stat.
- The virtual
process ID, taken from /proc/pid/stat. On systems not supporting VPID "0"
will be printed.
- The virtual private server ID (OpenVZ), taken
from /proc/pid/stat. On systems not supporting CTID "0" will be printed.
- The name of the process as shown in /proc/pid/stat.
- If the process has at least one open socket then "socket" will be printed
in this column.
- The (ch)root of the process in fs as shown in /proc/pid/root.
- The working dir of the process in fs as shown in /proc/pid/cwd.
- The file executable of the process as shown in /proc/pid/exe.
complete process command line as shown in /proc/pid/cmdline.
- Show process age in seconds instead of minutes.
- Suppress normal output.
Show total count of processes.
- 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.
Show process data with effective user
id >= 1 (all processes except root processes) and sort output by process
$ 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.
Table of Contents