View Single Post
  #12  
Old November 14th, 2007, 05:17 PM
Giaguara's Avatar
Giaguara Giaguara is offline
Chmod 760
 
Join Date: Nov 2002
Location: ~
Posts: 8,593
Thanks: 7
Thanked 98 Times in 97 Posts
Giaguara is a jewel in the roughGiaguara is a jewel in the roughGiaguara is a jewel in the rough
Dtrace needs Developer Tools to be installed.
Apple’s ported some of the DTrace Toolkit scripts over to Mac OS X. Check the manpage for some of these with man -k dtrace
There are some more examples of DTrace in the standard install at /usr/share/examples/DTTk.
Man dtrace

These should work both in OS X and Solaris:

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

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

Pages paged in by process
dtrace -n 'vminfo:::pgpgin { @pg[execname] = sum(arg0); }'

Pages paged out by process
dtrace -n 'vminfo:::pgpgout { @pg[execname] = sum(arg0); }'

Minor faults by process
dtrace -n 'vminfo:::as_fault { @mem[execname] = sum(arg0); }'

More #1 #2
__________________
MacBook Pro | Dell Mini Inspiron 9 | Mac Mini | Newton 2000 | iPhone | @Work : Dell D620 & 2x20" + a lot of Macs | Workstation, VC & Fusion
Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do.
~ Samuel Clemens | Rants | Photos
Reply With Quote