October 2013
Intermediate to advanced
784 pages
21h 7m
English
This appendix contains some handy DTrace one-liners. Apart from being useful in themselves, they can help you learn DTrace, one line at a time. Some of these were demonstrated in previous chapters. Many may not work right away; they may depend on the presence of certain providers, or on a specific kernel version.
See Chapter 4, Observability Tools, for an introduction to DTrace.
List syscall provider entry probes:
dtrace -ln syscall:::entry
Count syscalls by process name:
dtrace -n 'syscall:::entry { @[execname] = count(); }'
Count syscalls by syscall name:
dtrace -n 'syscall:::entry { @[probefunc] = count(); }'
Count syscalls by ...
Read now
Unlock full access