Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   procps    ( 1 )

сообщить снимок текущих процессов (report a snapshot of the current processes.)

PROCESS SELECTION BY LIST

These options accept a single argument in the form of a blank-separated or comma-separated list. They can be used multiple times. For example: ps -p "1 2" -p 3,4

-123 Identical to --pid 123.

123 Identical to --pid 123.

-C cmdlist Select by command name. This selects the processes whose executable name is given in cmdlist. NOTE: The command name is not the same as the command line. Previous versions of procps and the kernel truncated this command name to 15 characters. This limitation is no longer present in both. If you depended on matching only 15 characters, you may no longer get a match.

-G grplist Select by real group ID (RGID) or name. This selects the processes whose real group name or ID is in the grplist list. The real group ID identifies the group of the user who created the process, see getgid(2).

-g grplist Select by session OR by effective group name. Selection by session is specified by many standards, but selection by effective group is the logical behavior that several other operating systems use. This ps will select by session when the list is completely numeric (as sessions are). Group ID numbers will work only when some group names are also specified. See the -s and --group options.

--Group grplist Select by real group ID (RGID) or name. Identical to -G.

--group grplist Select by effective group ID (EGID) or name. This selects the processes whose effective group name or ID is in grplist. The effective group ID describes the group whose file access permissions are used by the process (see getegid(2)). The -g option is often an alternative to --group.

p pidlist Select by process ID. Identical to -p and --pid.

-p pidlist Select by PID. This selects the processes whose process ID numbers appear in pidlist. Identical to p and --pid.

--pid pidlist Select by process ID. Identical to -p and p.

--ppid pidlist Select by parent process ID. This selects the processes with a parent process ID in pidlist. That is, it selects processes that are children of those listed in pidlist.

q pidlist Select by process ID (quick mode). Identical to -q and --quick-pid.

-q pidlist Select by PID (quick mode). This selects the processes whose process ID numbers appear in pidlist. With this option ps reads the necessary info only for the pids listed in the pidlist and doesn't apply additional filtering rules. The order of pids is unsorted and preserved. No additional selection options, sorting and forest type listings are allowed in this mode. Identical to q and --quick-pid.

--quick-pid pidlist Select by process ID (quick mode). Identical to -q and q.

-s sesslist Select by session ID. This selects the processes with a session ID specified in sesslist.

--sid sesslist Select by session ID. Identical to -s.

t ttylist Select by tty. Nearly identical to -t and --tty, but can also be used with an empty ttylist to indicate the terminal associated with ps. Using the T option is considered cleaner than using t with an empty ttylist.

-t ttylist Select by tty. This selects the processes associated with the terminals given in ttylist. Terminals (ttys, or screens for text output) can be specified in several forms: /dev/ttyS1, ttyS1, S1. A plain "-" may be used to select processes not attached to any terminal.

--tty ttylist Select by terminal. Identical to -t and t.

U userlist Select by effective user ID (EUID) or name. This selects the processes whose effective user name or ID is in userlist. The effective user ID describes the user whose file access permissions are used by the process (see geteuid(2)). Identical to -u and --user.

-U userlist Select by real user ID (RUID) or name. It selects the processes whose real user name or ID is in the userlist list. The real user ID identifies the user who created the process, see getuid(2).

-u userlist Select by effective user ID (EUID) or name. This selects the processes whose effective user name or ID is in userlist.

The effective user ID describes the user whose file access permissions are used by the process (see geteuid(2)). Identical to U and --user.

--User userlist Select by real user ID (RUID) or name. Identical to -U.

--user userlist Select by effective user ID (EUID) or name. Identical to -u and U.