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