ps - Display process status

Synopsis

ps [-Aaefjlt] [ -o format ] [ -p pidlist ] [ -s sbslist ] [ -u userlist ]

Description

The ps utility displays information about processes. The output from ps can include the following fields:

CGROUP
The current primary group profile of the process.

CMD
Program, menu, or command most recently run by the process.

CUSER
The current user profile of the process.

DEVICE
Name of the device description object that is associated with the process.

ETIME
The elapsed time since the process started. The time is displayed in the format [[dd-]hh:]mm:ss where dd is the number of days, hh is the number of hours, mm is the number of minutes, and ss is the number of seconds.

FUNCTION
Program, menu, or command most recently run by the process.

JOBID
Qualified job name of the process. The qualified job name is a string in the form number/user/name. The number is a six-digit decimal number, user is the user profile under which the job was started, and name is the name of job.

JOBNAME
Job name component of the qualified job name.

JOBNUM
Job number component of the qualified job name.

NTHREADS
The number of threads currently running in the process as a decimal number.

PCPU
The ratio of CPU time used recently to CPU time available, expressed as a percentage.

PGID
Process group ID number as a decimal number.

PID
Process ID number as a decimal number.

PPID
Parent process ID number as a decimal number.

PRI
Current priority of the process as a decimal number. Lower numbers mean a higher priority.

SBS
Subsytem in which the process is running.

STATUS
Current status of the process.

STIME
Date and time the process was started. By default, the date and time is displayed in the format mm-dd-yyyy hh:nn:ss where mm is the month, dd is the day, yyyy is the year, hh is the hour, nn is the minute, and ss is the second. If the LC_TIME environment variable is set, the date and time is displayed with the format specified by the d_t_fmt keyword in the LC_TIME category of the specified locale.

THCOUNT
The number of threads currently running in the process as a decimal number.

TIME
CPU time used by the process in seconds. The time is displayed in the format [[dd-]hh:]mm:ss where dd is the number of days, hh is the number of hours, mm is the number of minutes, and ss is the number of seconds.

TMPSZ
The amount of temporary storage used by the process in megabytes as a decimal number.

TYPE
The type of the process.

USER
User profile component of the qualified job name.

UID
User id number corresponding to the user profile component of the qualified job name.

By default, ps displays the PID, DEVICE, TIME, FUNCTION, STATUS, and JOBID fields about processes owned by the current user. Use the -o option to select the fields displayed by ps.

To display information about other processes, you must have *JOBCTL special authority.

Options

-a
Display information for all processes associated with a 5250 terminal.
-A
Display information for all processes. This includes processes that are active, on a job queue, or on an output queue.
-e
Include active processes in the output.
-f
Display a full listing. The output includes the USER, PID, PPID, STIME, DEVICE, TIME and FUNCTION fields.
-j
Include processes on a job queue in the output.
-l
Display a long listing. The output includes the USER, PID, PPID, PRI, STATUS, JOBID, STIME, DEVICE, TIME and FUNCTION fields.
-o format
Display information according to the format specification given in format. Multiple -o options can be specified.
-p pidlist
Write information for processes whose process ID numbers are specified in pidlist. The pidlist must be a single argument in the form of a blank- or comma-separated list.
-s sbslist
Write information for processes running in the subsystems specified in sbslist. The sbslist must be a single argument in the form of a blank- or comma-separated list.
-t
Include processes on an out queue in the output.
-u userlist
Write information for processes whose user ID numbers or user names are specified in userlist. The userlist must be a single argument in the form of a blank- or comma-separated list.

Environment Variables

ps is affected by the following environment variables:

LANG
Provides a default value for locale categories that are not specifically set with a variable starting with LC_.
LC_TIME
Defines the output format for date and time attributes.

Exit Status

Related information