O'Reilly logo

Systems Performance: Enterprise and the Cloud by Brendan Gregg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Appendix D. DTrace One-Liners

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.

syscall Provider

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required