Bsd top: Difference between revisions
From wikinotes
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
See also [[gnu top]]. | See also [[gnu top]]. | ||
= Configuration = | |||
<blockquote> | |||
== Environment == | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| <code>$TOP</code> || the default params passed to top on startup | |||
|- | |||
|} | |||
</blockquote><!-- Environment --> | |||
</blockquote><!-- Configuration --> | |||
= Usage = | = Usage = | ||
Line 11: | Line 22: | ||
top -o cpu # top sorted by cpu | top -o cpu # top sorted by cpu | ||
top -o res # top sorted by used memory | top -o res # top sorted by used memory | ||
top -o res -a | less -S # top sorted by used mem, showing cli params for prog | |||
</source> | </source> | ||
Line 17: | Line 30: | ||
<source lang="bash"> | <source lang="bash"> | ||
h # show help | |||
m # toggle between CPU/IO views (different info) | m # toggle between CPU/IO views (different info) | ||
o # sort by a column of your choosing | o # sort by a column of your choosing |
Latest revision as of 18:00, 16 April 2022
BSD variant of the top program to see live system resource usage.
See also gnu top.
Configuration
Environment
$TOP
the default params passed to top on startup
Usage
Commandline
top -w -o swap # top sorted by swap usage top -o cpu # top sorted by cpu top -o res # top sorted by used memory top -o res -a | less -S # top sorted by used mem, showing cli params for progInteractive
Top also has some useful hotkeys
h # show help m # toggle between CPU/IO views (different info) o # sort by a column of your choosing w # toggle display of swap P # toggle per-cpu stats
Columns
Some key columns, and their descriptions.
# NOTE: for virtual memory info, use `ps -v` and look at `VSX` SIZE # (kb) size of process (text, data, stack -- NOT HEAP) RES # (kb) resident memory (consumed RAM) SWAP # (kb) swapped memory
Notes
ACTIVE/WIRED # memory that cannot be converted to free memory INACTIVE # memory owned by a process, but can be converted to free memory FREE # actual free memory