Watch Disk Use, CPU, and Load Average via Command Line

Oct 31, 2010 - 2 Comments

Terminal in OS X

Here’s a nice trick if you need to continuously observe your Macs system usage, including disk usage, CPU, and load average. The great thing about this iostat trick is that it updates constantly, allowing for realtime monitoring of system performance, which can be extremely helpful for performance testing and tracking down various processes or activities that are resource heavy.

The secret is attaching this w1 flag to the iostat command you’ll get a constant stream of updated load information:

iostat -w1

You’ll then get a continuously updated stream of your hard disk usage, CPU split into user/system/idle, and your Macs load average:

watch disk cpu load average mac

iostat will keep running in this mode until you stop it with Control+C to halt it. You can also just run iostat on it’s own and it’ll spit out a one-off look at the system stats, or you can just use the top command for similar effect.

If mucking around in the command line isn’t your thing, you can get most of this information from the activity monitor, which functions as a task manager of sorts for Mac OS X but also details system usage information.

By the way, this works in Mac OS X and linux, so for users who span unix platforms, it’s particularly helpful to know tricks like this.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: David Mendez in Command Line, Mac OS X


» Comments RSS Feed

  1. HC says:

    Didn’t work for me… I have a macbook pro 13″ Any idea?

    • Curt says:

      Try just ‘iostat’ and if that doesn’t work you may need to install Developer Tools which comes on your Mac OS X installer disk.

Leave a Reply


Shop for Apple & Mac Deals on

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates