on dtrace and osx

Ever since I loaded up leopard on my mac, I’ve run into a strange issue. Whenever I log in to my account, which was transfered from my original powerbook over to the mac pro via tiger and then upgraded to leopard, I see a long period of disk activity that slows my box down to a crawl for the first 5-10 minutes after logging in. I’ve tried using top to see what’s going on, but all I can find is that a “find” command is being issued by someone. Well, while sitting on a plane ride to Minneapolis today, I stumbled across a shell script I had downloaded a while back. It is a solaris script to run Dtrace and report back on all of the disk activity. I thought for sure that this would help me figure out what’s going on. Well, when I fired it up, it first complained that I wasn’t root. A quick “su -” later and I ran it again. That got me a “: probe description io:genunix::start does not match any probes”. Doh! Being the nerd boy I proceeded to see if there’s a list of the probes that are supported to see if I could modify this script. At a minimum this was going to take me through the rest of the flight.

I was wrong.

Apple developer tools provide you with a cool GUI dtrace under the aptly named /Developer/Applications/Instruments.app!

Picture 1-3

So, I fired this guy up and figured that it would take another hour or so to figure this thing out. Nope, the very first thing it does is provide you with a wizard where you can select some predefined trace packages. One of them is called “File Activity”. Select that and then make sure to change your selection to “All Processes”

Picture 2-2
Hit the record button and Voila! All the disk IO activity measurements you’d ever want. Now it’s just a matter of tracing back the culprit and I should have this nailed down quickly. More on this as it develops.

You must be logged in to post a comment.