From f0e31baf0e49c3a5aaaddaa372cf33954b108190 Mon Sep 17 00:00:00 2001 From: ddomingo Date: Thu, 20 Nov 2008 09:35:43 +1000 Subject: changes as per tech review wcohen, run 1 --- doc/SystemTap_Beginners_Guide/en-US/Errors.xml | 2 +- .../en-US/Introduction.xml | 5 ++++- doc/SystemTap_Beginners_Guide/en-US/Scripts.xml | 24 +++++++++++++++++++--- .../en-US/Understanding_How_SystemTap_Works.xml | 3 ++- 4 files changed, 28 insertions(+), 6 deletions(-) (limited to 'doc/SystemTap_Beginners_Guide') diff --git a/doc/SystemTap_Beginners_Guide/en-US/Errors.xml b/doc/SystemTap_Beginners_Guide/en-US/Errors.xml index 13adc64f..3dbad229 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Errors.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Errors.xml @@ -28,7 +28,7 @@ replicate? - The following invalid SystemTap script is missing the the probe + The following invalid SystemTap script is missing the its probe handlers: diff --git a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml index dbca02fc..d63d7f8c 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Introduction.xml @@ -57,9 +57,12 @@ ** Short summary; when is SystemTap suitable vs other popular monitoring tools (e.g. top, Oprofile, /proc) + 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: + + Flexibility: SystemTap's framework allows users to develop simple scripts for investigating and monitoring a wide variety of kernel functions, system calls, and other events that occur in kernel-space. With this, SystemTap is not soo much a tool as it is a system that allows you to develop your own kernel-specific forensic and monitoring tools. diff --git a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml index ca507b43..e0b7c12c 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml @@ -44,7 +44,7 @@ SystemTap scripts allow insertion of the instrumentation code without - recompilation of the code. and allows more flexibility with regard to + recompilation of the code and allows more flexibility with regard to handlers. Events serve as the triggers for handlers to run; handlers can be specified to record specified data and print it in a certain manner. @@ -66,6 +66,23 @@ probe event {statements} single probe, SystemTap will execute the handler when any of the specified events occur. + + + Each probe has a corresponding statement block. This statement block is + enclosed in braces ({ }) and contains the handlers to be executed per event. + SystemTap executes these handlers (i.e. "statements") in sequence; special separators or + terminators are generally not necessary between multiple handlers. + + + + Note + + Statement blocks in SystemTap scripts follow the same syntax and semantics as the C + programming language. A statement block can also nest another statement block, although + for the most part this is used only to organize code in the script for the benefit of the + administrator. + + Systemtap allow you to write functions to factor out code to be used by a @@ -314,7 +331,7 @@ probe timer.s(4)
- Systemtap Handler/Boddy + Systemtap Handler/Body Consider the following sample script: @@ -462,13 +479,14 @@ hald(2360) open The number of seconds since UNIX epoch (January 1, 1970). - + pp() 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 506fea43..2cdfd58f 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 @@ -58,7 +58,8 @@ First, SystemTap checks the script against the existing tapset library (normally in /usr/share/systemtap/tapset/ for any - tapsets used. + tapsets used. SystemTap will then substitute any located tapsets with their + corresponding definitions in the tapset library. -- cgit