diff options
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US')
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Scripts.xml | 46 | ||||
-rw-r--r-- | doc/SystemTap_Beginners_Guide/en-US/Understanding_How_SystemTap_Works.xml | 7 |
2 files changed, 50 insertions, 3 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml new file mode 100644 index 00000000..abb087bc --- /dev/null +++ b/doc/SystemTap_Beginners_Guide/en-US/Scripts.xml @@ -0,0 +1,46 @@ +<?xml version='1.0'?> +<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ +]> + +<section id="scripts"> + <title>SystemTap Scripts</title> + + <para> + For the most part, SystemTap scripts are the foundation of each SystemTap session. The SystemTap scripts you use or write yourself instruct SystemTap on what type of information to trap, and what to do once that information is trapped. + </para> + + <para> + As stated in <xref linkend="understanding-how-systemtap-works"/>, SystemTap scripts are made up of two components: <emphasis>events</emphasis> and <emphasis>handlers</emphasis>. Once a SystemTap session is underway, SystemTap monitors the operating system for the specified events and executes the handlers as they occur. + </para> + +<note> + <title>Note</title> + <para>An event and its corresponding handler is collectively called a <emphasis>probe</emphasis>. A SystemTap script can have multiple probes, in the same manner that each event can have multiple corresponding handlers.</para> +</note> + + <para> + In terms of application development, using events and handlers is similar to inserting <command>print</command> statements in a program's sequence of commands. These <command>print</command> statements allow you to view a history of commands executed once the program is run. + </para> + + <para> + SystemTap scripts go one step further by allowing you more flexibility with regard to handlers. Events serve as the triggers for handlers to run; handlers can be specified to trap specified data and print it in a certain manner. + </para> + + + + <section id="systemtapscript-format"> + <title>Format</title> + <para> + SystemTap scripts use the following format: + </para> + </section> + + <!-- <section id="SystemTap_Beginners_Guide-Test-Section_2_Test"> + <title>Section 2 Test</title> + <para> + Test of a section + </para> + </section>--> + +</section> + 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 e418f561..de5d41b0 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 @@ -41,10 +41,11 @@ <step><para>Once the SystemTap session is terminated, the hooked events are disconnected from the kernel; afterwards, the kernel module is unloaded.</para></step> </procedure> -<para>This sequence is driver from a single command-line program: <command>stap</command>. This program is SystemTap's main front-end tool. For more information about <command>stap</command>, refer to <command>man stap</command> (once SystemTap is set up on your machine).</para> +<para>This sequence is driven from a single command-line program: <command>stap</command>. This program is SystemTap's main front-end tool. For more information about <command>stap</command>, refer to <command>man stap</command> (once SystemTap is set up on your machine).</para> </section> - +<xi:include href="Scripts.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> +<!-- <section id="understanding-scripts"> <title>SystemTap Scripts</title> @@ -52,7 +53,7 @@ ** definition, significance, structure, very basic examples, reference to later chapter (how to read library of preset SystemTap scripts in this book, using them) </remark> </section> - + --> <section id="understanding-tapsets"> <title>Tapsets</title> |