Top

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

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