Top: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 14: Line 14:
<pre>
<pre>
top -b -n 1
top -b -n 1
</pre>
Only summary information (and one process for PID 0)
<pre>
top -b -n 1 -p 0
</pre>
</pre>



Revision as of 04:24, 4 August 2016

Internal

Overview

Linux

Batch Mode

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

top -b -n 1

Only summary information (and one process for PID 0)

top -b -n 1 -p 0

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