Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My harddisk keeps crunching away, but I have nothing running that warrants this constant activity. How can I find out what is constantly accessing my harddisk?

I'm on a iMac, using Mac os x 10.6.4

share|improve this question

migrated from Sep 21 '10 at 5:23

This question came from our site for system and network administrators.

Thought the tag was enough - I've added os and version :) – Joda Sep 21 '10 at 4:36
Spotlight indexing? Is there a dot flashing in the middle of the magnifying glass on the top right corner? – fideli Sep 21 '10 at 5:40
Also consider answers to this questions:… (looks like exact duplicate for me). – rkhayrov Sep 21 '10 at 12:48
up vote 5 down vote accepted

DTrace is your friend:

# Files opened by process,
dtrace -n 'syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0)); }'

Here are other common commands (also listed in the DTrace Wikipedia article):

# New processes with arguments,
dtrace -n 'proc:::exec-success { trace(curpsinfo->pr_psargs); }'

# Syscall count by program,
dtrace -n 'syscall:::entry { @num[execname] = count(); }'

# Syscall count by syscall,
dtrace -n 'syscall:::entry { @num[probefunc] = count(); }'

# Syscall count by process,
dtrace -n 'syscall:::entry { @num[pid,execname] = count(); }'

# Disk size by process,
dtrace -n 'io:::start { printf("%d %s %d",pid,execname,args[0]->b_bcount); }'   

# Pages paged in by process,
dtrace -n 'vminfo:::pgpgin { @pg[execname] = sum(arg0); }'
share|improve this answer
Perfect, thanks :) – Joda Sep 21 '10 at 5:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .