Top: Difference between revisions

From Leo's Notes
This page was last edited on 30 December 2021, at 01:34.
m Leo moved page Linux top CPU Fields Explained to Top Tips & Tricks: Generalize top information into one page
m Leo moved page Top Tips & Tricks to Top: General information on 'top'
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
The {{code|top}} utility is part of the procps-ng package and shows the system's workload and resource status. It is analogous to the task manager in windows.
== Usage ==
Run {{code|top -d 1}}.
To quit, hit {{code|q}} or {{code|Ctrl c}}.
Toggle CPU header with {{code|t}}
== CPU Fields Explained ==
The first few lines of the top command looks similar to this:
The first few lines of the top command looks similar to this:


Line 39: Line 50:
| steal time || CPU time which the hypervisor dedicated (or ‘stole’) for other guests in the system.
| steal time || CPU time which the hypervisor dedicated (or ‘stole’) for other guests in the system.
|}
|}
{{Navbox Linux}}[[Category:Linux]]
[[Category:LinuxUtilities]]

Latest revision as of 01:34, 30 December 2021

The top utility is part of the procps-ng package and shows the system's workload and resource status. It is analogous to the task manager in windows.

Usage

Run top -d 1.

To quit, hit q or Ctrl c.

Toggle CPU header with t


CPU Fields Explained

The first few lines of the top command looks similar to this:

Tasks: 137 total, 1 running, 136 sleeping, 0 stopped, 0 zombie
Cpu(s): 0.0%us, 4.2%sy, 90.0%ni, 0.0%id, 0.0%wa, 0.0%hi, 0.0%si, 5.8%st
Mem: 786432k total, 715152k used, 71280k free, 61012k buffers
Swap: 2096472k total, 18304k used, 2078168k free, 168068k cached

The fields on the second line breaks down the CPU usage into 8 categories.

Field Name Description
us user CPU used by user processes
sy system CPU used by system/kernel processes
ni nice CPU used by processes that were reniced
id idle CPU not used
wa io wait Essentially idle CPU waiting on IO devices
hi hardware irq CPU used to service hardware IRQs
si software irq CPU used to service soft IRQs
st steal time CPU time which the hypervisor dedicated (or ‘stole’) for other guests in the system.