Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(1)

nice(1)

getty(1M)

ps(1)  —  AT&T SYSTEM V

NAME

ps − report process status

SYNOPSIS

ps [ options ]

DESCRIPTION

ps prints information about active processes.  Without options, ps prints information about processes associated with the controlling terminal.  The output contains only the process ID, terminal identifier, cumulative execution time, and the command name.  Otherwise, the information that is displayed is controlled by the options. 

Some options accept lists as arguments.  Items in a list can be either separated by commas or else enclosed in double quotes and separated by commas or spaces.  Values for proclist and grplist must be numeric. 

The options are:

−e Print information about every process now running. 

−d Print information about all processes except session leaders. 

−a Print information about all processes most frequently requested: all those except process group leaders and processes not associated with a terminal. 

−j Print session ID and process group ID. 

−f Generate a full listing.  (See below for significance of columns in a full listing.) 

−l Generate a long listing.  (See below.) 

−c corefile Use the file corefile in place of /dev/mem. 

−n name Take argument signifying an alternate system name in place of /unix. 

−t termlist List only process data associated with the terminal given in termlist.  Terminal identifiers may be specified in one of two forms:  the device’s file name (e.g., tty04) or, if the device’s file name starts with tty, just the digit identifier (e.g., 04). 

−p proclist List only process data whose process ID numbers are given in proclist. 

−u uidlist List only process data whose (real) user ID number or login name is given in uidlist. In the listing, the numerical user ID will be printed unless you give the −f option, which prints the login name. 

−g grplist List only process data whose group leader’s ID number(s) appears in grplist.  (A group leader is a process whose process ID number is identical to its process group ID number. 

−s sesslist List information on all session leaders whose IDs appear in sesslist. 

−b bias List only process data whose current CPU assignment is given in bias.  Bias is a comma-separated list of CPU ID ranges.  For example: "1,3-5,7". 

Under the −f option, ps tries to determine the command name and arguments given when the process was created by examining the user block.  Failing this, the command name is printed, as it would have appeared without the −f option, in square brackets. 

The column headings and the meaning of the columns in a ps listing are given below; the letters f and l indicate the option (full or long, respectively) that causes the corresponding heading to appear; all means that the heading always appears.  Note that these two options determine only what information is provided for a process; they do not determine which processes will be listed. 

F(l) Flags (hexadecimal and additive) associated with the process

02 A kernel daemon. 

08 Process preempted while in kernel. 

40 User settable lock in core. 

80 Trace inheritance set for immediate children. 

S(l) The state of the process:

S Sleeping: process is waiting for an event to complete. 

R Runnable: process is on run queue. 

I Idle: process is being created. 

Z Zombie state: process terminated and parent not waiting. 

T Traced: process stopped by a signal because parent is tracing it. 

X SXBRK state: process is waiting for more primary memory. 

F FBS wait state: process is waiting on fbs scheduler. 

UID(f,l) The user ID number of the process owner (real user id) (the login name is printed under the −f option). 

PID(all) The process ID of the process (this datum is necessary in order to kill a process). 

PPID(f,l) The process ID of the parent process. 

R(f) The CPU ID of the processor the process is currently assigned to. 

C(f,l) Processor utilization for scheduling. 

PRI(l) The priority of the process.  Higher numbers mean more favorable priority. 

NI(l) Nice value + 20, used in priority computation.  For processes scheduled in a real-time scheduling policy this field will only contain the string "RT". 

ADDR(l) The memory address of the process. 

SZ(l) The size (in pages or clicks) of the swappable process’s image in main memory. 

WCHAN (l) The address of an event for which the process is sleeping, or in SXBRK state, (if blank, the process is running). 

STIME(f) The starting time of the process, given in hours, minutes, and seconds.  (A process begun more than twenty-four hours before the ps inquiry is executed is given in months and days.) 

TTY(all) The controlling terminal for the process (the message, ?, is printed when there is no controlling terminal). 

TIME(all) The cumulative execution time for the process. 

COMMAND (all)
The command name (the full command name and its arguments are printed under the −f option). 

A process that has exited and has a parent, but has not yet been waited for by the parent, is marked <defunct>. 

SECURITY FEATURES

The following security features are in effect on systems running CX/SX configured to B1 security. 

Because ps has access to the address space of the kernel (via /dev/mem, see mem(7)), the command is necessarily part of the Trusted Computing Base.  The standard command provides information about all UNIX processes without regard to the security implications of release of this information.  This includes the names of commands run, the arguments of the commands, and (indirectly) the security level or group to which the processes belong. 

The enhanced ps command restricts the output of the command to processes owned and dominated by the user.  See intro(2SX) for a definition of “dominate”.  No information can be gained directly or indirectly about processes belonging to another user or to the system (e.g. root or other administrative login id.) 

The superuser can list the status of all processes.  Users, other than superuser, are warned that output from the ps command is restricted by security policy.  Further the option -n, which changes the default namelist, is restricted to superuser. 

NOTES

If the high resolution timing facility is configured into the currently executing kernel, TIME will exclude or include time spent servicing interrupts, depending on what the system timing mode is set to. See hirestmode(2) and CX/UX Programmer’s Guide for more information on the high resolution timing facility. 

FILES

/dev   

/dev/sxt/∗   

/dev/tty∗   

/dev/kmem kernel virtual memory

/dev/swap the default swap device

/dev/mem memory

/etc/passwd UID information supplier

/tmp/ps_data
internal data structure

/unix system namelist

SEE ALSO

kill(1), nice(1). 
getty(1M) in the CX/UX Administrator’s Reference Manual. 

NOTES

Things can change while ps is running; the snap-shot it gives is true only for a split-second, and it may not be accurate by the time you see it.  Some data printed for defunct processes is irrelevant. 

If no termlist, proclist, uidlist, or grplist is specified, ps checks stdin, stdout, and stderr in that order, looking for the controlling terminal and will attempt to report on processes associated with the controlling terminal.  In this situation, if stdin, stdout, and stderr are all redirected, ps will not find a controlling terminal, so there will be no report. 

On a heavily loaded system, ps may report an lseek error and exit.  ps may seek to an invalid user area address: having obtained the address of a process’ user area, ps may not be able to seek to that address before the process exits and the address becomes invalid. 

ps −ef may not report the actual start of a tty login session, but rather an earlier time, when a getty was last respawned on the tty line. 

CX/UX User’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026