xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Docs/Examples/rb_who_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1These are examples of the results after running the rb_who.d script.
2
3This script shows which UIDs and PIDs are running Ruby programs with Ruby
4provider support, and how active they are.  It lists the name of the program,
5along with the number of lines executed per program as recorded by the line
6provider.
7
8Here it runs as three Ruby programs are executed.  Code/Ruby/func_abc.rb runs
9twice and Code/Ruby/func_slow.rb once.
10
11# rb_who.d
12Tracing... Hit Ctrl-C to end.
13^C
14      PID    UID      LINES FILE
15   146485      0         12 ./func_abc.rb
16   146486      0         12 ./func_abc.rb
17   146487      0    1200015 ./func_slow.rb
18
19You can see that func_abc.rb has twelve lines of executable Ruby code, and
20that func_slow.rb has 100,000x that.
21