Difference between revisions of "Dtrace"
From pressy's brainbackup
(Created page with "== Some short cmds or one-liners around dtrace == '''ARC accesses by applicaiton''' <pre> # dtrace -n 'sdt:zfs::arc-hit,sdt:zfs::arc-miss { @[execname] = count() }' </pre> ...") |
|||
| Line 9: | Line 9: | ||
found @[http://dtrace.org/blogs/brendan/2012/01/09/activity-of-the-zfs-arc/] | found @[http://dtrace.org/blogs/brendan/2012/01/09/activity-of-the-zfs-arc/] | ||
| + | |||
| + | '''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. | ||
| + | <pre> | ||
| + | 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 | ||
| + | </pre> | ||
Revision as of 13:28, 4 February 2020
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