xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Examples/filebyproc_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1The following is an example of the filebyproc.d script,
2
3   # filebyproc.d
4   dtrace: description 'syscall::open*:entry ' matched 2 probes
5   CPU     ID                    FUNCTION:NAME
6     0     14                       open:entry gnome-netstatus- /dev/kstat
7     0     14                       open:entry man /var/ld/ld.config
8     0     14                       open:entry man /lib/libc.so.1
9     0     14                       open:entry man /usr/share/man/man.cf
10     0     14                       open:entry man /usr/share/man/windex
11     0     14                       open:entry man /usr/share/man/man1/ls.1
12     0     14                       open:entry man /usr/share/man/man1/ls.1
13     0     14                       open:entry man /tmp/mpqea4RF
14     0     14                       open:entry sh /var/ld/ld.config
15     0     14                       open:entry sh /lib/libc.so.1
16     0     14                       open:entry neqn /var/ld/ld.config
17     0     14                       open:entry neqn /lib/libc.so.1
18     0     14                       open:entry neqn /usr/share/lib/pub/eqnchar
19     0     14                       open:entry tbl /var/ld/ld.config
20     0     14                       open:entry tbl /lib/libc.so.1
21     0     14                       open:entry tbl /usr/share/man/man1/ls.1
22     0     14                       open:entry nroff /var/ld/ld.config
23   [...]
24
25In the above example, the command "man ls" was run. Each file that was
26attempted to be opened can be seen, along with the program name responsible.
27
28