Chapter 37. SystemTap
522
Figure 37.1. Flow of Data in SystemTap
37.3. Using SystemTap
Systemtap works by translating a SystemTap script to C, running the system C compiler to create a
kernel module from that. When the module is loaded, it activates all the probed events by hooking
into the kernel. Then, as events occur on any processor, the compiled handlers run. Eventually, the
session stops, the hooks are disconnected, and the module removed. This entire process is driven
from a single command-line program,
stap
.
37.3.1. Tracing
The simplest kind of probe is simply to trace an event. This is the effect of inserting strategically
located print statements into a program. This is often the first step of problem solving: explore by
seeing a history of what has happened.
This style of instrumentation is the simplest. It just asks systemtap to print something at each event.
To express this in the script language, you need to say where to probe and what to print there.
37.3.1.1. Where to Probe
Systemtap supports a number of built-in events. The library of scripts that comes with systemtap,
each called a "tapset", may define additional ones defined in terms of the built-in family. See the
Содержание ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION
Страница 22: ...xxii ...
Страница 28: ......
Страница 36: ...10 ...
Страница 40: ...14 ...
Страница 96: ...70 ...
Страница 116: ...90 ...
Страница 144: ...118 ...
Страница 146: ......
Страница 158: ...132 ...
Страница 165: ...Installing and Removing Packages 139 Figure 11 7 Installing and removing packages simultaneously ...
Страница 166: ...140 ...
Страница 172: ...146 ...
Страница 178: ......
Страница 228: ...202 ...
Страница 264: ...238 ...
Страница 318: ...292 ...
Страница 330: ...304 ...
Страница 388: ...362 ...
Страница 428: ...402 ...
Страница 452: ......
Страница 458: ...432 ...
Страница 476: ...450 ...
Страница 478: ...452 ...
Страница 494: ...468 ...
Страница 498: ...472 ...
Страница 530: ...504 ...
Страница 536: ...510 ...
Страница 544: ...Chapter 36 Log Files 518 Figure 36 7 Log file contents after five seconds ...
Страница 546: ......
Страница 550: ...524 ...
Страница 576: ......
Страница 584: ...558 ...
Страница 608: ......
Страница 776: ...750 ...
Страница 796: ...770 ...
Страница 800: ...774 ...
Страница 804: ......
Страница 806: ...780 ...
Страница 808: ...782 ...
Страница 816: ...790 ...
Страница 820: ...794 ...
Страница 822: ...796 ...
Страница 830: ...804 ...
Страница 836: ...810 ...
Страница 844: ...818 ...
Страница 848: ...822 ...