xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Docs/Examples/pl_who_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1The following are examples of pl_who.d.
2
3This is a simple script to see who is executing Perl subroutines. Here it
4traces as a few examples programs are executed (from Code/Perl/*.pl).
5
6   # pl_who.d
7   Tracing... Hit Ctrl-C to end.
8   ^C
9         PID    UID   SUBS FILE
10       30817    100      3 ./func_abc.pl
11       30818    100      3 ./func_slow.pl
12       30819    100      3 ./func_slow.pl
13
14While tracing, the user with UID 100 executed three Perl programs;
15"func_abc.pl" once getting PID 130817, and "func_slow.pl" twice. All
16programs called three subroutines.
17
18
19
20The following traces a Perl network interface statistics tool, "nicstat"
21version 0.99,
22
23   # pl_who.d
24   Tracing... Hit Ctrl-C to end.
25   ^C
26         PID    UID   SUBS FILE
27       14977    100      1 lib/Getopt/Std.pm
28       14977    100      1 lib/warnings.pm
29       14977    100      2 lib/Exporter.pm
30       14977    100      3 /usr/perl5/5.8.4/lib/Sun/Solaris/Kstat.pm
31       14977    100      3 lib/warnings/register.pm
32       14977    100      4 lib/DynaLoader.pm
33       14977    100      5 lib/vars.pm
34       14977    100      6 lib/AutoLoader.pm
35       14977    100      9 lib/Config.pm
36       14977    100     15 lib/strict.pm
37       14977    100     23 /tmp/nicstat
38
39This shows the location of libraries and modules from where subroutines were
40called.
41
42