top — display and update information about the top processes on the system
displays the top processes on the system
and periodically updates the information.
Raw CPU percentage is used to rank the processes.
recognizes the following command-line options:
- -s time
Set the delay between screen updates to
The default delay between updates is 5 seconds.
- -d count
displays, then exit.
A display is considered to be one update of the screen.
This option is used to select the number of displays
to be shown before the program exits.
This option runs the
program at the same priority as if it is executed via a
command so that it will execute faster (see
This can be very useful in discovering any system problem
when the system is very sluggish.
This option is accessible only to users who have appropriate privileges.
User ID (uid) numbers are displayed instead of usernames.
This improves execution speed by eliminating the additional time required
to map uid numbers to user names.
Hides the individual CPU state information for systems
having multiple processors.
Only the average CPU status
will be displayed.
- -n number
processes per screen.
Note that, if
is greater than the maximum number
of processes that can be displayed per screen, this option
But when used with
option, there is no limit
on the maximum number of processes that can be displayed.
- -f filename
Output is appended to
defaults to 1 for
and 16 for
- -p pset_id
Show load averages and process state break down for system
and processor set
Show only the processes running on the processor set
This option is supported only if the kernel supports processor
for individual CPU information.
for each process information.
This option is supported only
if the kernel supports processor sets functionality.
Show individual CPU information.
does not display any individual CPU information.
The user can toggle between individual process information and individual
CPU information by using the
When used with the
option overrides the
When displaying multiple-screen data,
recognizes the following keyboard screen-control commands:
Display next screen if the current screen is not the last screen.
Display previous screen if the current screen is not the first screen.
Display the first (top) screen.
Display individual CPU information in place of individual process
information and vice versa.
To exit the program and resume normal user activities, type
at any time.
Three general classes of information are displayed by
- System Data
The first few lines at the top of the display
show general information about the state of the system, including:
System name and current time.
Load averages in the last one, five, and fifteen minutes of all
the active processors in the system.
Number of existing processes and the number of processes in each state
(sleeping, waiting, running, starting, zombie, and stopped).
Percentage of time spent in each of the processor states
(user, nice, system, idle, interrupt and swapper)
per active processor on the system.
Average value for each of the active processor states
(only on multi-processor systems).
- Memory Data
Reports virtual and real memory used by user processes
(with the amount of memory considered "active" in parentheses)
and the amount of free memory.
- Process Data
Information about individual processes on the system.
When process data cannot fit on a single screen,
divides the data into two or more screens.
To view multiple-screen data, use the
commands described previously.
Note that the system- and memory-data displays are present in each
screen of multiple-screen process data.
Process data is displayed in a format similar to that used by
Processor number on which the process is executing
(only on multi-processor systems).
Terminal interface used by the process.
Process ID number.
ID of the processor set to which the processor belongs.
This is shown only when
option is used.
Name of the owner of the process.
option is specified, the user ID (uid) is displayed instead of
Current priority of the process.
Nice value ranging from -20 to +20.
Total virtual size of the process in kilobytes.
This includes virtual sizes of text, data, stack, mmap regions,
shared memory regions and IO mapped regions.
This may also include virtual memory regions shared with other processes.
Resident size of the process in kilobytes.
It includes the sizes of all private regions in the process.
The resident size information is, at best, an approximate value.
Current state of the process.
The various states are
Number of system and CPU seconds the process has consumed.
Weighted CPU (central processing unit) percentage.
Raw CPU percentage.
This field is used to sort the top processes.
Name of the command the process is currently running.
can be executed with or without command-line options.
To display five screens of data at two-second intervals
then automatically exit, use:
To display information about pset 2, use:
To display individual CPU information in place of individual
process information, use:
was developed by HP and William LeFebvre of Rice University.