Thank you for purchasing through links and ads on this site.
OWC / MacSales.com...
diglloyd Deal Finder...
Buy other stuff at Amazon.com...
Capacities up to 48TB and speeds up to 1527MB/s

Monitoring System Activity on the Command Line

Last updated 2013-12-29 - Send Feedback
Related: how-to, Optimization

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
Durable and fast, up to 1800MB/s
B&H Deal ZoneDeals by Brand/Category/Savings
Deals expire in 81 min unless noted. Certain deals may last longer.
$999 SAVE $700 = 41.0% $101 FREE ITEMS Canon EOS 6D DSLR in Cameras: DSLR
$649 SAVE $250 = 27.0% $20 FREE ITEMS Canon EOS 77D DSLR in Cameras: DSLR
$1049 SAVE $450 = 30.0% $20 FREE ITEMS Canon EOS 77D DSLR with 18-135mm USM in Cameras: DSLR
$1349 SAVE $450 = 25.0% $20 FREE ITEMS Canon EOS 7D Mark II DSLR in Cameras: DSLR
$1299 SAVE $500 = 27.0% $101 FREE ITEMS Canon EOS 80D DSLR with 18-135mm in Cameras: DSLR
$229 SAVE $170 = 42.0% $99 FREE ITEMS Dracast CamLux Max Bi-Color 3-Light Kit in All Other Categories
$7 SAVE $10 = 58.0% Joby Action Grip in Video: Camcorders
$2497 SAVE $470 = 15.0% $468 FREE ITEMS Nikon D500 DSLR with 16-80mm in Cameras: DSLR
$1497 SAVE $500 = 25.0% $466 FREE ITEMS Nikon D750 DSLR in Cameras: DSLR
$1997 SAVE $1100 = 35.0% $466 FREE ITEMS Nikon D750 DSLR with 24-120mm in Cameras: DSLR
$1747 SAVE $570 = 24.0% $61 FREE ITEMS Nikon D7500 DSLR with 16-80mm in Cameras: DSLR
$3297 SAVE $800 = 19.0% $556 FREE ITEMS Nikon D810 DSLR with 24-120mm in Cameras: DSLR
$1697 SAVE $200 = 10.0% Pentax K-1 DSLR in Cameras: DSLR
$599 SAVE $200 = 25.0% Rokinon 14mm f/2.8 AF in Lenses: DSLR
$100 SAVE $100 = 50.0% Sachtler Dr. Bag - 3 in All Other Categories
$1998 SAVE $400 = 16.0% Sony a7R II Mirrorless in Cameras: Mirrorless
$368 SAVE $80 = 17.0% Sony DSC-RX100 in Cameras: Point and Shoot
$648 SAVE $100 = 13.0% $37 FREE ITEMS Sony DSC-RX100 III in Cameras: Point and Shoot
$300 SAVE $160 = 34.0% $9 FREE ITEMS Steiner 8x32 XC Binocular in All Other Categories
$790 SAVE $400 = 33.0% Teradek COLR in Computers: Peripherals
$1399 SAVE $100 = 6.0% ZEISS 18mm f/2.8 Batis in Lenses: Mirrorless

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