version 1.4, 1998/08/21 13:55:24 |
version 1.5, 1998/10/30 00:24:39 |
|
|
.Os OpenBSD |
.Os OpenBSD |
.Sh NAME |
.Sh NAME |
.Nm top |
.Nm top |
.Nd display and update information about the top cpu processes |
.Nd display and update information about the top CPU processes |
.Sh SYNOPSIS |
.Sh SYNOPSIS |
.Nm |
.Nm |
.Op Fl SbiInqu |
.Op Fl SbiInqu |
|
|
information. If standard output is an intelligent terminal (see below) then |
information. If standard output is an intelligent terminal (see below) then |
as many processes as will fit on the terminal screen are displayed |
as many processes as will fit on the terminal screen are displayed |
by default. Otherwise, a good number of them are shown (around 20). |
by default. Otherwise, a good number of them are shown (around 20). |
Raw cpu percentage is used to rank the processes. If |
Raw CPU percentage is used to rank the processes. If |
.Ar number |
.Ar number |
is given, then the top |
is given, then the top |
.Ar number |
.Ar number |
|
|
being very sluggish to improve the possibility of discovering the problem. |
being very sluggish to improve the possibility of discovering the problem. |
This option can only be used by root. |
This option can only be used by root. |
.It Fl u |
.It Fl u |
Do not take the time to map uid numbers to usernames. Normally, |
Do not take the time to map UID numbers to usernames. Normally, |
.Nm |
.Nm |
will read as much of the password database as is necessary to map |
will read as much of the password database as is necessary to map |
all the user id numbers it encounters into login names. This option |
all the user ID numbers it encounters into login names. This option |
disables all that, while possibly decreasing execution time. The uid |
disables all that, while possibly decreasing execution time. The UID |
numbers are displayed instead of the names. |
numbers are displayed instead of the names. |
.It Fl d Ar count |
.It Fl d Ar count |
Show only |
Show only |
.Ar count |
.Ar count |
displays, then exit. A display is considered to be one update of the |
displays, then exit. A display is considered to be one update of the |
screen. This option allows the user to select the number of displays he |
screen. This option allows the user to select the number of displays they |
wants to see before |
want to see before |
.Nm |
.Nm |
automatically exits. For intelligent terminals, no upper limit |
automatically exits. For intelligent terminals, no upper limit |
is set. The default is 1 for dumb terminals. |
is set. The default is 1 for dumb terminals. |
|
|
.Ar res , |
.Ar res , |
.Ar time , |
.Ar time , |
and |
and |
.Ar pri. |
.Ar pri . |
.It Fl U Ar username |
.It Fl U Ar username |
Show only those processes owned by |
Show only those processes owned by |
.Ar username . |
.Ar username . |
This option currently only accepts usernames and will not understand |
This option currently only accepts usernames and will not understand |
uid numbers. |
UID numbers. |
.El |
.El |
.Pp |
.Pp |
Both |
Both |
|
|
will negate the first. Thus a user who has the environment variable |
will negate the first. Thus a user who has the environment variable |
.Ev TOP |
.Ev TOP |
set to |
set to |
.Li -I |
.Dq -I |
may use the command |
may use the command |
.Li top -I |
.Dq top -I |
to see idle processes. |
to see idle processes. |
.Sh INTERACTIVE MODE |
.Sh INTERACTIVE MODE |
When |
When |
|
|
.It d |
.It d |
Change the number of displays to show (prompt for new number). |
Change the number of displays to show (prompt for new number). |
Remember that the next display counts as one, so typing |
Remember that the next display counts as one, so typing |
.Li d1 |
.Dq d1 |
will make |
will make |
.Nm |
.Nm |
show one final display and then immediately exit. |
show one final display and then immediately exit. |
|
|
.\" .Pp |
.\" .Pp |
The top few lines of the display show general information |
The top few lines of the display show general information |
about the state of the system, including |
about the state of the system, including |
the last process id assigned to a process |
the last process ID assigned to a process, |
.\" (on most systems), |
.\" (on most systems), |
the three load averages, |
the three load averages, |
the current time, |
the current time, |
|
|
The remainder of the screen displays information about individual |
The remainder of the screen displays information about individual |
processes. This display is similar in spirit to |
processes. This display is similar in spirit to |
.Xr ps 1 |
.Xr ps 1 |
but it is not exactly the same. PID is the process id, USERNAME is the name |
but it is not exactly the same. PID is the process ID, USERNAME is the name |
of the process's owner (if |
of the process's owner (if |
.Fl u |
.Fl u |
is specified, a UID column will be substituted for USERNAME), |
is specified, a UID column will be substituted for USERNAME), |
|
|
.Li zomb , |
.Li zomb , |
or |
or |
.Li stop ) , |
.Li stop ) , |
TIME is the number of system and user cpu seconds that the process has used, |
TIME is the number of system and user CPU seconds that the process has used, |
WCPU, when displayed, is the weighted cpu percentage (this is the same |
WCPU, when displayed, is the weighted CPU percentage (this is the same |
value that |
value that |
.Xr ps 1 |
.Xr ps 1 |
displays as CPU), |
displays as CPU), |
|
|
The |
The |
.Em ABANDONED |
.Em ABANDONED |
state (known in the kernel as |
state (known in the kernel as |
.Em SWAIT |
.Em SWAIT Ns ) |
was abandoned, thus the name. A process should never end up in this state. |
was abandoned, thus the name. A process should never end up in this state. |
.Sh AUTHOR |
.Sh AUTHOR |
William LeFebvre, EECS Department, Northwestern University |
William LeFebvre, EECS Department, Northwestern University |
|
|
.Xr ps 1 , |
.Xr ps 1 , |
.Xr stty 1 , |
.Xr stty 1 , |
.Xr mem 4 , |
.Xr mem 4 , |
.Xr renice 8 . |
.Xr renice 8 |