Chapter 9 Scripting

Table of Contents

9.1 Interpreter Files
9.2 Macro Variables
9.3 Macro Arguments
9.4 Target Process ID

You can use the dtrace utility to create interpreter files out of D programs similar to shell scripts that you can install as reusable interactive DTrace tools. The D compiler and dtrace command provide a set of macro variables that are expanded by the D compiler that make it easy to create DTrace scripts. This chapter provides a reference for the macro variable facility and tips for creating persistent scripts.