Thank you for purchasing through links and ads on this site.
OWC / MacSales.com...
diglloyd Deal Finder...
Buy other stuff at Amazon.com...
Up to 1527MB/s sustained performance
Small Business Tax Write-Off?
Now is the time to purchase computer or photo gear for 2018 federal tax write-off. Consult with Lloyd.

Monitoring System Activity on the Command Line

Last updated 2013-12-29 - Send Feedback
Related: 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
Deals Updated Daily at B&H Photo
View BEST Deals Right Now
B&H Deal ZoneDeals by Brand/Category/Savings
Deals expire in 12 hours unless noted. Certain deals may last longer.
$599 SAVE $200 = 25.0% Canon 17-40mm f/4 EF L USM in Lenses: DSLR
$520 SAVE $130 = 20.0% Canon 70-200mm f/4 EF L USM in Lenses: DSLR
$449 SAVE $100 = 18.0% DJI Goggles Racing Edition in Video: Drones
$299 SAVE $50 = 14.0% $149 FREE ITEMS DJI Spark Quadcopter (Sunrise Yellow) in Video: Drones
$50 SAVE $100 = 66.0% Lowepro DroneGuard CS 400 in Video: Drones
$2497 SAVE $300 = 10.0% $29 FREE ITEMS Nikon 70-200mm f/2.8 AF-S NIKKOR E FL ED VR in Lenses: DSLR
$898 SAVE $500 = 35.0% Sony a7 II Mirrorless in Cameras: Mirrorless
$898 SAVE $506 = 36.0% $19 FREE ITEMS Sony a7 II Mirrorless with Accessory Kit in Cameras: 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__