As an Amazon Associate I earn from qualifying purchases @AMAZON

Designed for the most demanding needs of photographers and videographers.
Connect and charge all of your devices through a single Thunderbolt or USB-C port.

Monitoring System Activity on the Command Line

Monitoring performance in Terminal can be useful for diagnosing performance issues, using the top and vm_stat tools (and iostat for disk I/O).

These tools are used in a Terminal window. The most useful tool is top, which can be left running continually, refreshing the window at regular intervals.

top

Show top 10 processes by CPU usage every 2 seconds, with data collected every 5 seconds:

top -o cpu -s 2 -i 5
Show top 10 processes by real memory every 2 seconds:

top -o rsize -s 2

'top' display by CPU usage

vm_stat

The vm_stat tool also provides some useful statistics on the use of real memory, compressed memory and virtual memory.

'vm_stat' output

iostat

The iostat tool also provides statistics on disk I/O.

Show up to 16 drives every 2 seconds:

iostat -w 2 -n 16

iostat output at 2-second intervals
View all handpicked deals...

Nikon Z7 II Mirrorless Camera
$2997 $2997
SAVE $click

diglloyd.com | Terms of Use | PRIVACY POLICY
Contact | About Lloyd Chambers | Consulting | Photo Tours
Mailing Lists | RSS Feeds | X.com/diglloyd
Copyright © 2020 diglloyd Inc, all rights reserved.
Display info: __RETINA_INFO_STATUS__