Top: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 31: Line 31:


-n <nprocs> display only up to nprocs. 0 works, it only displays the system-wide stats.
-n <nprocs> display only up to nprocs. 0 works, it only displays the system-wide stats.
<pre>
top -l 1 -n 0
</pre>

Revision as of 04:21, 4 August 2016

Internal

Overview

Linux

Batch Mode

Run "top" in batch mode, just one iteration:

top -b -n 1

Mac

Batch Mode

Specify one sample:

top -l 1

-l logging mode.

Get stats only for specific keys: -o <key>, where keys: ...

-n <nprocs> display only up to nprocs. 0 works, it only displays the system-wide stats.

top -l 1 -n 0