HP StorageWorks XPath OS 7.4.X Command Reference Guide (AA-RVHCC-TE, September 2005)

248 XPath OS CLI commands
Displays and updates information about the top CPU processes.
Synopsis
top [-SbiInquv] [-d count] [-s time] [-o field] [-U user] [number]
Description
Use this command to display the top 10 processes on the system and periodically update this information.
If standard output is on an intelligent terminal (see below), then as many processes as will fit on the
terminal screen are displayed by default; otherwise, approximately 20 are displayed. Raw CPU
percentage is used to rank the processes. If number is given, then the top number processes are
displayed instead.
This command distinguishes between terminals that support advanced capabilities and those that do not.
This distinction affects the choice of defaults for certain options. In the remainder of this document, an
intelligent terminal is one that supports cursor addressing, clear screen, and clear to end of line.
Conversely, a dumb terminal is one that does not support such features. If the output of the top command
is redirected to a file, the command acts as if it were being run on a dumb terminal.
Operands
This command has the following optional operands:
top
-S Toggles display of system processes. Normally, system processes such as
the pager and the swapper are shown.
-b Uses batch mode. In this mode, all input from the terminal is ignored.
Interrupt characters (such as ^C and ^e) still have an effect. This is the
default on a dumb terminal or when the output is not on a terminal.
-i Uses interactive mode. In this mode, any input is immediately read for
processing. See the section, ”Interactive mode” on page 249 for an
explanation of which keys perform what functions. After the command is
processed, the screen is immediately updated, even if the command was
not understood. This mode is the default when standard output is on an
intelligent terminal.
-I Does not display idle processes. By default, the top command displays
both active and idle processes.
-n Uses noninteractive mode. This is identical to batch mode.
-q Changes the priority of top to –20 so that it will run faster. This can be
used when the system is being very sluggish, to help discover the
problem. This option can be used only by the root user.
-u Does not map UID numbers to user names. Normally, top reads as much
of the file /etc/passwd as is necessary to map all of the user ID
numbers it encounters to login names. This option disables all that, while
possibly decreasing execution time. The UID numbers are displayed
instead of the names.
-v Writes version number information to stderr and then exits
immediately. No other processing takes place when this option is used.
To see current revision information while top is running, use the help
command (?).
-d count Shows only count displays and then exits. A display is considered to be
one update of the screen. This option allows users to select the number of
displays they want to see before top automatically exits. For intelligent
terminals, no upper limit is set. The default is 1 for dumb terminals.