SPS
Section: Misc. Reference Manual Pages (LOCAL)
Index
Return to Main Contents
NAME
sps - show process status
SYNOPSIS
sps [ -defgijkoqrslvwyABDFNPSTUWZ ] [
process . . | tty . . | user . . . ]
DESCRIPTION
Sps reports information concerning system processes.
It shows the current state of any process by
listing information such as ownership, CPU time usage, memory usage
and disc activity.
Sps should be used in preference to ps(1)
as it is faster and the output is easier to understand.
OPTIONS
By default, sps prints basic information about one's own processes.
The various options described below select other processes or make
sps more verbose.
Upper case options select processes to be described.
Lower case options specify the format of the output.
For instance, the options Bv specify that sps
should list "busy" processes in a verbose format.
Unless there is any conflict, lower case options may be used
instead of upper case options, and vice versa.
The following options specify the format of the listed output -
- -d
-
List output reflecting how each process affects the
disc and paging activity of the system.
- -e
-
List the environment passed to each process.
- -f
-
Include the process-id of the parent of each process.
- -g
-
Include the process group of each process.
- -o
-
Avoid looking at the swap device (/dev/drum). This tends to make sps
run faster, although no information concerning swapped processes
can be obtained.
- -q
-
By default, sps
lists the sum of the user plus system times under the
Time and Child fields. This option forces sps
to list only the user times.
- -r
-
Repeat the output indefinitely.
If the next argument is numeric, sps repeats the output with that
many seconds delay between each repetition.
Otherwise the output is repeated with no delay.
- -l
-
- -v
-
List additional information in a verbose format. See below.
- -w
-
List output in a wide format. This option forces sps
to print all the command arguments, even if doing so extends the output
beyond one line.
- -y
-
Show the status of each terminal line.
The following options specify which processes are to be described -
- -A
-
List all processes.
- -B
-
List busy processes. A process is considered to be busy
if it is immediately runnable or awaiting a fast event such as disc I/O.
- -D
-
List detached processes.
- -F
-
List foreground processes.
- -N
-
Show no processes at all. Only the summary line is printed.
- -P
-
List only processes whose identifiers are specified in the following arguments.
- -S
-
List stopped processes.
- -T
-
List only processes attached to the following specified terminals.
- -U
-
List only processes belonging to the following specified users.
- -W
-
List waiting processes.
- -Z
-
List zomby (exiting) processes.
The following are miscellaneous options -
- -i
-
Initialise sps.
This is necessary if new users are added to the password file,
or if a new version of UNIX is installed.
Sps builds a new information file summarising pertinent information
read from the password file (/etc/passwd), the executable kernel image
(/vmunix) and the directory of tty devices (/dev).
See also the -j and -s options.
- -j
-
Specify an information file other than the default (/etc/spsinfo).
The next argument is taken to be the name of a suitable information file.
If the -i flag is also specified, sps builds a
new information file with the given name.
Otherwise, sps reads previously created summarising information
from that file.
- -k
-
Use a specific disc file rather than the default physical
memory (/dev/mem)
and kernel virtual memory (/dev/kmem) files. The next argument is taken
to be the name of a suitable memory dump file.
This flag automatically sets the -o flag.
- -s
-
This option is used in conjunction with the -i option.
The next argument is taken to be the name of a suitable kernel executable
file, rather than the default (/vmunix).
Sps looks at the symbol table of this file to determine
the virtual addresses of various kernel structures.
OUTPUT
Sps produces output in the following fields -
- Ty
-
The terminal identifier to which the process is attached.
-
If this is followed by an underscore, the process is detached.
If it is followed by a period, the process is running in the foreground.
Otherwise the process is running in the background but is still
attached to a terminal.
- User
-
The symbolic name of the process' effective user-id (see exec(2)
and setuid(2)).
This name is defined by the system password file (/etc/passwd)
when sps was last initialised.
Otherwise, an asterisk (*) or vertical bar (|) appearing in this
column denotes that the process is an immediate relative of the
preceding process.
A bar is listed, rather than an asterisk, if both processes belong
to the same process group.
A user name is listed only if the effective user-id
differs from that of the preceding process or if it is a top-level
process (immediate offspring of process 1).
- Proc#
-
The unique process identifier.
- Ppid#
-
The process-id of the process' parent.
- Pgrp#
-
The process group to which the process belongs.
- Command
-
The command arguments obtained from the process' own address space.
(If the command name appears in parentheses, sps
was unable to locate the arguments in user space and so reports
the system's idea of the command name.)
The following additional fields are listed when sps
is invoked with one of the -l or -v options -
- Status
-
The process' current state.
If this field is listed in upper-case letters, the process is currently
loaded in real memory space ; otherwise it has been swapped out.
The status field may contain one of the following descriptions -
-
- run
-
The process can be run immediately.
- stop
-
The process is stopped. See sigvec(2).
- exit
-
The process is a zomby.
-
Any other entry in the status field indicates the process is
waiting for some external event to occur.
This is usually for one of the reasons listed below.
(If sps does not know why a process is waiting, it lists
the hexadecimal address of the process' wait channel,
with the initial 80000000 trimmed off.)
A process may be waiting for one of the following reasons -
-
- child
-
The process is waiting for a child to terminate. See wait(2).
- pause
-
Waiting for a signal to be received. See sigpause(2).
- swap
-
Waiting for a page to be swapped in.
- rswbuf
-
Waiting for a read from the swap device /dev/drum.
- discio
-
Waiting for a disc read or write operation.
(Actually, this means that the process is waiting for an operation
through the kernel's I/O buffering mechanism to complete, but discio
is what is generally meant here).
- rpipe
-
- wpipe
-
Waiting for a read from an empty pipe. Alternatively, the process
is waiting to write to a full pipe. See pipe(2).
- rsockt
-
- wsockt
-
Waiting for a read from an empty socket.
Alternatively, the process is waiting to write to a full socket (4.[2-]bsd only).
- accept
-
Waiting to accept a stream-based socket connection (4.[2-]bsd only).
See accept(2).
- connct
-
Waiting to establish a connection through a stream-based socket to a
remote process (4.[2-]bsd only). See connect(2).
- socket
-
Waiting for some other time-out event on a socket (4.[2-]bsd only).
- select
-
Blocked by a select(2) system call (4.[2-]bsd only).
- rmux
-
Waiting for a read from a multiplexor file (4.1bsd only).
- inode
-
Waiting for an inode to be allocated or unlocked.
- exlock
-
- shlock
-
Waiting for a file to become unlocked. See flock(2).
- rtty??
-
- wtty??
-
- otty??
-
Waiting for a read or write to the specified terminal, or for the terminal
to be switched on. See tty(4).
Alternatively, waiting for a read or write to the
specified slave pty device. See pty(4).
- rpty??
-
- wpty??
-
Waiting for a read or write to the specified master pty device.
See pty(4).
- ptrace
-
This is a parent process tracing its child.
- vfork
-
This is a vforking parent process waiting for its child to relinquish
memory resources. See vfork(2).
- floppy
-
- printr
-
- r??buf
-
Waiting for the specified device to complete an I/O operation.
- Fl
-
Flags associated with the current state of the process.
These flags may be any of the following -
-
- U
-
The process is a UNIX system process.
- T
-
The process is being traced or debugged.
- V
-
The process is a child currently being vforked. See vfork(2).
- I
-
The process is undergoing physical I/O.
- A
-
The system has detected, or the user has warned of
anomalous paging behaviour. See vadvise(2).
- Nice
-
The "niceness" of the process. See nice(2).
- Virtual
-
The virtual memory size of the process in kilobytes.
The first figure indicates the sum of the data and stack segments,
the second figure that of the text segment.
- Resident
-
The resident memory size of the process in kilobytes, representing
the real memory devoted to the process.
- %M
-
The percentage of available real memory allocated to this process.
- Time
-
The total CPU time accumulated by this process.
(This is the sum of the system plus user times, unless the -q
flag is specified in which case only the user time is listed.)
- Child
-
The total CPU time accumulated by the process' children.
(This is the sum of the system plus user times, unless the -q
flag is specified.)
- %C
-
The percentage of available CPU time devoted to the process.
This figure is a decaying average, computed over the past second.
The following fields are listed when sps is invoked with the
-d option -
- Files
-
The number of open files for this process.
- PageFaults
-
The number of major and minor page faults incurred by the process.
- Swap
-
The number of swaps incurred by the process.
- BlockI/O
-
The number of block read or write operations performed
on behalf of the process.
- Kbytesecs
-
The integral of real memory usage over time.
Thus, if a process uses 60 kilobytes of real memory for 3 seconds,
this figure is incremented by 180.
The following fields are listed when sps is invoked with the
-y option -
- Dev
-
The major and minor device numbers of the terminal.
- Addr
-
The virtual address of the associated struct tty in /dev/kmem.
- Rawq
-
- Canq
-
- Outq
-
The number of characters in the terminal I/O queues.
These refer to the raw input queue, the canonical input queue
and the output queue.
- Pgrp
-
The process group associated with the terminal.
After listing the requested output, sps prints a summary line.
This indicates the number and total virtual memory size of all processes,
the number and total virtual size of busy processes,
the number and real memory size of loaded processes
and the number and real size of swapped processes.
DIAGNOSTICS
Sps reports a self-explanatory message if it is given an
invalid argument list.
The program also complains if it cannot find necessary system information.
At initialisation, sps complains if it cannot find the addresses of
requisite system structures in the kernel symbol file.
This is usually the case because the system is rarely configured to support
all known devices.
Sps also complains if more than one user shares the same user-id
in the password file (/etc/passwd).
EXAMPLES
sps vb
Sps describes all busy processes in a verbose manner.
sps dtg 9 h1 co
Sps lists processes associated with terminals 9, h1 and the console.
The output reflects the disc activity caused by these processes.
The process group of each process is also included in the output.
sps weu robert fred -r 2
Sps reports processes belonging to the specified users.
It lists the environment as well as all the command arguments in a wide format.
The output is produced indefinitely, with a delay of two seconds between
each listing.
sps is /vmunix.new
Sps is initialised. It reads its symbol information from the
specified file.
FILES
/dev/console Console
/dev/tty?? Terminal and pty devices
/dev/kmem Kernel virtual memory
/dev/mem Physical memory
/dev/drum Paging and swap device
/etc/passwd Password file
/etc/spsinfo Information file
/vmunix Symbol file of /dev/kmem addresses
/etc/termcap To determine the output terminal width
SEE ALSO
iostat(1), kill(1), ps(1),
vmstat(1), exec(2),
flock(2), nice(2), pause(2), select(2), setuid(2),
sigvec(2), vadvise(2), vfork(2), wait(2),
pty(4),tty(4), pstat(8).
AUTHORS
Several. In particular, J. E. Kulp and J. Robert Ward.
Currently maintained by J. Robert Ward, <robert@hslrswi.UUCP>
BUGS
Because the system is continually changing, the information reported by
sps is only an approximation to reality.
If invoked by root, sps renices itself to -20 in an attempt to run as
fast as possible.
Sps recognises the sizes and addresses of internal kernel
tables whenever it is invoked. However, it must be recompiled
if major modifications are made to the kernel.
Sps does not list all the detailed information shown by ps(1).
Nor are all the options supported by ps(1) available from sps.
Sps does not understand all the possible
reasons why a process may be sleeping.
The code of sps is inherently machine-dependent and non-portable.
The number of options to sps is ridiculous.
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- OPTIONS
-
- OUTPUT
-
- DIAGNOSTICS
-
- EXAMPLES
-
- FILES
-
- SEE ALSO
-
- AUTHORS
-
- BUGS
-
This document was created by
man2html,
using the manual pages.
Time: 06:30:16 GMT, December 12, 2024