Dtrace
From pressy's brainbackup
Some short cmds or one-liners around dtrace
ARC accesses by applicaiton
# dtrace -n 'sdt:zfs::arc-hit,sdt:zfs::arc-miss { @[execname] = count() }'
found @[1]
what is really going on One nice example - everyone knows "man man" but what is really happening when this command is issued? Dtrace filtered on user id while typing man man on another terminal.
root@vbox01:~# dtrace -n 'proc:::exec-success /uid == 100/ { trace(curpsinfo->pr_psargs); }'
dtrace: description 'proc:::exec-success ' matched 1 probe
CPU ID FUNCTION:NAME
0 716 exec_common:exec-success /usr/gnu/bin/tbl
0 716 exec_common:exec-success /usr/bin/less -ins /tmp/mpTijdFb
1 716 exec_common:exec-success man man
1 716 exec_common:exec-success /usr/bin/troff -E -T ascii -mandoc
1 716 exec_common:exec-success /usr/bin/mv -f /tmp/mpTijdFb /usr/share/man/cat1/man.1
2 716 exec_common:exec-success /usr/bin/eqn -T ascii
3 716 exec_common:exec-success /usr/bin/preconv -D latin-1 /usr/share/man/man1/man.1
3 716 exec_common:exec-success /usr/bin/grotty -c
^C