From c41e99c8f098302a9ed2eb4fcac6ff5e7cd79cab Mon Sep 17 00:00:00 2001 From: ddomingo Date: Thu, 27 Nov 2008 08:18:03 +1000 Subject: added index --- .../en-US/CrossInstrumenting.xml | 101 ++++- .../en-US/Installation.xml | 121 +++++- .../en-US/Introduction.xml | 53 ++- .../en-US/ScriptConstructs.xml | 200 ++++++++- doc/SystemTap_Beginners_Guide/en-US/Scripts.xml | 453 ++++++++++++++++++++- .../en-US/Understanding_How_SystemTap_Works.xml | 57 ++- .../en-US/Using_SystemTap.xml | 85 +++- 7 files changed, 1034 insertions(+), 36 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml b/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml index 3ff3c2d8..c4b643d3 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/CrossInstrumenting.xml @@ -4,12 +4,38 @@
Generating Instrumentation for Other Computers - + +cross-instrumentation +building kernel modules from SystemTap scripts + + + cross-instrumentation + generating instrumentation from SystemTap scripts + cross-compiling script from here: http://sources.redhat.com/ml/systemtap/2008-q3/msg00310.html - + + +kernel modules from SystemTap scripts, building + + + building kernel modules from SystemTap scripts + + + instrumentation modules from SystemTap scripts, building + + + building instrumentation modules from SystemTap scripts + + + compiling instrumentation/kernel modules from SystemTap scripts + + + +cross-compiling + above; add short description, significance, howto, script (test first) @@ -29,6 +55,14 @@ To work around this, you can resort to cross-instrumentation. Cross-instrumentation is the process of generating SystemTap instrumentation module from a SystemTap script on one computer to be used on another computer. This process offers the following benefits: + +cross-instrumentation +advantages of + + + +advantages of cross-instrumentation + @@ -73,6 +107,15 @@ + +cross-instrumentation +instrumentation module + + + +instrumentation module +cross-instrumentation + instrumentation module — the kernel module built from a SystemTap script; i.e. the SystemTap module is built on the host @@ -84,6 +127,15 @@ + +cross-instrumentation +host system + + + +host system +cross-instrumentation + host system — the system on which you compile the instrumentation modules (from SystemTap scripts), to be loaded on target @@ -93,6 +145,16 @@ + +cross-instrumentation +target system + + + +target system +cross-instrumentation + + target system — the system for which you are building the instrumentation module (from SystemTap scripts). @@ -101,6 +163,15 @@ + +cross-instrumentation +target kernel + + + +target kernel +cross-instrumentation + target kernel — the kernel of the target system. This is the kernel on which you wish to load/run the instrumentation @@ -120,7 +191,22 @@ Configuring a Host System and Target Systems + +cross-instrumentation +configuration +host system and target system + + + +host system and target system +cross-instrumentation +configuration + + + target system and host system + configuration + Install the systemtap-runtime RPM on each @@ -188,6 +274,17 @@ stap -r kernel_version script Note + +uname -m + + + +determining architecture notation + + + + architecture notation, determining + To determine the architecture notation of a running kernel, run uname -m. diff --git a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml index 568cb74c..1ff2ff29 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Installation.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Installation.xml @@ -12,7 +12,14 @@ notes in ~/Desktop/SystemTap/aug21chatlog and ~/Desktop/SystemTap/noted_wcohenmeeting - + +Installation +Setup and Installation + + + +Setup and Installation + To deploy SystemTap, you need to install the SystemTap packages along with the corresponding set of -devel, -debuginfo and -debuginfo-common @@ -38,7 +45,26 @@ To deploy Systemtap, you will need to to install the following RPMs: + +Installation +systemtap package + + + +systemtap package + + + + + + +Installation +systemtap-runtime package + + +systemtap-runtime package + systemtap systemtap-runtime @@ -51,7 +77,28 @@
Installing Required Kernel Information RPMs + +Installation +required packages + + +required packages + + + packages required to run SystemTap + + + RPMs required to run SystemTap + + + Installation + kernel information packages + + + + kernel information packages + SystemTap needs information about the kernel in order to place instrumentation in it (i.e. probe it). This information also allows SystemTap to generate the code for the instrumentation. This information is contained in the matching -devel and -debuginfo packages for your kernel. The necessary -devel and -debuginfo packages for the ordinary "vanilla" kernel are as follows: @@ -69,8 +116,21 @@ and kernel-PAE-devel. + +Installation +kernel version, determining the + - + +kernel version, determining the + + + +determining the kernel version + + + uname -r + To determine what kernel your system is currently using, use: @@ -103,7 +163,26 @@ uname -r (e.g. 2.6.18-92.el5) if you wish to probe a kernel that is not currently loaded. + + Installation + stapprep.sh + + + + stapprep.sh + + + + + + Installation + installation script + + + + installation script + Note Running as root will display the required kernel packages and install them as well, provided that yum and yum-utils are configured properly. @@ -120,7 +199,9 @@ uname -r The script can be used by normal users to determine what supporting kernel RPMs need to be installed on the machine to use SystemTap with a particular kernel. The script run without any arguments detemines the RPMs needed for the currently running kernel. The script can also accept one argument, the output uname -r, to determine the related RPMs required for a kernel that may not be currently running on the machine. --> - + +script for installing kernel information packages + stapprep.sh @@ -141,7 +222,26 @@ search the /etc/yum.repo.d/ directory for debuginfo repositories --> If you do not have yum and yum-utils installed (and you are unable to install them), you will have to manually download and install the required kernel information packages. To generate the URL from which to download the required packages, use the following script: - + +Installation +fedoradebugurl.sh + + + +fedoradebugurl.sh + + + + + + +Installation +rheldebugurl.sh + + + +rheldebugurl.sh + rheldebugurl.sh @@ -168,7 +268,18 @@ Once you have manually downloaded the required packages to the machine, install
Initial Testing - + +Installation +initial testing + + + +initial testing + + + +testing, initial + If you are currently using the kernel you wish to probe with SystemTap, you can immediately test whether the deployment was successful. If not, you will need to reboot and load the appropriate diff --git a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml index 47a11476..78ee1083 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml @@ -4,6 +4,17 @@ Introduction + + Introduction + performance monitoring + + + + performance monitoring + Introduction + + + SystemTap is a tracing and probing tool that allows users to study and monitor the activities of the operating system (particularly, the kernel) in fine detail. It provides information similar to the output of tools like netstat, ps, top, and iostat; however, SystemTap is designed to provide more filtering and analysis options for collected information. @@ -25,6 +36,27 @@ -->
Documentation Goals + + +Introduction +documentation goals + + + +documentation goals +Introduction + + +Introduction +goals, documentation + + + +goals, documentation +Introduction + + + SystemTap provides the infrastructure to monitor the running Linux kernel for detailed analysis. This can assist administrators and developers in identifying the underlying cause of a bug or performance problem. Without SystemTap, monitoring the activity of a running kernel would require a tedious instrument, recompile, install, and reboot sequence. SystemTap is designed to eliminate this, allowing users to gather the same information by simply running user-written SystemTap scripts. @@ -60,7 +92,15 @@ ** Short summary; when is SystemTap suitable vs other popular monitoring tools (e.g. top, Oprofile, /proc) - + +Introduction +capabilities of SystemTap + + + +capabilities of SystemTap +Introduction + SystemTap was originally developed as a working ∏ version of old Linux probing tools such as dprobes and the Linux Trace Toolkit. SystemTap aims to supplement the existing suite of Linux monitoring tools by providing users with the infrastructure to track kernel activity. In addition, SystemTap combines this capability with two things: + + Introduction + limitations of SystemTap + + + + limitations of SystemTap + Introduction + + + Limitations The current iteration of SystemTap allows for a multitude of options when probing kernel-space events. However, SystemTap's ability to probe user-space events is quite limited. At present, the developmental efforts of the SystemTap community are geared towards improving SystemTap's user-space probing capabilities. diff --git a/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml b/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml index 1cda95a4..e0917280 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/ScriptConstructs.xml @@ -4,15 +4,84 @@
Basic SystemTap Handler Constructs - + +handlers +SystemTap handler constructs + + + +SystemTap handlers +SystemTap handler constructs + + + + + +handlers +SystemTap handler constructs +syntax and format + + + +SystemTap handlers +SystemTap handler constructs +syntax and format + + + +syntax and format +SystemTap handler constructs +handlers + SystemTap supports the use of several basic constructs in handlers. The syntax for most of these handler constructs are mostly based on C and awk syntax. This section describes several of the most useful SystemTap handler constructs, which should provide you with enough information to write simple yet useful SystemTap scripts.
Variables - + + +handlers +SystemTap handler constructs +variables + + + +SystemTap handlers +SystemTap handler constructs +variables + + + +variables +SystemTap handler constructs +handlers + + + + format and syntax + SystemTap handler constructs + handlers + Variables can be used freely throughout a handler; simply choose a name, assign it to a function, and use it in an expression. SystemTap automatically identifies whether a variable should be identified as a string or integer, based on the function it is assigned to. For instance, if you use set the variable foo to gettimeofday_s() (as in foo = gettimeofday_s()), then foo can be used as an integer argument (%d) in printf(). + + + +handlers +SystemTap handler constructs +global + + +SystemTap handlers +SystemTap handler constructs +global + + + +global +SystemTap handler constructs +handlers + Note, however, that by default variables are only local to the probe they are used in. This means that variables are initialized, used and disposed at each probe handler invocation. To share a variable between probes, declare the variable name first using global outside of any probe. Consider the following example: @@ -30,6 +99,10 @@ probe timer.ms(12345) } + + +CONFIG_HZ, computing for + attempts to compute the CONFIG_HZ setting of the kernel using timers that count jiffies and milliseconds, then computing accordingly. The global statement allows the script to use the variables count_jiffies and count_ms (set in their own respective probes) to be shared with probe timer.ms(12345). @@ -50,6 +123,15 @@ probe timer.jiffies(100) { count_jiffies ++ }
Conditional Statements + +handlers +conditional statements + + + +SystemTap handlers +conditional statements + In some cases, the output of a SystemTap script may be too big. To address this, you need to further refine the script's logic in order to delimit the output into something more relevant or useful to your probe. @@ -62,6 +144,25 @@ You can do this by using conditionals in handlers. SystemTa If/Else Statements + + +handlers +conditional statements +if/else + + + +SystemTap handlers +conditional statements +if/else + + + +if/else +conditional statements +handlers + + Format: if (condition) @@ -95,6 +196,25 @@ probe end While Loops + + + +handlers +conditional statements +while loops + + + +SystemTap handlers +conditional statements +while loops + + + +while loops +conditional statements +handlers + Format: while (condition) {statement} @@ -119,6 +239,25 @@ printf("goodbye world\n") For Loops + + + +handlers +conditional statements +for loops + + + +SystemTap handlers +conditional statements +for loops + + + +for loops +conditional statements +handlers + Format: for (argument1; argument2; argument3) {statement} @@ -144,6 +283,26 @@ for (argument1; argument2; Conditional Operators + + + +handlers +conditional statements +conditional operators + + + +SystemTap handlers +conditional statements +conditional operators + + + +conditional operators +conditional statements +handlers + + Aside from == ("is equal to"), you can also use the following operators in your conditional statements: @@ -174,6 +333,23 @@ for (argument1; argument2;
Command-Line Arguments + +handlers +SystemTap handler constructs +command-line arguments + + + +SystemTap handlers +SystemTap handler constructs +command-line arguments + + + +command-line arguments +SystemTap handler constructs +handlers + You can also allow a SystemTap script to accept simple command-line arguments and declare them in the script without using target(). One way to do this is to use the variable notation $ or @. @@ -186,7 +362,25 @@ probe kernel.function(@1).return { } is similar to , except that it allows you to pass the kernel function to be probed as a command-line argument (as in stap commandlineargs.stp kernel function). You can also specify the script to accept multiple command-line arguments, noting them as @1, @2, and so on, in the order they are entered by the user. - + + + +handlers +SystemTap handler constructs +variable notations + + + +SystemTap handlers +SystemTap handler constructs +variable notations + + + +variable notations +SystemTap handler constructs +handlers + Both variable notations $ and @ also represent a specific variable type. Use $ if you are expecting the user to enter an integer as a command-line argument, and @ if you are expecting a string.
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml index b9eb036e..73f4c6b2 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml @@ -4,13 +4,54 @@
SystemTap Scripts - - + +scripts +introduction + + +SystemTap scripts +introduction + + + + + For the most part, SystemTap scripts are the foundation of each SystemTap session. SystemTap scripts instruct SystemTap on what type of information to collect, and what to do once that information is collected. - + +scripts +introduction +components + + +SystemTap scripts +introduction +components + + + + components + SystemTap scripts + introduction + + + +scripts +introduction +events and handlers + + +SystemTap scripts +introduction +events and handlers + + +handlers and events +SystemTap scripts +introduction + As stated in , SystemTap scripts are made up of two components: events and @@ -21,6 +62,21 @@ Note + +scripts +introduction +probes + + +SystemTap scripts +introduction +probes + + +probes +SystemTap scripts +introduction + An event and its corresponding handler is collectively called a probe. A SystemTap script can have multiple probes. @@ -51,6 +107,26 @@ Format + +scripts +introduction +format and syntax + + +SystemTap scripts +introduction +format and syntax + + +format and syntax +SystemTap scripts +introduction + + +syntax and format +SystemTap scripts +introduction + SystemTap scripts use the file extension .stp, and are conatains probes written in the following format: @@ -66,7 +142,21 @@ probe event {statements} single probe, SystemTap will execute the handler when any of the specified events occur. - + +scripts +introduction +statement blocks + + +SystemTap scripts +introduction +statement blocks + + +statement blocks +SystemTap scripts +introduction + Each probe has a corresponding statement block. This statement block is enclosed in braces ({ }) and contains the handlers to be executed per event. @@ -83,7 +173,21 @@ probe event {statements} administrator. - + +scripts +introduction +functions + + +SystemTap scripts +introduction +functions + + +functions +SystemTap scripts +introduction + Systemtap allows you to write functions to factor out code to be used by a number of probes. Thus, rather than repeatedly writing the same @@ -120,7 +224,10 @@ probe event {function_name
Event - + +Events +introduction + SystemTap events can be broadly classified into two types: synchronous and @@ -129,6 +236,15 @@ probe event {function_name Synchronous Events + +Events +synchronous events + + + +synchronous events +Events + A synchronous event occurs when any process executes an instruction that references a particular location in kernel @@ -140,7 +256,15 @@ probe event {function_name - + +Events +examples of synchronous and asynchronous events + + + +examples of synchronous and asynchronous events +Events + Examples of synchronous events include: @@ -148,6 +272,16 @@ probe event {function_name syscall.system_call + +Events +syscall.system_call + + + +syscall.system_call +Events + + The entry to the system call system_call. If the exit from a syscall @@ -161,13 +295,23 @@ probe event {function_name - vfs.file_op + vfs.file_operation + +Events +vfs.file_operation + + + +vfs.file_operation +Events + + - The entry to the file_op event for + The entry to the file_operation event for Virtual File System (VFS). Similar to syscall event, appending a .return to the event monitors - the exit of the file_op operation. + the exit of the file_operation operation. @@ -175,6 +319,15 @@ probe event {function_name kernel.function("function") + +Events +kernel.function("function") + + + +kernel.function("function") +Events + The entry to the kernel function function. For example, @@ -186,7 +339,17 @@ probe event {function_name string to the event statement; i.e. kernel.function("sys_open").return. - + +Events +wildcards + + + +wildcards in events + + + events wildcards + When defining functions, you can use asterisk (*) for wildcards. You can also trace the entry or exit of a function in @@ -217,6 +380,15 @@ probe kernel.function("*@net/socket.c").return { } module("module").function("function") + +Events +module("module + + + +module("module +Events + Allows you to probe functions within modules. For example: moduleprobe.stp @@ -240,6 +412,16 @@ probe module("ext3").function("*").return { } Asynchronous Events + +Events +asynchronous events + + + +asynchronous events +Events + + Asynchronous events are not tied to a particular instruction or location in code. This family of probe points consists @@ -255,6 +437,15 @@ probe module("ext3").function("*").return { } begin + +Events +begin + + + +begin +Events + The startup of a SystemTap session; i.e. as soon as the SystemTap script is run. @@ -265,12 +456,31 @@ probe module("ext3").function("*").return { } end + +Events +end + + + +end +Events + The end of a SystemTap session. timer events + +Events +timer events + + + +timer events +Events + + An event that specifies a handler to be executed every specified period of time. For example: @@ -329,10 +539,13 @@ probe timer.s(4) is reference appropriate? too advanced for readers (it seems so to me)? please advise.
- +
Systemtap Handler/Body - + +Handlers +introduction + Consider the following sample script: helloworld.stp @@ -354,6 +567,15 @@ probe begin Note + +Handlers +exit() + + + +exit() +Handlers + SystemTap scripts continue to run until the exit() function executes. If the users wants to stop @@ -364,6 +586,11 @@ probe begin printf ( ) Statements + + printf() + format strings + + The printf () statement is one of the simplest functions for printing data. printf () can also be @@ -376,14 +603,30 @@ probe begin printf ("format string\n", argument) - + +printf() +format strings + + + +format strings +printf() + The format string specifies how argument should be printed. The format string of simply instructs SystemTap to print hello world, and contains no format specifiers. - + +printf() +format specifiers + + + +format specifiers +printf() + You can use the format specifiers %s (for strings) and %d (for numbers) in format strings, depending on @@ -394,6 +637,19 @@ printf ("format string\n", argument Note + +printf() +syntax and format + + + +syntax and format +printf() + + +format and syntax +printf() + Semantically, the SystemTap printf function is very similar to its C language counterpart. The aforementioned syntax and format for SystemTap's printf function is @@ -437,7 +693,25 @@ hald(2360) open - SystemTap Functions + SystemTap Functions + +functions + + + +SystemTap script functions + + + + Handlers + handler functions + + + + handler functions + Handlers + + SystemTap supports a wide variety of functions that can be used as printf () arguments. @@ -448,6 +722,10 @@ hald(2360) open is "handler function" an appropriate term? wcohen: use "SystemTap functions" to match up language in man pages + +Handlers +handler functions + The following is a list of commonly-used SystemTap functions: @@ -455,6 +733,24 @@ hald(2360) open tid() + +Handlers +handler functions +tid() + + + +handler functions +Handlers +tid() + + + +tid() +Handlers +handler functions + + The ID of the current thread. @@ -462,6 +758,23 @@ hald(2360) open uid() + +Handlers +handler functions +uid() + + + +handler functions +Handlers +uid() + + + +uid() +Handlers +handler functions + The ID of the current user. @@ -469,6 +782,23 @@ hald(2360) open cpu() + +Handlers +handler functions +cpu() + + + +handler functions +Handlers +cpu() + + + +cpu() +Handlers +handler functions + The current CPU number. @@ -476,6 +806,24 @@ hald(2360) open gettimeofday_s() + +Handlers +handler functions +gettimeofday_s() + + + +handler functions +Handlers +gettimeofday_s() + + + +gettimeofday_s() +Handlers +handler functions + + The number of seconds since UNIX epoch (January 1, 1970). @@ -491,6 +839,23 @@ hald(2360) open pp() + +Handlers +handler functions +pp() + + + +handler functions +Handlers +pp() + + + +pp() +Handlers +handler functions + A string describing the probe point currently being handled. @@ -506,7 +871,24 @@ hald(2360) open thread_indent() - + +Handlers +handler functions +thread_indent() + + + +handler functions +Handlers +thread_indent() + + + +thread_indent() +Handlers +handler functions + + This particular function is quite useful, providing you with a way to better organize your print results. When used with an indentation parameter (for example, -1), it allows the probe @@ -584,6 +966,23 @@ that thread_indent is defined in tapsets as a special function of sorts name + +Handlers +handler functions +name + + + +handler functions +Handlers +name + + + +name +Handlers +handler functions + Identifies the name of a specific system call. This function can only be used in probes that use the event syscall.system_call. @@ -594,7 +993,25 @@ that thread_indent is defined in tapsets as a special function of sorts target() - + + +Handlers +handler functions +target() + + + +handler functions +Handlers +target() + + + +target() +Handlers +handler functions + + Used in conjunction with stap script -x process ID or stap diff --git a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml index 2cdfd58f..4e63ac4e 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml @@ -7,14 +7,30 @@ Short summary; probes, handlers, events + +Understanding How SystemTap Works + + - + SystemTap allows users to write and reuse simple scripts to deeply examine the activities of a running Linux system. These scripts can be designed to extract data, filter it, and summarize it quickly (and safely), enabling the diagnosis of complex performance (or even functional) problems. + +Understanding How SystemTap Works +events and handlers + + + +events and handlers + + + handlers and events + + The essential idea behind a SystemTap script is to name events, and to give them @@ -22,6 +38,15 @@ monitors for the event; once the event occurs, the Linux kernel then runs the handler as a quick sub-routine, then resumes. + +Understanding How SystemTap Works +event types + + + +event types +Understanding How SystemTap Works + There are several kind of events; entering/exiting a function, timer @@ -45,7 +70,18 @@ ** add design advantages? e.g. "building kmods on-the-fly allows safer execution of script etc etc" - + +Understanding How SystemTap Works +architecture + + + +architecture of SystemTap + + + + SystemTap architecture + A SystemTap session begins when you run a SystemTap script. This session occurs in the following fashion: @@ -53,7 +89,17 @@ SystemTap Session - + +Understanding How SystemTap Works +SystemTap sessions + + + +SystemTap sessions + + + sessions, SystemTap + First, SystemTap checks the script against the existing tapset library @@ -121,7 +167,10 @@ -->
Tapsets - + +Tapsets +definition of + definition, significance, difference with stap scripts (previous section), library of tapsets in system: location diff --git a/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml b/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml index f1637356..2b5384c4 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Using_SystemTap.xml @@ -7,14 +7,18 @@ short intro, contents of chapter + + Using SystemTap + + This chapter instructs users how to install SystemTap, and provides an introduction on how to run SystemTap scripts.
- Usage + Running SystemTap Scripts - basic commands (e.g. stap), useful options per command (e.g. stap -vv), tool references (man pages, related kernel-doc), references within book (i.e. errors chapter) @@ -25,6 +29,36 @@ + +Usage +running SystemTap scripts + + + +running SystemTap scripts +Usage + + + + Usage + stap + + + + stap + Usage + + + + + Usage + staprun + + + + staprun + Usage + SystemTap scripts are run through the command stap. stap can run SystemTap scripts from standard input or from file. @@ -38,6 +72,10 @@ + + +SystemTap scripts, how to run + Running stap and staprun requires elevated privileges to the system. However, not all users can be granted root access just to run SystemTap. In some cases, for instance, you may want to allow a non-privileged user to run SystemTap instrumentation on his machine. @@ -48,6 +86,15 @@ stapdev + +Usage +stapdev + + + +stapdev +Usage + Members of this group can use stap to run SystemTap scripts, or staprun to run SystemTap instrumentation modules. @@ -67,6 +114,15 @@ stapusr + +Usage +stapusr + + + +stapusr +Usage + Members of this group can only run staprun to run SystemTap instrumentation modules. In addition, they can only run those modules from /lib/modules/kernel_version/systemtap/. Note that this directory must be owned only by the root user, and must only be writable by the root user. @@ -77,9 +133,21 @@ Below is a list of commonly used stap options: - + +Usage +options, stap + + + +options, stap +Usage + + +stap options + + -v @@ -129,7 +197,18 @@ You can also instruct stap to run scripts from standard input using the switch -. To illustrate: - + + Usage + standard input, running scripts from + + + + standard input, running scripts from + Usage + + + running scripts from standard input + Running Scripts From Standard Input -- cgit