PS(1) HP-UX 5.0 PS(1) NAME ps - report process status SYNOPSIS ps [-edafl] [-c corefile] [-s swapdev] [-n namelist] [-t tlist] [-p plist] [-u ulist] [-g glist] HP-UX COMPATIBILITY Level: HP-UX/NUCLEUS Origin: System V and HP DESCRIPTION Ps prints certain information about active processes. Without options, information is printed about processes associated with the current terminal. The output consists of a short listing containing only the process ID, terminal identifier, cumulative execution time, and the command name. Otherwise, the information that is displayed is controlled by the selection of options. Options using lists as arguments can have the list specified in one of two forms: a list of identifiers separated from one another by a comma, or a list of identifiers enclosed in double quotes and separated from one another by a comma and/or one or more spaces. The options are: -e Print information about all processes. -d Print information about all processes, except process group leaders. -a Print information about all processes, except process group leaders and processes not associated with a terminal. -f Generate a full listing. (See below for meaning of columns in a full listing.) -l Generate a long listing. (See below.) -c corefile Use the file corefile in place of /dev/mem. -s swapdev Use the file swapdev in place of /dev/swap. This is useful when examining a corefile; a swapdev of /dev/null will cause the user block to be zeroed out. -n namelist The argument will be taken as the name of an alternate system namelist file in place of /hp- ux. -t termlist Restrict listing to data about the processes associated with the terminals 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 Restrict listing to data about processes whose process ID numbers are given in proclist. -u uidlist Restrict listing to data about processes whose user ID numbers or login names are given in uidlist. In the listing, the numerical user ID will be printed unless the -f option is used, in which case the login name will be printed. -g grplist Restrict listing to data about processes whose process group leaders are given in grplist. 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) 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 (octal and additive) associated with the process: 0 swapped; 1 in core; 2 system process; 4 locked in core (e.g., for physical I/O); 10 being swapped; 20 being traced by another process; 40 another tracing flag; S (l) The state of the process: 0 non-existent; S sleeping; W waiting; R running; I intermediate; Z terminated; T stopped; X growing. UID (f,l) The user ID number of the process owner; the login name is printed under the -f option. PID (all) The process ID of the process; it is possible to kill a process if you know this datum. PPID (f,l) The process ID of the parent process. C (f,l) Processor utilization for scheduling. PRI (l) The priority of the process; higher numbers mean lower priority. NI (l) Nice value; used in priority computation. ADDR (l) The memory address of the process, if resident; otherwise, the disk address. SZ (l) The size in blocks of the core image of the process. WCHAN (l) The event for which the process is waiting or sleeping; if blank, the process is running. STIME (f) Starting time of the process. TTY (all) The controlling terminal for the process (without the initial "tty", if any). TIME (all) The cumulative execution time for the process (reported in the form "min:sec"). CMD (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 (see "zombie process" in exit(2)). Under the -f option, ps tries to determine the command name and arguments given when the process was created by examining memory or the swap area. Failing this, the command name, as it would appear without the -f option, is printed in square brackets. To make ps output safer to display and easier to read, all control characters in the CMD field are mapped to "visible" equivalents. These are of the form ^C where the original character was in the range 0 - 037 and c is that value plus 040. FILES /hp-ux system namelist /dev/mem memory /dev/swap the default swap device /etc/passwd supplies UID information /etc/ps_data internal data structure /dev searched to find terminal (``tty'') names SEE ALSO acctcom(1), kill(1), nice(1), exec(2), exit(2) lockf(2), msgop(2), semop(2). BUGS Things can change while ps is running; the picture it gives is only a snapshot in time. Some data printed for defunct processes are irrelevant. If two special files for terminals are located at the same select code, they are reported in the order in which they appear in /dev, not in alphabetical order.