nps(1) DG/UX R4.11MU05 nps(1)
NAME
nps, ps - report process status
SYNOPSIS
nps [ -acdefjlL ] [ -t termlist ] [ -u uidlist ]
[ -p proclist ] [ -g grplist ] [ -s sidlist ]
[ -o collist ] [ -WL ] [ -WC ]
DESCRIPTION
nps prints certain information about active processes. Without any
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 displayed is
controlled by the selection of options.
Options using lists as arguments can specify them in two forms: a
list of identifiers separated by commas, 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).
-j Print session ID and process group ID for each process
listed.
-l Generate a long listing (see below).
-L Print process ID, thread ID, terminal identifier,
cumulative execution time and command name information
for each LWP (thread/ light weight process) listed. When
used in conjunction with other options, causes
information to be on a per LWP (instead of on a per
process) basis.
-WL Print process ID, LWP ID, a multi-character state
(Kernel-User-Special), CPU upon which the LWP is running,
the number of LWPs joining, the LWP join target, any
mutex upon which the LWP is waiting, any condition upon
which the LWP is waiting, the cumulative execution time
(for globally scheduled LWPs) and command name
information for each LWP listed. This option cannot be
used in conjunction with other column-formatting options
(-cjlfLo and -WC). When used in conjunction with other
process-selecting options, causes information to be on a
per LWP basis.
-WC Print local exec depth and scheduling class name for each
process listed. See the discussion on LEDEPTH and SCNAME
columns below and dgcsfctl(2) for more info.
-o collist Generate a listing containing only the columns specified.
This option cannot be used in conjunction with other
column-formatting options (-cjlfLW). Identifiers in
collist can have values assigned to them: [valid column
identifiers are described below]
column use the default header text for column
column= do not display a header for column;
minimum column width is the width of
default header
column=colhdr use colhdr as header text for column
-c Print scheduling class and priority for each process
listed. If this option is specified, the processor
utilization and nice value columns are not listed. It is
intended that in a future release of DG/UX this option
will be removed, and that the output format produced by
using this option will become the default format.
-t termlist List data only about the processes associated with the
terminals given in termlist. Terminal identifiers may be
specified as: the device's filename (e.g., tty04) or if
the device's filename starts with tty, just the digit
identifier (e.g., 04).
-p proclist List data only about processes whose process ID numbers
are given in proclist.
-u uidlist List data only about processes whose user ID numbers or
login names are given in uidlist. In the listing, the
numerical user ID is printed unless the -f option is
used, in which case the login name will be printed.
-g grplist List data only about processes whose process group
leaders are given in grplist.
-s sidlist List data only about processes whose session leaders are
given in sidlist.
The column headings and the meaning of the columns in a nps listing
are given below; the letters f,l, L, WL and WC indicate the option
(full, long, LWP info, DG-specific LWP info or DG-specific Cluster
info) that causes the corresponding heading to appear; & indicates
that both options must be used in order for a column to appear; all
means that the heading always appears. Note that these four options
determine only what information is provided for a process/LWP; they
do not determine which processes/LWPs will be listed.
S (l) The state of the process:
- Non-existent;
S Sleeping;
W Waiting;
R Running;
I Intermediate;
Z Terminated;
T Stopped;
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; you can kill a
process if you know this datum.
PPID (f,l) The process ID of the parent process.
LWP (L,WL) The ID of the LWP.
NLWP (f) The number of LWPs active in the process.
PGID (f,l,L) The group ID of the process. Only printed when
-j option is used.
SID (f,l,L) The session ID of the process. Only printed when
-j option is used.
CLS (f,l,L) Scheduling class. Only printed when -c option is
used. The value pFF indicates POSIX 1003.4 Draft
12 specified FIFO fixed scheduling class. The
value pRR indicates POSIX RR (round robin) fixed
scheduling class. The value dTS indicates the
DG/UX Timeshare scheduling class. The value dLF
indicates the DG/UX LIFO scheduling class and the
value dFF indicates the DG/UX FIFO scheduling
class.
PRI (l) The priority of the process; higher numbers mean
better priority.
RSS (l) The resident set size in kilobytes.
SZ (l) The virtual address size in kilobytes.
WCHAN (l) The event for which the process is waiting or
sleeping; if blank, the process is running. This
column is replaced by MUTEX column when -l used
with -L.
K U SPECL (WL) The state of the LWP. The K column refers to
kernel space, the U column refers to user space
and the SPECL column displays special annotations
about the LWP state. See dglstate column below
for more information.
CPU (WL) The cpu id, "-" when the LWP is not on a cpu.
NJOIN (WL) The number of LWPs joining an LWP, '-' if no
joiners.
JNTARG (WL) The LWP ID of the LWP being joined, '-' if not
joining.
MUTEX (l&L,WL) The hexadecimal address of the mutex upon which
the LWP is waiting or the mutex associated with
the condition variable if waiting on a condition,
'-' otherwise.
CONDVAR (WL) The hexadecimal address of the conditional
variable upon which the LWP is waiting, '-' if
the LWP is not waiting on a condition.
LEDEPTH (WC) On a system with the Cluster package loaded and
set up, this column represents the local exec
depth with respect to class scheduling. A value
greater than zero signifies that any exec done by
the process can only execute on the current node.
On a system which does not have the Cluster
package loaded and set up, the value is always 0.
SCNAME (WC) On a system with the Cluster package loaded and
set up, this column represents the scheduling
class of which the process is a member. The
value will be a class name as defined by an
administrator (or the default scheduling class
name, if no user classes are defined). On a
system which does not have the Cluster package
loaded and set up, the value is the default
scheduling class name.
STIME (f) Starting time of the process, in
hours:minutes:seconds.
TTY (f,l,L) The controlling terminal for the process.
TIME (f,l) The cumulative execution time for the process, in
minutes:seconds. Replaced by LTIME when -f/-l
used with -L.
LTIME (L,WL) The total cpu time for globally scheduled LWPs in
mm:ss format, '-' for locally scheduled LWPs.
CMD (all) The command name; the full command name and its
arguments are printed under the -f option.
The -o option gives the user more control over what information is
displayed with nps. With this option, the user can choose which
columns (and their header text) to include in the output. The
following column names are available for use with -o:
column default default description
header width
flag F 1 flags (octal and additive)
associated with a process:
1 being traced
2 bound
3 not bound
state S 1 state of the process
lstate S 1 state abbreviation for the
simple state of the LWP:
O on cpu
S waiting in sleep
W waiting on a condition
R running (i.e. eligible)
X exiting
T stopped
dglstate K U SPECL 9 state abbreviations for the
state of the LWP in kernel
and user space and also
displays special annotations.
In kernel (K) space:
R running
X exiting
W waiting
In user (U) space:
R running
X exiting
W waiting
S sleeping
The special (SPECL) annotations:
Y yielded
I interrupted
T stopped
D detached
C canceled
cpu CPU 3 cpu id, "-" when the LWP is not
on a cpu
uid UID 5 user id of the process owner
uname UID 8 user name of the process owner
pid PID 5 process id
ppid PPID 5 parent process id
lwpid LWP 5 id of the LWP
nlwp NLWP 4 number of LWPs
pgid PGID 5 process group id
sid SID 5 process session id
putil C 2 processor utilization,
represented by an integer
from 0 to 8. This number
reflects the sum of a process'
interactive level and its starving
level . A process with 8
is both highly interactive and highly
starving. A process with 0 is
not considered interactive or
starving, but uses mostly CPU
resources
sclass CLS 4 scheduling class
lsclass LCLS 4 scheduling class of the LWP;
G/L appended for globally/
locally scheduled LWPs,
respectively
prior PRI 4 process priority
lprior LPRI 4 scheduling priority of LWP.
Higher values indicate better
priority. The priority depends
upon whether the LWP was locally
or globally scheduled
nice NI 2 nice value of the process
addr ADDR 8 process memory address
sz SZ 6 virtual address size in
kilobytes
wchan WCHAN 8 event on which the process is
waiting or sleeping; '-' if
the process is not waiting
condvar CONDVAR 8 hexadecimal address of the
conditional variable upon which
the LWP is waiting; '-' if the
LWP is not waiting on a
condition
mutex MUTEX 8 mutex address if the LWP is
waiting upon a mutex;'-' if
the LWP is not waiting
stime STIME 8 start time of the process
tty TTY 7 controlling terminal of the
process
time TIME 5 cumulative execution time of
the process in mm:ss format
ltime LTIME 5 total cpu time for globally
scheduled LWPs in mm:ss format;
'-' for locally scheduled LWPs
etime ETIME 14 elapsed time since process
started in [dd-]hh:mm:ss.ff
format
cmd CMD 8 command name
args CMD 0 command name and its arguments
utime UTIME 14 user cpu time in
[dd-]hh:mm:ss.ff format
lutime LUTIME 11 user cpu time in
[dd-]hh:mm:ss.ff format for a
globally scheduled LWP; '-'
for locally scheduled LWPs
systime SYSTIME 14 system cpu time in
[dd-]hh:mm:ss.ff format
lsystime LSYSTIME 11 system cpu time in
[dd-]hh:mm:ss.ff format for a
globally scheduled LWP;'-' for
locally scheduled LWPs
swap SWAP 6 reserved anonymous pages in
kilobytes
emul EMUL 6 emulated instruction count
fpx FPX 6 fp exception count
ruid RUID 5 real uid
runame RUID 8 real user name
suid SUID 5 saved uid
suname SUID 8 saved user name
rgid RGID 5 real gid
rgname RGID 8 real group name
sgid SGID 5 saved gid
sgname SGID 8 saved group name
nbind NBIND 6 times bound
swrit SWRIT 6 socket writes
sread SREAD 6 socket reads
nsig NSIG 6 signals caught
vswtch VSWTC 6 voluntary context switches
lvswtch LVSWTCH 7 voluntary context switches
associated with a globally
scheduled LWP; '-' for locally
scheduled LWPs
nswtch NSWTC 6 involuntary context switches
lnswtch LNSWTCH 7 involuntary context switches
associated with a globally
scheduled LWP; '-' for locally
scheduled LWPs
jntarg JNTARG 6 LWP ID of LPW being joined,
'-' if not joining
njoin NJOIN 5 number of LWPs joining the LWP,
'-' if no joiners
timeout TIMEOUT 9 timeout value in mm:ss.fff
format on a LWP if the LWP is
in a valid timeout state, else
'-'
timeleft TIMELEFT 9 time left in mm:ss.fff format on
a LWP timeout if the LWP is in a
valid timeout state, else '-'
rss RSS 6 resident set size in kilobytes
xrss XRSS 6 sum of shared program file, data
file and shared anonymous pages
in kilobytes
drss DRSS 6 private unshared or COW-shared
anonymous pages excluding stack
pages in kilobytes
srss SRSS 6 private unshared or COW-shared
stack pages in kilobytes
hfault HFAULT 6 hard page faults
sfault SFAULT 6 soft page faults
maxrss MAXRSS 6 max rss in kilobytes
fsiops FSIOPS 6 file system input operations
fsoops FSOOPS 6 file system output operations
ledepth LEDEPTH 6 local exec depth; set to 0 on a system
which does not have the Cluster package
loaded and set up
scname SCNAME 8 scheduling class of which a process is
a member; set to the default scheduling
class on a system which does not have the
Cluster package loaded and set up
EXAMPLES
$ nps
Prints information about active processes associated with the current
terminal. Lists the process ID, the tty number of the controlling
terminal.
$ nps -u xyz,abc
Prints information about active processes belonging to the login
names "xyz" and "abc". Lists the process ID, tty number, time the
process took to execute, and the command.
$ nps -ef
Prints information on all active processes. Lists the user ID,
process ID, process ID of the parent process, scheduling information,
process starting time, tty number, execution time for the process,
and the command and its options.
$ nps -fL
Prints information about each LWP for the active processes associated
with the current terminal in full format. Lists the UID associated
with, PID, PPID and the LWP ID for each LWP, the number of LWPs for
the process, process start time, tty number, total cpu time if the
LWP is globally scheduled and the command.
$ nps -eWL
Prints information about each LWP for all active processes. Lists
the PID, LWP ID, kernel and user space states of the LWP, any special
states of the LWP, the cpu id if on a cpu, number of LWPs joining the
LWP, LWP ID of the LWP being joined, mutex address, condition
variable address, total cpu time if LWP is globally scheduled and the
command. The following column listing can be used as an argument to
-o to create an equivalent listing:
pid,lwpid,dglstate,cpu,njoin,jntarg,mutex,condvar,ltime,cmd
$ nps -opid,lwpid,dglstate,cpu,njoin,jntarg,mutex,condvar=COND, \
ltime,args
Prints equivalent output to nps -WL, but changes the default header
text for the condvar column to COND and uses "args" instead of "cmd"
to print out the command along with its arguments.
FILES
/etc/passwd Supplies UID information
/etc/psdata Internal data structure
/dev Searched to find terminal (tty) names
SEE ALSO
ops(1), acctcom(1), kill(1), nice(1), who(1), dgcsfctl(2).
BUGS
Things can change while nps is running; the picture it gives is only
a close approximation to reality. Some data printed for defunct
processes is irrelevant.
NOTES
nps is a new version of ps that provides capabilities unavailable in
previous versions. This version will eventually become the default
version of ps.
DG/UX nps extracts information from the currently running kernel.
The -n option is not implemented.
Multiple threads might be shown to have the same cpu ID. This occurs
because it cannot be guaranteed that the snapshot of information
displayed by nps for each LWP will correspond to the same moment in
time.
Whenever an LWP-specific column heading is used as an argument to the
-o option, the information displayed by nps is on a per LWP (instead
of a per process) basis. The LWP-specific columns include:
lstate, dglstate, lwpid, lsclass, lprior,
ltime, lutime, lsystime, condvar, mutex,
jntarg, njoin, timeout, timeleft, lvswtch,
lnswtch, cpu
Licensed material--property of copyright holder(s)