System information

84 System Analysis and Tuning Guide
IP address from which the TCP connection originated (IP_SOUCE)
To run the script, execute
stap/usr/share/doc/packages/systemtap/examples/network/tcp_connections.stp
and follow the output on the screen. To manually stop the script, press Ctrl + C.
5.5 User-Space Probing
For debugging user-space applications (like DTrace can do), SUSE Linux Enterprise
Server 11 SP3 supports user-space probing with SystemTap: Custom probe points can
be inserted in any user-space application. Thus, SystemTap lets you use both Kernel-
and user-space probes to debug the behavior of the whole system.
To get the required utrace infrastructure and the uprobes Kernel module for user-
space probing, you need to install the kernel-trace package in addition to the
packages listed in Section5.2, “Installation and Setup” (page74).
Basically, utrace implements a framework for controlling user-space tasks. It provides
an interface that can be used by various tracing “engines”, implemented as loadable
Kernel modules. The engines register callback functions for specific events, then at-
tach to whichever thread they wish to trace. As the callbacks are made from “safe”
places in the Kernel, this allows for great leeway in the kinds of processing the func-
tions can do. Various events can be watched via utrace, for example, system call en-
try and exit, fork(), signals being sent to the task, etc. More details about the utrace
infrastructure are available at http://sourceware.org/systemtap/wi
ki/utrace.
SystemTap includes support for probing the entry into and return from a function in
user-space processes, probing predefined markers in user-space code, and monitoring
user-process events.
To check if the currently running Kernel provides the needed utrace support, use the
following command:
grep CONFIG_UTRACE /boot/config-`uname -r`
For more details about user-space probing, refer to https://
sourceware.org/systemtap/SystemTap_Beginners_Guide/user
space-probing.html.