Jump to content

Recommended Posts

Posted

<div class="KonaBody"><p><img src="http://osxdaily.com/wp-content/uploads/2012/01/monitor-disk-activity-mac.jpg" alt="Monitor Disk Activity in Mac OS X" title="monitor-disk-activity-mac" width="553" height="162" class="aligncenter size-full wp-image-26192" /></p>

<p>You can monitor disk activity in Mac OS X by using the <a href="http://osxdaily.com/2010/08/15/mac-task-manager/">Activity Monitor</a> app or several command line tools. Activity Monitor is the easiest and most user friendly, but the Terminal options allow further information to be retrieved. </p>

<h2 style="font-size:1.2em;">Watching Disk Activity with Activity Monitor</h2>

<ul>

<li>Launch Activity Monitor, located in /Applications/Utilities/, or you can hit Command+Space Bar to bring up Spotlight search and find it that way</li>

<li>Click on the Disk Activity tab near the bottom</li>

<li>The graph on the right plots Disk Activity</li>

<li>Pay special attention to “Data read/sec” and “Data written/sec”</li>

</ul>

<p>What’s causing the disk usage? Sometimes it correlates with CPU usage, and some apps and processes are heavy on both, like when converting video, audio, or Spotlights <a href="http://osxdaily.com/2010/08/05/mds-mac/">mds</a> and <a href="http://osxdaily.com/2009/09/14/mdworker-what-is-mdworker/">mdworker</a>. To know for sure, launch the Terminal from /Applications/Utilities/ and read on.</p>

<h2 style="font-size:1.2em;">Monitoring Disk Activity from the Command Line</h2>

<p>What is shown in Activity Monitor can be somewhat limited, and if you want information specific to what application or process is causing disk input and output, you can launch the Terminal and use the following commands to get more information:</p>

<p><code>sudo iotop -C 5 10</code></p>

<p>iotop will report back something like this, showing the overall disk read/write, as well as processes, command (or app) and the byte size being written actively by each process:

<img src="http://osxdaily.com/wp-content/uploads/2012/01/iotop.jpg" alt="iotop output" title="iotop" width="594" height="142" class="aligncenter size-full wp-image-26193" /></p>

<p>To easier compare apps and processes that are using the disk, pass the -P flag along with the iotop command, then pay attention to the % I/O column:</p>

<p><code>sudo iotop -P -C 5 10</code></p>

<p>iotop can also be narrowed down by disk drive by pointing at the path and using the -m flag. In the example below, the root filesystem only will be watched for activity:</p>

<p><code>sudo iotop -Pm /</code></p>

<p>The fs_usage app is another choice, although it’s a bit of a firehose:</p>

<p><code>sudo fs_usage -f filesys</code></p>

<p><img src="http://osxdaily.com/wp-content/uploads/2012/01/fs_usage.jpg" alt="fs_usage output" title="fs_usage" width="620" height="217" class="aligncenter size-full wp-image-26195" /></p>

<p>fs_usage also shows disk reads and writes and the application or process causing them. </p>

</div>

<p><a href="http://feedads.g.doubleclick.net/~a/DwG2XrdZoxHfPnH7tuMg1gEb2J8/0/da"><img src="http://feedads.g.doubleclick.net/~a/DwG2XrdZoxHfPnH7tuMg1gEb2J8/0/di" border="0" ismap="true"></img></a><br/>

<a href="http://feedads.g.doubleclick.net/~a/DwG2XrdZoxHfPnH7tuMg1gEb2J8/1/da"><img src="http://feedads.g.doubleclick.net/~a/DwG2XrdZoxHfPnH7tuMg1gEb2J8/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">

<a href="http://feeds.feedburner.com/~ff/osxdaily?a=E7iX3fo59Ns:AtgObcpPtjo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=E7iX3fo59Ns:AtgObcpPtjo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=E7iX3fo59Ns:AtgObcpPtjo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=E7iX3fo59Ns:AtgObcpPtjo:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=E7iX3fo59Ns:AtgObcpPtjo:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=E7iX3fo59Ns:AtgObcpPtjo:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=E7iX3fo59Ns:AtgObcpPtjo:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=qj6IDK7rITs" border="0"></img></a>

</div><img src="http://feeds.feedburner.com/~r/osxdaily/~4/E7iX3fo59Ns" height="1" width="1"/>

 

View the full article

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic


×
×
  • Create New...