Linux in a Nutshell, Third Edition
by Ellen Siever, Stephen Spainhour, Jessica P. Hekman, Stephen Figgins
Name
top
Synopsis
top [options]
Description
Provide information (frequently refreshed) about the most CPU-intensive processes currently running. See ps for explanations of the field descriptors.
Options
- -b
Run in batch mode; don’t accept command-line input. Useful for sending output to another command or to a file.
- -c
Show command line in display instead of just command name.
- -d delay
Specify delay between refreshes.
- -i
Suppress display of idle and zombie processes.
- -n num
Update display num times, then exit.
- -p pid
Monitor only processes with the specified process ID.
- -q
Refresh without any delay. If user is privileged, run with highest priority.
- -s
Secure mode. Disable some (dangerous) interactive commands.
- -S
Cumulative mode. Print total CPU time of each process, including dead child processes.
Interactive commands
- space
Update display immediately.
- c
Toggle display of command name or full command line.
- f, F
Add fields to display or remove fields from the display.
- h, ?
Display help about commands and the status of secure and cumulative modes.
- k
Prompt for process ID to kill and signal to send (default is 15) to kill it.
- i
Toggle suppression of idle and zombie processes.
- l
Toggle display of load average and uptime information.
- m
Toggle display of memory information.
- n, #
Prompt for number of processes to show. If 0 is entered, show as many as will fit on the screen (default).
- o, O
Change order of displayed fields.
- q
Exit.
- r
Apply renice to a process. Prompt for PID and renice value. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access