Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to find out which databases/processes are using which disk group. I was notified that our Disk I/O was starting to get pretty high. I'm on a Solaris box (Sun - Fire 15000) running Solaris 10.

share|improve this question

closed as not a real question by Ward, Magellan, Scott Pack, John Gardeniers, Brent Pabst Oct 18 '12 at 15:03

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer 1

Lucky for you, you're using Solaris so you can use dtrace. A couple of one liners will get you some good data that might get you close to what you want. You're also hopefully using ZFS (and if not, why not?).

Show bytes read by process:

dtrace -n 'sysinfo:::readch { @bytes[execname] = sum(arg0); }'

Show bytes written by process:

dtrace -n 'sysinfo:::writech { @bytes[execname] = sum(arg0); }'

Show files opened by process:

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

Find which disks are busy:

zpool iostat -v 2

You'll have to interpret the data a bit yourself, but using the first two commands you can see which processes are using a lot of I/O. Use the third to see which files are being opened frequently, and thereby the zpool that contains them. Correlate this with zpool iostat to see which vdevs they're on.

With a bit of skill and practice you can create a dtrace script that would do this in one shot.

share|improve this answer

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