xref: /netbsd-src/external/cddl/dtracetoolkit/dist/Examples/py_who_example.txt (revision c29d51755812ace2e87aeefdb06cb2b4dac7087a)
1These are examples of the results after running the py_who.d script.
2
3This script shows which UIDs and PIDs are running Python programs with Python
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 the Code/Python/func_abc.py program is executed.
9
10# py_who.d
11Tracing... Hit Ctrl-C to end.
12^C
13
14      PID    UID  FUNCS FILE
15   145442      0      1 /usr/lib/python2.4/encodings/aliases.py
16   145442      0      1 /usr/lib/python2.4/linecache.py
17   145442      0      2 /usr/lib/python2.4/types.py
18   145442      0      4 /usr/lib/python2.4/encodings/__init__.py
19   145442      0      4 func_abc.py
20   145442      0      5 /usr/lib/python2.4/UserDict.py
21   145442      0      5 /usr/lib/python2.4/warnings.py
22   145442      0      6 /usr/lib/python2.4/codecs.py
23   145442      0      6 /usr/lib/python2.4/encodings/ascii.py
24   145442      0      7 /usr/lib/python2.4/copy_reg.py
25   145442      0     11 <string>
26   145442      0     13 /usr/lib/python2.4/stat.py
27   145442      0     14 /usr/lib/python2.4/os.py
28   145442      0     36 /usr/lib/python2.4/site.py
29   145442      0    115 /usr/lib/python2.4/posixpath.py
30
31You can see that the program itself had four lines executed attributed to it,
32and the other lines in the program were associated with their particular
33Python library calls.
34
35