Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I got an iMac 27" with a dying hard drive. Sometimes I got hight read/write access to the hard drive and I don't why.

Is there an program to monitor the access program specific? I want to know which program causes the high activities.

share|improve this question

1 Answer 1

up vote 11 down vote accepted

You can use the command-line application fs_usage to monitor disk use live. It requires elevated privileges.

Enter in Terminal:

sudo fs_usage

The only problem is, without filtering for applications, you probably won't be able to read the output fast enough. To filter for specific applications:

sudo fs_usage Finder

It wants the internal application name that is also used e.g. in ps, not the name of the application bundle.


Another option is opensnoop: It only monitors file open activity and contains less noise than fs_usage but you need e.g. grep to filter the output.

It contains the numeric file descriptor returned from the file open call or -1 if it failed. This doesn't have to indicate a real problem though: Many programs seem to open files (e.g. configuration files) speculatively, and if they don't exist, fall back to defaults.

It also requires elevated (i.e. root) privileges:

sudo opensnoop

It's ideal for answering questions like this one: Run opensnoop | grep plist to monitor all .plist configuration file changes, and change some settings in System Preferences to find out where they're stored on disk.


You can also inspect the processes in /Applications/Utilities/Activity Monitor.app. Select a process in the list, then View » Inspect Process » Open Files and Ports.


You can also use fseventer, a GUI utility for monitoring file system changes.

enter image description here

(Thanks @Chealion!)

share|improve this answer
    
I use the 'Activity Monitor.app' to monitor the total hdd i/o –  user65810 Feb 2 '11 at 19:17
    
The problem is, I dont know the program causing the high i/o –  user65810 Feb 2 '11 at 19:18
    
@user Then use fs_usage to see which program name you come across often enough and filter afterwards. –  Daniel Beck Feb 2 '11 at 19:19
    
Yes this is a nice tool. thanks –  user65810 Feb 2 '11 at 19:34
3  
fseventer is a decent GUI to fs_usage. –  Chealion Feb 2 '11 at 20:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.