xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Docs/Examples/woof_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1The following explains how to demonstrate the woof.d DTrace script.
2
3This script is only useful if you have an audio device, /dev/audio. To test
4audio, you can run:
5
6	$ audioplay /usr/share/audio/samples/au/sample.au
7
8The volume can be adjusted from a few tools, including,
9
10	$ /usr/dt/bin/sdtaudiocontrol
11
12...
13
14woof.d will bark whenever a new process is created. In order to demonstrate
15it, first run the following:
16
17	# ./woof.d &
18
19You have now installed the dog (if the dog becomes a nusience, you are
20allowed to kill it). Now compare the difference between these recursive
21grep commands:
22
23	$ find /etc -type f -exec grep localhost {} \;
24
25	$ find /etc -type f -exec grep localhost {} +
26
27The first find command is the "bad way", the second is the "good way". You
28will hear for yourself why this is the case.
29