diff options
| author | fche <fche> | 2014-12-22 17:29:33 +0000 | 
|---|---|---|
| committer | fche <fche> | 2014-12-22 17:29:33 +0000 | 
| commit | 37d569d36747707abe7b672bfa89a543fb89c585 (patch) | |
| tree | c829cf82d3e4238bf69cb9dbeb7a91f662d54907 /SystemTap_Beginners_Guide | |
| parent | add new langref/*.html (diff) | |
added new man pages
Diffstat (limited to 'SystemTap_Beginners_Guide')
48 files changed, 211 insertions, 211 deletions
| diff --git a/SystemTap_Beginners_Guide/SystemTap_Beginners_Guide-Preface.html b/SystemTap_Beginners_Guide/SystemTap_Beginners_Guide-Preface.html index 9ce88679..7362b3b6 100644 --- a/SystemTap_Beginners_Guide/SystemTap_Beginners_Guide-Preface.html +++ b/SystemTap_Beginners_Guide/SystemTap_Beginners_Guide-Preface.html | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Preface</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="index.html" title="SystemTap Beginners Guide" /><link rel="next" href="pr01s02.html" title="2. We Need Feedback!" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="index.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="pr01s02.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="preface" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="SystemTap_Beginners_Guide-Preface"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Preface</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="index.html" title="SystemTap Beginners Guide" /><link rel="next" href="pr01s02.html" title="2. We Need Feedback!" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="index.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="pr01s02.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="preface" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="SystemTap_Beginners_Guide-Preface"> | 
| 3 | </a>Preface</h1></div></div></div><div class="para"> | 3 | </a>Preface</h1></div></div></div><div class="para"> | 
| 4 | 4 | ||
| 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="idm47723002008736"> | 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="idm47650199603760"> | 
| 6 | </a>1. Document Conventions</h2></div></div></div><div class="para"> | 6 | </a>1. Document Conventions</h2></div></div></div><div class="para"> | 
| 7 | This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. | 7 | This manual uses several conventions to highlight certain words and phrases and draw attention to specific pieces of information. | 
| 8 | </div><div class="para"> | 8 | </div><div class="para"> | 
| 9 | In PDF and paper editions, this manual uses typefaces drawn from the <a href="https://fedorahosted.org/liberation-fonts/">Liberation Fonts</a> set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the Liberation Fonts set by default. | 9 | In PDF and paper editions, this manual uses typefaces drawn from the <a href="https://fedorahosted.org/liberation-fonts/">Liberation Fonts</a> set. The Liberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternative but equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the Liberation Fonts set by default. | 
| 10 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm47722993083520"> | 10 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm47650146025328"> | 
| 11 | </a>1.1. Typographic Conventions</h3></div></div></div><div class="para"> | 11 | </a>1.1. Typographic Conventions</h3></div></div></div><div class="para"> | 
| 12 | Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows. | 12 | Four typographic conventions are used to call attention to specific words and phrases. These conventions, and the circumstances they apply to, are as follows. | 
| 13 | </div><div class="para"> | 13 | </div><div class="para"> | 
| @@ -56,7 +56,7 @@ | |||
| 56 | Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example: | 56 | Aside from standard usage for presenting the title of a work, italics denotes the first use of a new and important term. For example: | 
| 57 | </div><div class="blockquote"><blockquote class="blockquote"><div class="para"> | 57 | </div><div class="blockquote"><blockquote class="blockquote"><div class="para"> | 
| 58 | Publican is a <em class="firstterm">DocBook</em> publishing system. | 58 | Publican is a <em class="firstterm">DocBook</em> publishing system. | 
| 59 | </div></blockquote></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm47722995926912"> | 59 | </div></blockquote></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm47650199533440"> | 
| 60 | </a>1.2. Pull-quote Conventions</h3></div></div></div><div class="para"> | 60 | </a>1.2. Pull-quote Conventions</h3></div></div></div><div class="para"> | 
| 61 | Terminal output and source code listings are set off visually from the surrounding text. | 61 | Terminal output and source code listings are set off visually from the surrounding text. | 
| 62 | </div><div class="para"> | 62 | </div><div class="para"> | 
| @@ -82,7 +82,7 @@ books_tests Desktop1 downloads images notes scripts svgs</pre><div cla | |||
| 82 | 82 | ||
| 83 | System.<span class="perl_Function">out</span>.<span class="perl_Function">println</span>(<span class="perl_String">"Echo.echo('Hello') = "</span> + echo.<span class="perl_Function">echo</span>(<span class="perl_String">"Hello"</span>)); | 83 | System.<span class="perl_Function">out</span>.<span class="perl_Function">println</span>(<span class="perl_String">"Echo.echo('Hello') = "</span> + echo.<span class="perl_Function">echo</span>(<span class="perl_String">"Hello"</span>)); | 
| 84 | } | 84 | } | 
| 85 | }</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm47723003338560"> | 85 | }</pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="idm47650183097296"> | 
| 86 | </a>1.3. Notes and Warnings</h3></div></div></div><div class="para"> | 86 | </a>1.3. Notes and Warnings</h3></div></div></div><div class="para"> | 
| 87 | Finally, we use three visual styles to draw attention to information that might otherwise be overlooked. | 87 | Finally, we use three visual styles to draw attention to information that might otherwise be overlooked. | 
| 88 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 88 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 
| diff --git a/SystemTap_Beginners_Guide/arrayoperators.html b/SystemTap_Beginners_Guide/arrayoperators.html index 946567f3..4c947820 100644 --- a/SystemTap_Beginners_Guide/arrayoperators.html +++ b/SystemTap_Beginners_Guide/arrayoperators.html | |||
| @@ -1,13 +1,13 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5. Array Operations in SystemTap</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="associativearrays.html" title="3.4. Associative Arrays" /><link rel="next" href="arrayops-readvalues.html" title="3.5.2. Reading Values From Arrays" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="associativearrays.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-readvalues.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="arrayoperators"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5. Array Operations in SystemTap</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="associativearrays.html" title="3.4. Associative Arrays" /><link rel="next" href="arrayops-readvalues.html" title="3.5.2. Reading Values From Arrays" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="associativearrays.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-readvalues.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="arrayoperators"> | 
| 3 | </a>3.5. Array Operations in SystemTap</h2></div></div></div><a id="idm47723002787888" class="indexterm"></a><a id="idm47723001915712" class="indexterm"></a><div class="para"> | 3 | </a>3.5. Array Operations in SystemTap</h2></div></div></div><a id="idm47650190719472" class="indexterm"></a><a id="idm47650193396128" class="indexterm"></a><div class="para"> | 
| 4 | This section enumerates some of the most commonly used array operations in SystemTap. | 4 | This section enumerates some of the most commonly used array operations in SystemTap. | 
| 5 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-assignvalue"> | 5 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-assignvalue"> | 
| 6 | </a>3.5.1. Assigning an Associated Value</h3></div></div></div><a id="idm47723003693392" class="indexterm"></a><a id="idm47722987306768" class="indexterm"></a><a id="idm47722987305360" class="indexterm"></a><div class="para"> | 6 | </a>3.5.1. Assigning an Associated Value</h3></div></div></div><a id="idm47650187878224" class="indexterm"></a><a id="idm47650143612160" class="indexterm"></a><a id="idm47650143610752" class="indexterm"></a><div class="para"> | 
| 7 | Use <code class="command">=</code> to set an associated value to indexed unique pairs, as in: | 7 | Use <code class="command">=</code> to set an associated value to indexed unique pairs, as in: | 
| 8 | </div><pre class="screen"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>] = <em class="replaceable">value</em></pre><div class="para"> | 8 | </div><pre class="screen"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>] = <em class="replaceable">value</em></pre><div class="para"> | 
| 9 | <a class="xref" href="associativearrays.html#arraysimplestexample">Example 3.13, “Basic Array Statements”</a> shows a very basic example of how to set an explicit associated value to a unique key. You can also use a handler function as both your <code class="command"><em class="replaceable">index_expression</em></code> and <code class="command"><em class="replaceable">value</em></code>. For example, you can use arrays to set a timestamp as the associated value to a process name (which you wish to use as your unique key), as in: | 9 | <a class="xref" href="associativearrays.html#arraysimplestexample">Example 3.13, “Basic Array Statements”</a> shows a very basic example of how to set an explicit associated value to a unique key. You can also use a handler function as both your <code class="command"><em class="replaceable">index_expression</em></code> and <code class="command"><em class="replaceable">value</em></code>. For example, you can use arrays to set a timestamp as the associated value to a process name (which you wish to use as your unique key), as in: | 
| 10 | </div><a id="idm47722991061312" class="indexterm"></a><a id="idm47722957272176" class="indexterm"></a><a id="idm47722994316560" class="indexterm"></a><a id="idm47722993251776" class="indexterm"></a><a id="idm47722993249920" class="indexterm"></a><a id="idm47722957129296" class="indexterm"></a><div class="example"><a id="arrays-timestampprocessname"> | 10 | </div><a id="idm47650195685616" class="indexterm"></a><a id="idm47650187450064" class="indexterm"></a><a id="idm47650187346064" class="indexterm"></a><a id="idm47650143736272" class="indexterm"></a><a id="idm47650183808800" class="indexterm"></a><a id="idm47650185661264" class="indexterm"></a><div class="example"><a id="arrays-timestampprocessname"> | 
| 11 | </a><p class="title"><strong>Example 3.14. Associating Timestamps to Process Names</strong></p><div class="example-contents"><pre class="programlisting">foo[tid()] = gettimeofday_s()</pre></div></div><div class="para"> | 11 | </a><p class="title"><strong>Example 3.14. Associating Timestamps to Process Names</strong></p><div class="example-contents"><pre class="programlisting">foo[tid()] = gettimeofday_s()</pre></div></div><div class="para"> | 
| 12 | Whenever an event invokes the statement in <a class="xref" href="arrayoperators.html#arrays-timestampprocessname">Example 3.14, “Associating Timestamps to Process Names”</a>, SystemTap returns the appropriate <code class="command">tid()</code> value (that is, the ID of a thread, which is then used as the unique key). At the same time, SystemTap also uses the function <code class="command">gettimeofday_s()</code> to set the corresponding timestamp as the associated value to the unique key defined by the function <code class="command">tid()</code>. This creates an array composed of key pairs containing thread IDs and timestamps. | 12 | Whenever an event invokes the statement in <a class="xref" href="arrayoperators.html#arrays-timestampprocessname">Example 3.14, “Associating Timestamps to Process Names”</a>, SystemTap returns the appropriate <code class="command">tid()</code> value (that is, the ID of a thread, which is then used as the unique key). At the same time, SystemTap also uses the function <code class="command">gettimeofday_s()</code> to set the corresponding timestamp as the associated value to the unique key defined by the function <code class="command">tid()</code>. This creates an array composed of key pairs containing thread IDs and timestamps. | 
| 13 | </div><div class="para"> | 13 | </div><div class="para"> | 
| diff --git a/SystemTap_Beginners_Guide/arrayops-aggregates.html b/SystemTap_Beginners_Guide/arrayops-aggregates.html index 7f62301c..4627ae3a 100644 --- a/SystemTap_Beginners_Guide/arrayops-aggregates.html +++ b/SystemTap_Beginners_Guide/arrayops-aggregates.html | |||
| @@ -1,29 +1,29 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.7. Computing for Statistical Aggregates</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-conditionals.html" title="3.5.6. Using Arrays in Conditional Statements" /><link rel="next" href="understanding-tapsets.html" title="3.6. Tapsets" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-conditionals.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="understanding-tapsets.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-aggregates"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.7. Computing for Statistical Aggregates</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-conditionals.html" title="3.5.6. Using Arrays in Conditional Statements" /><link rel="next" href="understanding-tapsets.html" title="3.6. Tapsets" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-conditionals.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="understanding-tapsets.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-aggregates"> | 
| 3 | </a>3.5.7. Computing for Statistical Aggregates</h3></div></div></div><a id="idm47722956089696" class="indexterm"></a><a id="idm47722956088256" class="indexterm"></a><a id="idm47722954569408" class="indexterm"></a><a id="idm47722954568000" class="indexterm"></a><a id="idm47722997414384" class="indexterm"></a><div class="para"> | 3 | </a>3.5.7. Computing for Statistical Aggregates</h3></div></div></div><a id="idm47650183161408" class="indexterm"></a><a id="idm47650180999296" class="indexterm"></a><a id="idm47650180997888" class="indexterm"></a><a id="idm47650195680400" class="indexterm"></a><a id="idm47650195678992" class="indexterm"></a><div class="para"> | 
| 4 | Statistical aggregates are used to collect statistics on numerical values where it is important to accumulate new data quickly and in large volume (that is, storing only aggregated stream statistics). Statistical aggregates can be used in global variables or as elements in an array. | 4 | Statistical aggregates are used to collect statistics on numerical values where it is important to accumulate new data quickly and in large volume (that is, storing only aggregated stream statistics). Statistical aggregates can be used in global variables or as elements in an array. | 
| 5 | </div><a id="idm47722988626832" class="indexterm"></a><a id="idm47722988624976" class="indexterm"></a><a id="idm47722993174864" class="indexterm"></a><a id="idm47722993173008" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650193200592" class="indexterm"></a><a id="idm47650187965792" class="indexterm"></a><a id="idm47650188744928" class="indexterm"></a><a id="idm47650188743072" class="indexterm"></a><div class="para"> | 
| 6 | To add value to a statistical aggregate, use the operator <code class="command"><<< <em class="replaceable">value</em></code>. | 6 | To add value to a statistical aggregate, use the operator <code class="command"><<< <em class="replaceable">value</em></code>. | 
| 7 | </div><div class="example"><a id="simpleaggregates"> | 7 | </div><div class="example"><a id="simpleaggregates"> | 
| 8 | </a><p class="title"><strong>Example 3.21. stat-aggregates.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 8 | </a><p class="title"><strong>Example 3.21. stat-aggregates.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 
| 9 | probe vfs.read | 9 | probe vfs.read | 
| 10 | { | 10 | { | 
| 11 | reads[execname()] <<< $count | 11 | reads[execname()] <<< $count | 
| 12 | }</pre></div></div><a id="idm47722956107312" class="indexterm"></a><a id="idm47723004380016" class="indexterm"></a><a id="idm47723002680880" class="indexterm"></a><a id="idm47723002678992" class="indexterm"></a><div class="para"> | 12 | }</pre></div></div><a id="idm47650187096736" class="indexterm"></a><a id="idm47650187094848" class="indexterm"></a><a id="idm47650186861296" class="indexterm"></a><a id="idm47650182856144" class="indexterm"></a><div class="para"> | 
| 13 | In <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, the operator <code class="command"><<< $count</code> <span class="emphasis"><em>stores</em></span> the amount returned by <code class="literal">$count</code> to the associated value of the corresponding <code class="command">execname()</code> in the <code class="literal">reads</code> array. Remember, these values are <span class="emphasis"><em>stored</em></span>; they are not added to the associated values of each unique key, nor are they used to replace the current associated values. In a manner of speaking, think of it as having each unique key (<code class="command">execname()</code>) having multiple associated values, accumulating with each probe handler run. | 13 | In <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, the operator <code class="command"><<< $count</code> <span class="emphasis"><em>stores</em></span> the amount returned by <code class="literal">$count</code> to the associated value of the corresponding <code class="command">execname()</code> in the <code class="literal">reads</code> array. Remember, these values are <span class="emphasis"><em>stored</em></span>; they are not added to the associated values of each unique key, nor are they used to replace the current associated values. In a manner of speaking, think of it as having each unique key (<code class="command">execname()</code>) having multiple associated values, accumulating with each probe handler run. | 
| 14 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 14 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 
| 15 | In the context of <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, <code class="literal">count</code> returns the amount of data read by the returned <code class="command">execname()</code> to the virtual file system. | 15 | In the context of <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, <code class="literal">count</code> returns the amount of data read by the returned <code class="command">execname()</code> to the virtual file system. | 
| 16 | </div></div></div><a id="idm47722997400272" class="indexterm"></a><a id="idm47722997398416" class="indexterm"></a><a id="idm47722949091200" class="indexterm"></a><a id="idm47722987994064" class="indexterm"></a><a id="idm47722987992208" class="indexterm"></a><div class="para"> | 16 | </div></div></div><a id="idm47650150784624" class="indexterm"></a><a id="idm47650185614672" class="indexterm"></a><a id="idm47650193289312" class="indexterm"></a><a id="idm47650193287456" class="indexterm"></a><a id="idm47650154416448" class="indexterm"></a><div class="para"> | 
| 17 | To extract data collected by statistical aggregates, use the syntax format <code class="command">@<em class="replaceable">extractor</em>(<em class="replaceable">variable/array index expression</em>)</code>. <code class="command"><em class="replaceable">extractor</em></code> can be any of the following integer extractors: | 17 | To extract data collected by statistical aggregates, use the syntax format <code class="command">@<em class="replaceable">extractor</em>(<em class="replaceable">variable/array index expression</em>)</code>. <code class="command"><em class="replaceable">extractor</em></code> can be any of the following integer extractors: | 
| 18 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">count</span></dt><dd><a id="idm47722988191680" class="indexterm"></a><a id="idm47722995767280" class="indexterm"></a><a id="idm47722995766064" class="indexterm"></a><a id="idm47722995764848" class="indexterm"></a><div class="para"> | 18 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">count</span></dt><dd><a id="idm47650148421728" class="indexterm"></a><a id="idm47650148420512" class="indexterm"></a><a id="idm47650197186864" class="indexterm"></a><a id="idm47650197185648" class="indexterm"></a><div class="para"> | 
| 19 | Returns the number of all values stored into the variable/array index expression. Given the sample probe in <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, the expression <code class="command">@count(reads[execname()])</code> will return <span class="emphasis"><em>how many values are stored</em></span> in each unique key in array <code class="literal">reads</code>. | 19 | Returns the number of all values stored into the variable/array index expression. Given the sample probe in <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, the expression <code class="command">@count(reads[execname()])</code> will return <span class="emphasis"><em>how many values are stored</em></span> in each unique key in array <code class="literal">reads</code>. | 
| 20 | </div></dd><dt><span class="term">sum</span></dt><dd><a id="idm47723005479952" class="indexterm"></a><a id="idm47722960429408" class="indexterm"></a><a id="idm47722960428192" class="indexterm"></a><a id="idm47722960426976" class="indexterm"></a><div class="para"> | 20 | </div></dd><dt><span class="term">sum</span></dt><dd><a id="idm47650193163792" class="indexterm"></a><a id="idm47650146526992" class="indexterm"></a><a id="idm47650146525776" class="indexterm"></a><a id="idm47650143615056" class="indexterm"></a><div class="para"> | 
| 21 | Returns the sum of all values stored into the variable/array index expression. Again, given sample probe in <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, the expression <code class="command">@sum(reads[execname()])</code> will return <span class="emphasis"><em>the total of all values stored</em></span> in each unique key in array <code class="literal">reads</code>. | 21 | Returns the sum of all values stored into the variable/array index expression. Again, given sample probe in <a class="xref" href="arrayops-aggregates.html#simpleaggregates">Example 3.21, “stat-aggregates.stp”</a>, the expression <code class="command">@sum(reads[execname()])</code> will return <span class="emphasis"><em>the total of all values stored</em></span> in each unique key in array <code class="literal">reads</code>. | 
| 22 | </div></dd><dt><span class="term">min</span></dt><dd><a id="idm47723004329136" class="indexterm"></a><a id="idm47722952889584" class="indexterm"></a><a id="idm47722952888368" class="indexterm"></a><a id="idm47722952887152" class="indexterm"></a><div class="para"> | 22 | </div></dd><dt><span class="term">min</span></dt><dd><a id="idm47650154392864" class="indexterm"></a><a id="idm47650154391648" class="indexterm"></a><a id="idm47650154390432" class="indexterm"></a><a id="idm47650144425712" class="indexterm"></a><div class="para"> | 
| 23 | Returns the smallest among all the values stored in the variable/array index expression. | 23 | Returns the smallest among all the values stored in the variable/array index expression. | 
| 24 | </div></dd><dt><span class="term">max</span></dt><dd><a id="idm47723003537376" class="indexterm"></a><a id="idm47723003536160" class="indexterm"></a><a id="idm47723003534944" class="indexterm"></a><a id="idm47722955525648" class="indexterm"></a><div class="para"> | 24 | </div></dd><dt><span class="term">max</span></dt><dd><a id="idm47650193129904" class="indexterm"></a><a id="idm47650193128688" class="indexterm"></a><a id="idm47650183562720" class="indexterm"></a><a id="idm47650183561504" class="indexterm"></a><div class="para"> | 
| 25 | Returns the largest among all the values stored in the variable/array index expression. | 25 | Returns the largest among all the values stored in the variable/array index expression. | 
| 26 | </div></dd><dt><span class="term">avg</span></dt><dd><a id="idm47722988646048" class="indexterm"></a><a id="idm47722988644832" class="indexterm"></a><a id="idm47722988101040" class="indexterm"></a><a id="idm47722988099824" class="indexterm"></a><div class="para"> | 26 | </div></dd><dt><span class="term">avg</span></dt><dd><a id="idm47650149564416" class="indexterm"></a><a id="idm47650149563200" class="indexterm"></a><a id="idm47650149561984" class="indexterm"></a><a id="idm47650154815856" class="indexterm"></a><div class="para"> | 
| 27 | Returns the average of all values stored in the variable/array index expression. | 27 | Returns the average of all values stored in the variable/array index expression. | 
| 28 | </div></dd></dl></div><div class="para"> | 28 | </div></dd></dl></div><div class="para"> | 
| 29 | When using statistical aggregates, you can also build array constructs that use multiple index expressions (to a maximum of 5). This is helpful in capturing additional contextual information during a probe. For example: | 29 | When using statistical aggregates, you can also build array constructs that use multiple index expressions (to a maximum of 5). This is helpful in capturing additional contextual information during a probe. For example: | 
| diff --git a/SystemTap_Beginners_Guide/arrayops-conditionals.html b/SystemTap_Beginners_Guide/arrayops-conditionals.html index 9bb7b1d0..80b891ad 100644 --- a/SystemTap_Beginners_Guide/arrayops-conditionals.html +++ b/SystemTap_Beginners_Guide/arrayops-conditionals.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.6. Using Arrays in Conditional Statements</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-deleting.html" title="3.5.5. Clearing/Deleting Arrays and Array Elements" /><link rel="next" href="arrayops-aggregates.html" title="3.5.7. Computing for Statistical Aggregates" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-deleting.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-aggregates.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-conditionals"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.6. Using Arrays in Conditional Statements</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-deleting.html" title="3.5.5. Clearing/Deleting Arrays and Array Elements" /><link rel="next" href="arrayops-aggregates.html" title="3.5.7. Computing for Statistical Aggregates" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-deleting.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-aggregates.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-conditionals"> | 
| 3 | </a>3.5.6. Using Arrays in Conditional Statements</h3></div></div></div><a id="idm47722997181856" class="indexterm"></a><a id="idm47722997180448" class="indexterm"></a><a id="idm47723009274160" class="indexterm"></a><a id="idm47723009272752" class="indexterm"></a><div class="para"> | 3 | </a>3.5.6. Using Arrays in Conditional Statements</h3></div></div></div><a id="idm47650193586160" class="indexterm"></a><a id="idm47650193584752" class="indexterm"></a><a id="idm47650183708256" class="indexterm"></a><a id="idm47650183706848" class="indexterm"></a><div class="para"> | 
| 4 | You can also use associative arrays in <code class="command">if</code> statements. This is useful if you want to execute a subroutine once a value in the array matches a certain condition. Consider the following example: | 4 | You can also use associative arrays in <code class="command">if</code> statements. This is useful if you want to execute a subroutine once a value in the array matches a certain condition. Consider the following example: | 
| 5 | </div><div class="example"><a id="simplevfsreadprintif"> | 5 | </div><div class="example"><a id="simplevfsreadprintif"> | 
| 6 | </a><p class="title"><strong>Example 3.19. vfsreads-print-if-1kb.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 6 | </a><p class="title"><strong>Example 3.19. vfsreads-print-if-1kb.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 
| @@ -19,7 +19,7 @@ probe timer.s(3) | |||
| 19 | printf("%s : %dB \n", count, reads[count]) | 19 | printf("%s : %dB \n", count, reads[count]) | 
| 20 | }</pre></div></div><div class="para"> | 20 | }</pre></div></div><div class="para"> | 
| 21 | Every three seconds, <a class="xref" href="arrayops-conditionals.html#simplevfsreadprintif">Example 3.19, “vfsreads-print-if-1kb.stp”</a> prints out a list of all processes, along with how many times each process performed a VFS read. If the associated value of a process name is equal or greater than 1024, the <code class="command">if</code> statement in the script converts and prints it out in <code class="command">kB</code>. | 21 | Every three seconds, <a class="xref" href="arrayops-conditionals.html#simplevfsreadprintif">Example 3.19, “vfsreads-print-if-1kb.stp”</a> prints out a list of all processes, along with how many times each process performed a VFS read. If the associated value of a process name is equal or greater than 1024, the <code class="command">if</code> statement in the script converts and prints it out in <code class="command">kB</code>. | 
| 22 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Testing for Membership</div><a id="idm47722995891440" class="indexterm"></a><a id="idm47722960508672" class="indexterm"></a><a id="idm47722960507456" class="indexterm"></a><a id="idm47722990832672" class="indexterm"></a><a id="idm47722990831456" class="indexterm"></a> | 22 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Testing for Membership</div><a id="idm47650150658128" class="indexterm"></a><a id="idm47650148510784" class="indexterm"></a><a id="idm47650148509568" class="indexterm"></a><a id="idm47650193028880" class="indexterm"></a><a id="idm47650193027664" class="indexterm"></a> | 
| 23 | You can also test whether a specific unique key is a member of an array. Further, membership in an array can be used in <code class="command">if</code> statements, as in: | 23 | You can also test whether a specific unique key is a member of an array. Further, membership in an array can be used in <code class="command">if</code> statements, as in: | 
| 24 | </div><pre class="screen">if([<em class="replaceable">index_expression</em>] in <em class="replaceable">array_name</em>) <em class="replaceable">statement</em></pre><div class="para"> | 24 | </div><pre class="screen">if([<em class="replaceable">index_expression</em>] in <em class="replaceable">array_name</em>) <em class="replaceable">statement</em></pre><div class="para"> | 
| 25 | To illustrate this, consider the following example: | 25 | To illustrate this, consider the following example: | 
| diff --git a/SystemTap_Beginners_Guide/arrayops-deleting.html b/SystemTap_Beginners_Guide/arrayops-deleting.html index 2af77c00..4497818e 100644 --- a/SystemTap_Beginners_Guide/arrayops-deleting.html +++ b/SystemTap_Beginners_Guide/arrayops-deleting.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.5. Clearing/Deleting Arrays and Array Elements</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-foreach.html" title="3.5.4. Processing Multiple Elements in an Array" /><link rel="next" href="arrayops-conditionals.html" title="3.5.6. Using Arrays in Conditional Statements" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-foreach.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-conditionals.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-deleting"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.5. Clearing/Deleting Arrays and Array Elements</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-foreach.html" title="3.5.4. Processing Multiple Elements in an Array" /><link rel="next" href="arrayops-conditionals.html" title="3.5.6. Using Arrays in Conditional Statements" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-foreach.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-conditionals.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-deleting"> | 
| 3 | </a>3.5.5. Clearing/Deleting Arrays and Array Elements</h3></div></div></div><a id="idm47722949214848" class="indexterm"></a><a id="idm47723003695360" class="indexterm"></a><a id="idm47722987334480" class="indexterm"></a><a id="idm47722987333072" class="indexterm"></a><a id="idm47722991059056" class="indexterm"></a><div class="para"> | 3 | </a>3.5.5. Clearing/Deleting Arrays and Array Elements</h3></div></div></div><a id="idm47650143425088" class="indexterm"></a><a id="idm47650143750016" class="indexterm"></a><a id="idm47650143748608" class="indexterm"></a><a id="idm47650190270480" class="indexterm"></a><a id="idm47650190430928" class="indexterm"></a><div class="para"> | 
| 4 | Sometimes, you may need to clear the associated values in array elements, or reset an entire array for re-use in another probe. <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a> in <a class="xref" href="arrayops-foreach.html">Section 3.5.4, “Processing Multiple Elements in an Array”</a> allows you to track how the number of VFS reads per process grows over time, but it does not show you the number of VFS reads each process makes per 3-second period. | 4 | Sometimes, you may need to clear the associated values in array elements, or reset an entire array for re-use in another probe. <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a> in <a class="xref" href="arrayops-foreach.html">Section 3.5.4, “Processing Multiple Elements in an Array”</a> allows you to track how the number of VFS reads per process grows over time, but it does not show you the number of VFS reads each process makes per 3-second period. | 
| 5 | </div><a id="idm47722997967712" class="indexterm"></a><a id="idm47723005398352" class="indexterm"></a><a id="idm47722997351264" class="indexterm"></a><a id="idm47722997349376" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650150799264" class="indexterm"></a><a id="idm47650193290912" class="indexterm"></a><a id="idm47650188639520" class="indexterm"></a><a id="idm47650188637632" class="indexterm"></a><div class="para"> | 
| 6 | To do that, you will need to clear the values accumulated by the array. You can accomplish this using the <code class="command">delete</code> operator to delete elements in an array, or an entire array. Consider the following example: | 6 | To do that, you will need to clear the values accumulated by the array. You can accomplish this using the <code class="command">delete</code> operator to delete elements in an array, or an entire array. Consider the following example: | 
| 7 | </div><a id="idm47723001298512" class="indexterm"></a><a id="idm47723001263152" class="indexterm"></a><a id="idm47722995808224" class="indexterm"></a><a id="idm47723001261968" class="indexterm"></a><div class="example"><a id="simplevfsreadprintnotcumulative"> | 7 | </div><a id="idm47650185620336" class="indexterm"></a><a id="idm47650185618480" class="indexterm"></a><a id="idm47650183637600" class="indexterm"></a><a id="idm47650183235728" class="indexterm"></a><div class="example"><a id="simplevfsreadprintnotcumulative"> | 
| 8 | </a><p class="title"><strong>Example 3.18. noncumulative-vfsreads.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 8 | </a><p class="title"><strong>Example 3.18. noncumulative-vfsreads.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 
| 9 | probe vfs.read | 9 | probe vfs.read | 
| 10 | { | 10 | { | 
| @@ -17,7 +17,7 @@ probe timer.s(3) | |||
| 17 | delete reads | 17 | delete reads | 
| 18 | }</pre></div></div><div class="para"> | 18 | }</pre></div></div><div class="para"> | 
| 19 | In <a class="xref" href="arrayops-deleting.html#simplevfsreadprintnotcumulative">Example 3.18, “noncumulative-vfsreads.stp”</a>, the second probe prints the number of VFS reads each process made <span class="emphasis"><em>within the probed 3-second period only</em></span>. The <code class="command">delete reads</code> statement clears the <code class="command">reads</code> array within the probe. | 19 | In <a class="xref" href="arrayops-deleting.html#simplevfsreadprintnotcumulative">Example 3.18, “noncumulative-vfsreads.stp”</a>, the second probe prints the number of VFS reads each process made <span class="emphasis"><em>within the probed 3-second period only</em></span>. The <code class="command">delete reads</code> statement clears the <code class="command">reads</code> array within the probe. | 
| 20 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47722994668608" class="indexterm"></a><a id="idm47722997607552" class="indexterm"></a><a id="idm47722960481440" class="indexterm"></a><a id="idm47722994311376" class="indexterm"></a><div class="para"> | 20 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47650143593584" class="indexterm"></a><a id="idm47650154863840" class="indexterm"></a><a id="idm47650154861984" class="indexterm"></a><a id="idm47650199496960" class="indexterm"></a><div class="para"> | 
| 21 | You can have multiple array operations within the same probe. Using the examples from <a class="xref" href="arrayops-foreach.html">Section 3.5.4, “Processing Multiple Elements in an Array”</a> and <a class="xref" href="arrayops-deleting.html">Section 3.5.5, “Clearing/Deleting Arrays and Array Elements”</a> , you can track the number of VFS reads each process makes per 3-second period <span class="emphasis"><em>and</em></span> tally the cumulative VFS reads of those same processes. Consider the following example: | 21 | You can have multiple array operations within the same probe. Using the examples from <a class="xref" href="arrayops-foreach.html">Section 3.5.4, “Processing Multiple Elements in an Array”</a> and <a class="xref" href="arrayops-deleting.html">Section 3.5.5, “Clearing/Deleting Arrays and Array Elements”</a> , you can track the number of VFS reads each process makes per 3-second period <span class="emphasis"><em>and</em></span> tally the cumulative VFS reads of those same processes. Consider the following example: | 
| 22 | </div><pre class="screen">global reads, totalreads | 22 | </div><pre class="screen">global reads, totalreads | 
| 23 | 23 | ||
| diff --git a/SystemTap_Beginners_Guide/arrayops-foreach.html b/SystemTap_Beginners_Guide/arrayops-foreach.html index 00814caa..0039b6c5 100644 --- a/SystemTap_Beginners_Guide/arrayops-foreach.html +++ b/SystemTap_Beginners_Guide/arrayops-foreach.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.4. Processing Multiple Elements in an Array</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-increment.html" title="3.5.3. Incrementing Associated Values" /><link rel="next" href="arrayops-deleting.html" title="3.5.5. Clearing/Deleting Arrays and Array Elements" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-increment.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-deleting.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-foreach"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.4. Processing Multiple Elements in an Array</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-increment.html" title="3.5.3. Incrementing Associated Values" /><link rel="next" href="arrayops-deleting.html" title="3.5.5. Clearing/Deleting Arrays and Array Elements" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-increment.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-deleting.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-foreach"> | 
| 3 | </a>3.5.4. Processing Multiple Elements in an Array</h3></div></div></div><a id="idm47722999783984" class="indexterm"></a><a id="idm47722994408256" class="indexterm"></a><a id="idm47722995890112" class="indexterm"></a><a id="idm47722995888704" class="indexterm"></a><a id="idm47722990747760" class="indexterm"></a><a id="idm47722990746352" class="indexterm"></a><div class="para"> | 3 | </a>3.5.4. Processing Multiple Elements in an Array</h3></div></div></div><a id="idm47650183702448" class="indexterm"></a><a id="idm47650183701040" class="indexterm"></a><a id="idm47650192763712" class="indexterm"></a><a id="idm47650187439632" class="indexterm"></a><a id="idm47650187438224" class="indexterm"></a><a id="idm47650193336336" class="indexterm"></a><div class="para"> | 
| 4 | Once you've collected enough information in an array, you will need to retrieve and process all elements in that array to make it useful. Consider <a class="xref" href="arrayops-increment.html#simplesimplevfsread">Example 3.16, “vfsreads.stp”</a>: the script collects information about how many VFS reads each process performs, but does not specify what to do with it. The obvious means for making <a class="xref" href="arrayops-increment.html#simplesimplevfsread">Example 3.16, “vfsreads.stp”</a> useful is to print the key pairs in the array <code class="command">reads</code>, but how? | 4 | Once you've collected enough information in an array, you will need to retrieve and process all elements in that array to make it useful. Consider <a class="xref" href="arrayops-increment.html#simplesimplevfsread">Example 3.16, “vfsreads.stp”</a>: the script collects information about how many VFS reads each process performs, but does not specify what to do with it. The obvious means for making <a class="xref" href="arrayops-increment.html#simplesimplevfsread">Example 3.16, “vfsreads.stp”</a> useful is to print the key pairs in the array <code class="command">reads</code>, but how? | 
| 5 | </div><a id="idm47723005625552" class="indexterm"></a><a id="idm47722987807008" class="indexterm"></a><a id="idm47723009159840" class="indexterm"></a><a id="idm47722990574880" class="indexterm"></a><a id="idm47722999343424" class="indexterm"></a><a id="idm47722999341568" class="indexterm"></a><a id="idm47722991065840" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650193031440" class="indexterm"></a><a id="idm47650185643936" class="indexterm"></a><a id="idm47650191037728" class="indexterm"></a><a id="idm47650191035840" class="indexterm"></a><a id="idm47650196239008" class="indexterm"></a><a id="idm47650183795472" class="indexterm"></a><a id="idm47650183134112" class="indexterm"></a><div class="para"> | 
| 6 | The best way to process all key pairs in an array (as an iteration) is to use the <code class="command">foreach</code> statement. Consider the following example: | 6 | The best way to process all key pairs in an array (as an iteration) is to use the <code class="command">foreach</code> statement. Consider the following example: | 
| 7 | </div><a id="idm47723001306624" class="indexterm"></a><a id="idm47723001304768" class="indexterm"></a><a id="idm47722987816496" class="indexterm"></a><a id="idm47723001869728" class="indexterm"></a><a id="idm47722957122224" class="indexterm"></a><div class="example"><a id="simplevfsreadprint"> | 7 | </div><a id="idm47650151132208" class="indexterm"></a><a id="idm47650151130352" class="indexterm"></a><a id="idm47650193628592" class="indexterm"></a><a id="idm47650190666848" class="indexterm"></a><a id="idm47650148492880" class="indexterm"></a><div class="example"><a id="simplevfsreadprint"> | 
| 8 | </a><p class="title"><strong>Example 3.17. cumulative-vfsreads.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 8 | </a><p class="title"><strong>Example 3.17. cumulative-vfsreads.stp</strong></p><div class="example-contents"><pre class="programlisting">global reads | 
| 9 | probe vfs.read | 9 | probe vfs.read | 
| 10 | { | 10 | { | 
| @@ -18,7 +18,7 @@ probe timer.s(3) | |||
| 18 | In the second probe of <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a>, the <code class="command">foreach</code> statement uses the variable <code class="command">count</code> to reference each iteration of a unique key in the array <code class="command">reads</code>. The <code class="command">reads[count]</code> array statement in the same probe retrieves the associated value of each unique key. | 18 | In the second probe of <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a>, the <code class="command">foreach</code> statement uses the variable <code class="command">count</code> to reference each iteration of a unique key in the array <code class="command">reads</code>. The <code class="command">reads[count]</code> array statement in the same probe retrieves the associated value of each unique key. | 
| 19 | </div><div class="para"> | 19 | </div><div class="para"> | 
| 20 | Given what we know about the first probe in <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a>, the script prints VFS-read statistics every 3 seconds, displaying names of processes that performed a VFS-read along with a corresponding VFS-read count. | 20 | Given what we know about the first probe in <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a>, the script prints VFS-read statistics every 3 seconds, displaying names of processes that performed a VFS-read along with a corresponding VFS-read count. | 
| 21 | </div><a id="idm47723005199872" class="indexterm"></a><a id="idm47722989120256" class="indexterm"></a><a id="idm47722989118400" class="indexterm"></a><a id="idm47722994452048" class="indexterm"></a><a id="idm47723002707424" class="indexterm"></a><a id="idm47722999415584" class="indexterm"></a><a id="idm47722999413728" class="indexterm"></a><a id="idm47722987339680" class="indexterm"></a><div class="para"> | 21 | </div><a id="idm47650185616704" class="indexterm"></a><a id="idm47650196234816" class="indexterm"></a><a id="idm47650192788288" class="indexterm"></a><a id="idm47650191371328" class="indexterm"></a><a id="idm47650191369104" class="indexterm"></a><a id="idm47650186822992" class="indexterm"></a><a id="idm47650150801920" class="indexterm"></a><a id="idm47650148424672" class="indexterm"></a><div class="para"> | 
| 22 | Now, remember that the <code class="command">foreach</code> statement in <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a> prints <span class="emphasis"><em>all</em></span> iterations of process names in the array, and in no particular order. You can instruct the script to process the iterations in a particular order by using <code class="command">+</code> (ascending) or <code class="command">-</code> (descending). In addition, you can also limit the number of iterations the script needs to process with the <code class="command">limit <em class="replaceable">value</em></code> option. | 22 | Now, remember that the <code class="command">foreach</code> statement in <a class="xref" href="arrayops-foreach.html#simplevfsreadprint">Example 3.17, “cumulative-vfsreads.stp”</a> prints <span class="emphasis"><em>all</em></span> iterations of process names in the array, and in no particular order. You can instruct the script to process the iterations in a particular order by using <code class="command">+</code> (ascending) or <code class="command">-</code> (descending). In addition, you can also limit the number of iterations the script needs to process with the <code class="command">limit <em class="replaceable">value</em></code> option. | 
| 23 | </div><div class="para"> | 23 | </div><div class="para"> | 
| 24 | For example, consider the following replacement probe: | 24 | For example, consider the following replacement probe: | 
| diff --git a/SystemTap_Beginners_Guide/arrayops-increment.html b/SystemTap_Beginners_Guide/arrayops-increment.html index 99a0374d..32b92cd6 100644 --- a/SystemTap_Beginners_Guide/arrayops-increment.html +++ b/SystemTap_Beginners_Guide/arrayops-increment.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.3. Incrementing Associated Values</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-readvalues.html" title="3.5.2. Reading Values From Arrays" /><link rel="next" href="arrayops-foreach.html" title="3.5.4. Processing Multiple Elements in an Array" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-readvalues.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-foreach.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-increment"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.3. Incrementing Associated Values</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayops-readvalues.html" title="3.5.2. Reading Values From Arrays" /><link rel="next" href="arrayops-foreach.html" title="3.5.4. Processing Multiple Elements in an Array" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-readvalues.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-foreach.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-increment"> | 
| 3 | </a>3.5.3. Incrementing Associated Values</h3></div></div></div><a id="idm47722999345552" class="indexterm"></a><a id="idm47722999344144" class="indexterm"></a><a id="idm47722999654064" class="indexterm"></a><div class="para"> | 3 | </a>3.5.3. Incrementing Associated Values</h3></div></div></div><a id="idm47650187970576" class="indexterm"></a><a id="idm47650183132528" class="indexterm"></a><a id="idm47650183131120" class="indexterm"></a><div class="para"> | 
| 4 | Use <code class="command">++</code> to increment the associated value of a unique key in an array, as in: | 4 | Use <code class="command">++</code> to increment the associated value of a unique key in an array, as in: | 
| 5 | </div><pre class="screen"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>] ++</pre><div class="para"> | 5 | </div><pre class="screen"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>] ++</pre><div class="para"> | 
| 6 | Again, you can also use a handler function for your <code class="command"><em class="replaceable">index_expression</em></code>. For example, if you wanted to tally how many times a specific process performed a read to the virtual file system (using the event <code class="command">vfs.read</code>), you can use the following probe: | 6 | Again, you can also use a handler function for your <code class="command"><em class="replaceable">index_expression</em></code>. For example, if you wanted to tally how many times a specific process performed a read to the virtual file system (using the event <code class="command">vfs.read</code>), you can use the following probe: | 
| 7 | </div><a id="idm47722998063056" class="indexterm"></a><a id="idm47722954533216" class="indexterm"></a><a id="idm47722990506944" class="indexterm"></a><a id="idm47722954558336" class="indexterm"></a><a id="idm47722999347888" class="indexterm"></a><div class="example"><a id="simplesimplevfsread"> | 7 | </div><a id="idm47650143679328" class="indexterm"></a><a id="idm47650183876672" class="indexterm"></a><a id="idm47650182863008" class="indexterm"></a><a id="idm47650186863952" class="indexterm"></a><a id="idm47650192710528" class="indexterm"></a><div class="example"><a id="simplesimplevfsread"> | 
| 8 | </a><p class="title"><strong>Example 3.16. vfsreads.stp</strong></p><div class="example-contents"><pre class="programlisting">probe vfs.read | 8 | </a><p class="title"><strong>Example 3.16. vfsreads.stp</strong></p><div class="example-contents"><pre class="programlisting">probe vfs.read | 
| 9 | { | 9 | { | 
| 10 | reads[execname()] ++ | 10 | reads[execname()] ++ | 
| diff --git a/SystemTap_Beginners_Guide/arrayops-readvalues.html b/SystemTap_Beginners_Guide/arrayops-readvalues.html index 2e0b4029..1328fc84 100644 --- a/SystemTap_Beginners_Guide/arrayops-readvalues.html +++ b/SystemTap_Beginners_Guide/arrayops-readvalues.html | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.2. Reading Values From Arrays</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="next" href="arrayops-increment.html" title="3.5.3. Incrementing Associated Values" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayoperators.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-increment.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-readvalues"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.5.2. Reading Values From Arrays</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="prev" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /><link rel="next" href="arrayops-increment.html" title="3.5.3. Incrementing Associated Values" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayoperators.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayops-increment.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="arrayops-readvalues"> | 
| 3 | </a>3.5.2. Reading Values From Arrays</h3></div></div></div><a id="idm47723002762912" class="indexterm"></a><a id="idm47723002689584" class="indexterm"></a><a id="idm47723002688176" class="indexterm"></a><div class="para"> | 3 | </a>3.5.2. Reading Values From Arrays</h3></div></div></div><a id="idm47650196185264" class="indexterm"></a><a id="idm47650143753104" class="indexterm"></a><a id="idm47650188663136" class="indexterm"></a><div class="para"> | 
| 4 | You can also read values from an array the same way you would read the value of a variable. To do so, include the <code class="command"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>]</code> statement as an element in a mathematical expression. For example: | 4 | You can also read values from an array the same way you would read the value of a variable. To do so, include the <code class="command"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>]</code> statement as an element in a mathematical expression. For example: | 
| 5 | </div><a id="idm47722994337744" class="indexterm"></a><a id="idm47722995866944" class="indexterm"></a><a id="idm47722954359728" class="indexterm"></a><a id="idm47722995314624" class="indexterm"></a><a id="idm47722988872704" class="indexterm"></a><a id="idm47722960492048" class="indexterm"></a><a id="idm47722999309040" class="indexterm"></a><a id="idm47722951207472" class="indexterm"></a><a id="idm47722997585648" class="indexterm"></a><a id="idm47722997583792" class="indexterm"></a><div class="example"><a id="arrayreadingvaluesfrom"> | 5 | </div><a id="idm47650186965776" class="indexterm"></a><a id="idm47650184870992" class="indexterm"></a><a id="idm47650193046320" class="indexterm"></a><a id="idm47650193023120" class="indexterm"></a><a id="idm47650188759104" class="indexterm"></a><a id="idm47650190403584" class="indexterm"></a><a id="idm47650188993376" class="indexterm"></a><a id="idm47650193399200" class="indexterm"></a><a id="idm47650193127888" class="indexterm"></a><a id="idm47650183705232" class="indexterm"></a><div class="example"><a id="arrayreadingvaluesfrom"> | 
| 6 | </a><p class="title"><strong>Example 3.15. Using Array Values in Simple Computations</strong></p><div class="example-contents"><pre class="screen">delta = gettimeofday_s() - foo[tid()]</pre></div></div><div class="para"> | 6 | </a><p class="title"><strong>Example 3.15. Using Array Values in Simple Computations</strong></p><div class="example-contents"><pre class="screen">delta = gettimeofday_s() - foo[tid()]</pre></div></div><div class="para"> | 
| 7 | This example assumes that the array <code class="command">foo</code> was built using the construct in <a class="xref" href="arrayoperators.html#arrays-timestampprocessname">Example 3.14, “Associating Timestamps to Process Names”</a> (from <a class="xref" href="arrayoperators.html#arrayops-assignvalue">Section 3.5.1, “Assigning an Associated Value”</a>). This sets a timestamp that will serve as a <span class="emphasis"><em>reference point</em></span>, to be used in computing for <code class="literal">delta</code>. | 7 | This example assumes that the array <code class="command">foo</code> was built using the construct in <a class="xref" href="arrayoperators.html#arrays-timestampprocessname">Example 3.14, “Associating Timestamps to Process Names”</a> (from <a class="xref" href="arrayoperators.html#arrayops-assignvalue">Section 3.5.1, “Assigning an Associated Value”</a>). This sets a timestamp that will serve as a <span class="emphasis"><em>reference point</em></span>, to be used in computing for <code class="literal">delta</code>. | 
| 8 | </div><div class="para"> | 8 | </div><div class="para"> | 
| 9 | The construct in <a class="xref" href="arrayops-readvalues.html#arrayreadingvaluesfrom">Example 3.15, “Using Array Values in Simple Computations”</a> computes a value for the variable <code class="literal">delta</code> by subtracting the associated value of the key <code class="literal">tid()</code> from the current <code class="command">gettimeofday_s()</code>. The construct does this by <span class="emphasis"><em>reading</em></span> the value of <code class="literal">tid()</code> from the array. This particular construct is useful for determining the time between two events, such as the start and completion of a read operation. | 9 | The construct in <a class="xref" href="arrayops-readvalues.html#arrayreadingvaluesfrom">Example 3.15, “Using Array Values in Simple Computations”</a> computes a value for the variable <code class="literal">delta</code> by subtracting the associated value of the key <code class="literal">tid()</code> from the current <code class="command">gettimeofday_s()</code>. The construct does this by <span class="emphasis"><em>reading</em></span> the value of <code class="literal">tid()</code> from the array. This particular construct is useful for determining the time between two events, such as the start and completion of a read operation. | 
| 10 | </div><a id="idm47723002750272" class="indexterm"></a><a id="idm47723003722848" class="indexterm"></a><a id="idm47722997943104" class="indexterm"></a><a id="idm47723001901568" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 10 | </div><a id="idm47650189030944" class="indexterm"></a><a id="idm47650197283008" class="indexterm"></a><a id="idm47650154489296" class="indexterm"></a><a id="idm47650185636080" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 
| 11 | If the <code class="command"><em class="replaceable">index_expression</em></code> cannot find the unique key, it returns a value of 0 (for numerical operations, such as <a class="xref" href="arrayops-readvalues.html#arrayreadingvaluesfrom">Example 3.15, “Using Array Values in Simple Computations”</a>) or a null/empty string value (for string operations) by default. | 11 | If the <code class="command"><em class="replaceable">index_expression</em></code> cannot find the unique key, it returns a value of 0 (for numerical operations, such as <a class="xref" href="arrayops-readvalues.html#arrayreadingvaluesfrom">Example 3.15, “Using Array Values in Simple Computations”</a>) or a null/empty string value (for string operations) by default. | 
| 12 | </div></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="arrayoperators.html"><strong>Prev</strong>3.5. Array Operations in SystemTap</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="arrayops-increment.html"><strong>Next</strong>3.5.3. Incrementing Associated Values</a></li></ul></body></html> \ No newline at end of file | 12 | </div></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="arrayoperators.html"><strong>Prev</strong>3.5. Array Operations in SystemTap</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="arrayops-increment.html"><strong>Next</strong>3.5.3. Incrementing Associated Values</a></li></ul></body></html> \ No newline at end of file | 
| diff --git a/SystemTap_Beginners_Guide/associativearrays.html b/SystemTap_Beginners_Guide/associativearrays.html index a2bfcbc6..18e2abf0 100644 --- a/SystemTap_Beginners_Guide/associativearrays.html +++ b/SystemTap_Beginners_Guide/associativearrays.html | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.4. Associative Arrays</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="commandlineargssect.html" title="3.3.4. Command-Line Arguments" /><link rel="next" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="commandlineargssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayoperators.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="associativearrays"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.4. Associative Arrays</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="commandlineargssect.html" title="3.3.4. Command-Line Arguments" /><link rel="next" href="arrayoperators.html" title="3.5. Array Operations in SystemTap" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="commandlineargssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="arrayoperators.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="associativearrays"> | 
| 3 | </a>3.4. Associative Arrays</h2></div></div></div><a id="idm47722997411120" class="indexterm"></a><a id="idm47722998034512" class="indexterm"></a><div class="para"> | 3 | </a>3.4. Associative Arrays</h2></div></div></div><a id="idm47650188955856" class="indexterm"></a><a id="idm47650186877520" class="indexterm"></a><div class="para"> | 
| 4 | SystemTap also supports the use of associative arrays. While an ordinary variable represents a single value, associative arrays can represent a collection of values. Simply put, an associative array is a collection of unique keys; each key in the array has a value associated with it. | 4 | SystemTap also supports the use of associative arrays. While an ordinary variable represents a single value, associative arrays can represent a collection of values. Simply put, an associative array is a collection of unique keys; each key in the array has a value associated with it. | 
| 5 | </div><a id="idm47723005870656" class="indexterm"></a><a id="idm47723005350752" class="indexterm"></a><a id="idm47722999402816" class="indexterm"></a><a id="idm47722990990128" class="indexterm"></a><a id="idm47722990514848" class="indexterm"></a><a id="idm47722999792896" class="indexterm"></a><a id="idm47722999424848" class="indexterm"></a><a id="idm47722994633360" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650189135616" class="indexterm"></a><a id="idm47650187313520" class="indexterm"></a><a id="idm47650191327136" class="indexterm"></a><a id="idm47650195657840" class="indexterm"></a><a id="idm47650196082560" class="indexterm"></a><a id="idm47650192471040" class="indexterm"></a><a id="idm47650183502480" class="indexterm"></a><a id="idm47650169121360" class="indexterm"></a><div class="para"> | 
| 6 | Since associative arrays are normally processed in multiple probes (as we will demonstrate later), they should be declared as <code class="command">global</code> variables in the SystemTap script. The syntax for accessing an element in an associative array is similar to that of <code class="command">awk</code>, and is as follows: | 6 | Since associative arrays are normally processed in multiple probes (as we will demonstrate later), they should be declared as <code class="command">global</code> variables in the SystemTap script. The syntax for accessing an element in an associative array is similar to that of <code class="command">awk</code>, and is as follows: | 
| 7 | </div><a id="idm47722949125248" class="indexterm"></a><a id="idm47722990544176" class="indexterm"></a><a id="idm47722997984048" class="indexterm"></a><pre class="screen"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>]</pre><div class="para"> | 7 | </div><a id="idm47650188635904" class="indexterm"></a><a id="idm47650149566512" class="indexterm"></a><a id="idm47650196129232" class="indexterm"></a><pre class="screen"><em class="replaceable">array_name</em>[<em class="replaceable">index_expression</em>]</pre><div class="para"> | 
| 8 | Here, the <code class="command"><em class="replaceable">array_name</em></code> is any arbitrary name the array uses. The <code class="command"><em class="replaceable">index_expression</em></code> is used to refer to a specific unique key in the array. To illustrate, let us try to build an array named <code class="command">foo</code> that specifies the ages of three people <code class="command">tom</code>, <code class="command">dick</code>, and <code class="command">harry</code> (which are unique keys). To assign them the ages (associated values) of 23, 24, and 25 respectively, we'd use the following array statements: | 8 | Here, the <code class="command"><em class="replaceable">array_name</em></code> is any arbitrary name the array uses. The <code class="command"><em class="replaceable">index_expression</em></code> is used to refer to a specific unique key in the array. To illustrate, let us try to build an array named <code class="command">foo</code> that specifies the ages of three people <code class="command">tom</code>, <code class="command">dick</code>, and <code class="command">harry</code> (which are unique keys). To assign them the ages (associated values) of 23, 24, and 25 respectively, we'd use the following array statements: | 
| 9 | </div><a id="idm47722988141936" class="indexterm"></a><a id="idm47723004440864" class="indexterm"></a><div class="example"><a id="arraysimplestexample"> | 9 | </div><a id="idm47650188733040" class="indexterm"></a><a id="idm47650187045856" class="indexterm"></a><div class="example"><a id="arraysimplestexample"> | 
| 10 | </a><p class="title"><strong>Example 3.13. Basic Array Statements</strong></p><div class="example-contents"><pre class="screen">foo["tom"] = 23 | 10 | </a><p class="title"><strong>Example 3.13. Basic Array Statements</strong></p><div class="example-contents"><pre class="screen">foo["tom"] = 23 | 
| 11 | foo["dick"] = 24 | 11 | foo["dick"] = 24 | 
| 12 | foo["harry"] = 25</pre></div></div><div class="para"> | 12 | foo["harry"] = 25</pre></div></div><div class="para"> | 
| diff --git a/SystemTap_Beginners_Guide/commandlineargssect.html b/SystemTap_Beginners_Guide/commandlineargssect.html index 6701423b..2ab5a4ff 100644 --- a/SystemTap_Beginners_Guide/commandlineargssect.html +++ b/SystemTap_Beginners_Guide/commandlineargssect.html | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.4. Command-Line Arguments</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="prev" href="handlerconditionalstatements.html" title="3.3.3. Conditional Statements" /><link rel="next" href="associativearrays.html" title="3.4. Associative Arrays" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="handlerconditionalstatements.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="associativearrays.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="commandlineargssect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.4. Command-Line Arguments</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="prev" href="handlerconditionalstatements.html" title="3.3.3. Conditional Statements" /><link rel="next" href="associativearrays.html" title="3.4. Associative Arrays" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="handlerconditionalstatements.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="associativearrays.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="commandlineargssect"> | 
| 3 | </a>3.3.4. Command-Line Arguments</h3></div></div></div><a id="idm47722993274960" class="indexterm"></a><a id="idm47722997353024" class="indexterm"></a><a id="idm47722995769280" class="indexterm"></a><div class="para"> | 3 | </a>3.3.4. Command-Line Arguments</h3></div></div></div><a id="idm47650143801344" class="indexterm"></a><a id="idm47650191355216" class="indexterm"></a><a id="idm47650144707328" class="indexterm"></a><div class="para"> | 
| 4 | A SystemTap script can also accept simple command-line arguments using a <code class="command">$</code> or <code class="command">@</code> immediately followed by the number of the argument on the command line. Use <code class="command">$</code> if you are expecting the user to enter an integer as a command-line argument, and <code class="command">@</code> if you are expecting a string. | 4 | A SystemTap script can also accept simple command-line arguments using a <code class="command">$</code> or <code class="command">@</code> immediately followed by the number of the argument on the command line. Use <code class="command">$</code> if you are expecting the user to enter an integer as a command-line argument, and <code class="command">@</code> if you are expecting a string. | 
| 5 | </div><div class="example"><a id="commandlineargs"> | 5 | </div><div class="example"><a id="commandlineargs"> | 
| 6 | </a><p class="title"><strong>Example 3.12. commandlineargs.stp</strong></p><div class="example-contents"><pre class="programlisting">probe kernel.function(@1) { } | 6 | </a><p class="title"><strong>Example 3.12. commandlineargs.stp</strong></p><div class="example-contents"><pre class="programlisting">probe kernel.function(@1) { } | 
| 7 | probe kernel.function(@1).return { }</pre></div></div><div class="para"> | 7 | probe kernel.function(@1).return { }</pre></div></div><div class="para"> | 
| 8 | <a class="xref" href="commandlineargssect.html#commandlineargs">Example 3.12, “commandlineargs.stp”</a> is similar to <a class="xref" href="scripts.html#wildcards">Example 3.1, “wildcards.stp”</a>, except that it allows you to pass the kernel function to be probed as a command-line argument (as in <code class="command">stap commandlineargs.stp <em class="replaceable">kernel function</em></code>). You can also specify the script to accept multiple command-line arguments, noting them as <code class="command">@1</code>, <code class="command">@2</code>, and so on, in the order they are entered by the user. | 8 | <a class="xref" href="commandlineargssect.html#commandlineargs">Example 3.12, “commandlineargs.stp”</a> is similar to <a class="xref" href="scripts.html#wildcards">Example 3.1, “wildcards.stp”</a>, except that it allows you to pass the kernel function to be probed as a command-line argument (as in <code class="command">stap commandlineargs.stp <em class="replaceable">kernel function</em></code>). You can also specify the script to accept multiple command-line arguments, noting them as <code class="command">@1</code>, <code class="command">@2</code>, and so on, in the order they are entered by the user. | 
| 9 | </div><a id="idm47722997255808" class="indexterm"></a><a id="idm47722987322656" class="indexterm"></a><a id="idm47723009280432" class="indexterm"></a></div><ul class="docnav"><li class="previous"><a accesskey="p" href="handlerconditionalstatements.html"><strong>Prev</strong>3.3.3. Conditional Statements</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="associativearrays.html"><strong>Next</strong>3.4. Associative Arrays</a></li></ul></body></html> \ No newline at end of file | 9 | </div><a id="idm47650146510944" class="indexterm"></a><a id="idm47650148494256" class="indexterm"></a><a id="idm47650197502528" class="indexterm"></a></div><ul class="docnav"><li class="previous"><a accesskey="p" href="handlerconditionalstatements.html"><strong>Prev</strong>3.3.3. Conditional Statements</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="associativearrays.html"><strong>Next</strong>3.4. Associative Arrays</a></li></ul></body></html> \ No newline at end of file | 
| diff --git a/SystemTap_Beginners_Guide/cross-compiling.html b/SystemTap_Beginners_Guide/cross-compiling.html index cd8f1991..1ff04ce4 100644 --- a/SystemTap_Beginners_Guide/cross-compiling.html +++ b/SystemTap_Beginners_Guide/cross-compiling.html | |||
| @@ -1,29 +1,29 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2.2. Generating Instrumentation for Other Computers</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="prev" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="next" href="using-usage.html" title="2.3. Running SystemTap Scripts" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="using-systemtap.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="using-usage.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="cross-compiling"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2.2. Generating Instrumentation for Other Computers</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="prev" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="next" href="using-usage.html" title="2.3. Running SystemTap Scripts" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="using-systemtap.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="using-usage.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="cross-compiling"> | 
| 3 | </a>2.2. Generating Instrumentation for Other Computers</h2></div></div></div><a id="idm47722952772880" class="indexterm"></a><a id="idm47722959798000" class="indexterm"></a><a id="idm47722950640416" class="indexterm"></a><a id="idm47722950873040" class="indexterm"></a><a id="idm47722954692624" class="indexterm"></a><a id="idm47722987436880" class="indexterm"></a><a id="idm47723004418064" class="indexterm"></a><a id="idm47722950861520" class="indexterm"></a><div class="para"> | 3 | </a>2.2. Generating Instrumentation for Other Computers</h2></div></div></div><a id="idm47650199613072" class="indexterm"></a><a id="idm47650183649376" class="indexterm"></a><a id="idm47650146600848" class="indexterm"></a><a id="idm47650191179632" class="indexterm"></a><a id="idm47650184696336" class="indexterm"></a><a id="idm47650143521200" class="indexterm"></a><a id="idm47650144596672" class="indexterm"></a><a id="idm47650149598608" class="indexterm"></a><div class="para"> | 
| 4 | When users run a SystemTap script, SystemTap builds a kernel module out of that script. SystemTap then loads the module into the kernel, allowing it to extract the specified data directly from the kernel (refer to <a class="xref" href="understanding-how-systemtap-works.html#systemtapsession">Procedure 3.1, “SystemTap Session”</a> in <a class="xref" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Section 3.1, “Architecture”</a> for more information). | 4 | When users run a SystemTap script, SystemTap builds a kernel module out of that script. SystemTap then loads the module into the kernel, allowing it to extract the specified data directly from the kernel (refer to <a class="xref" href="understanding-how-systemtap-works.html#systemtapsession">Procedure 3.1, “SystemTap Session”</a> in <a class="xref" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Section 3.1, “Architecture”</a> for more information). | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | Normally, however, SystemTap scripts can only be run on systems where SystemTap is deployed (as in <a class="xref" href="using-systemtap.html#using-setup">Section 2.1, “Installation and Setup”</a>). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on <span class="emphasis"><em>all</em></span> those systems. In some cases, this may be neither feasible nor desired. For instance, corporate policy may prohibit an administrator from installing RPM packages that provide compilers or debug information on specific machines, and thus prevent the deployment of SystemTap. To work around this problem, SystemTap allows you to use <em class="firstterm">cross-instrumentation</em>. | 6 | Normally, however, SystemTap scripts can only be run on systems where SystemTap is deployed (as in <a class="xref" href="using-systemtap.html#using-setup">Section 2.1, “Installation and Setup”</a>). This could mean that if you want to run SystemTap on ten systems, you would need to deploy SystemTap on <span class="emphasis"><em>all</em></span> those systems. In some cases, this may be neither feasible nor desired. For instance, corporate policy may prohibit an administrator from installing RPM packages that provide compilers or debug information on specific machines, and thus prevent the deployment of SystemTap. To work around this problem, SystemTap allows you to use <em class="firstterm">cross-instrumentation</em>. | 
| 7 | </div><div class="para"> | 7 | </div><div class="para"> | 
| 8 | 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: | 8 | 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: | 
| 9 | </div><a id="idm47722986165360" class="indexterm"></a><a id="idm47722957489696" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 9 | </div><a id="idm47650189093648" class="indexterm"></a><a id="idm47650189071808" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 
| 10 | The kernel information packages for various machines can be installed on a single <span class="emphasis"><em>host machine</em></span>. | 10 | The kernel information packages for various machines can be installed on a single <span class="emphasis"><em>host machine</em></span>. | 
| 11 | </div></li><li class="listitem"><div class="para"> | 11 | </div></li><li class="listitem"><div class="para"> | 
| 12 | Each <span class="emphasis"><em>target machine</em></span> only needs one RPM package to be installed in order to use the generated SystemTap instrumentation module: the <span class="package">systemtap-runtime</span> package. | 12 | Each <span class="emphasis"><em>target machine</em></span> only needs one RPM package to be installed in order to use the generated SystemTap instrumentation module: the <span class="package">systemtap-runtime</span> package. | 
| 13 | </div></li></ul></div><div class="para"> | 13 | </div></li></ul></div><div class="para"> | 
| 14 | For the sake of simplicity, the following terms are used throughout this section: | 14 | For the sake of simplicity, the following terms are used throughout this section: | 
| 15 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 15 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 
| 16 | <a id="idm47722991071552" class="indexterm"></a> <a id="idm47722990984656" class="indexterm"></a> <span class="emphasis"><em>Instrumentation module</em></span> — the kernel module built from a SystemTap script. The <span class="emphasis"><em>SystemTap module</em></span> is built on the <span class="emphasis"><em>host system</em></span>, and will be loaded on the <span class="emphasis"><em>target kernel</em></span> of <span class="emphasis"><em>target system</em></span>. | 16 | <a id="idm47650189065616" class="indexterm"></a> <a id="idm47650199438912" class="indexterm"></a> <span class="emphasis"><em>Instrumentation module</em></span> — the kernel module built from a SystemTap script. The <span class="emphasis"><em>SystemTap module</em></span> is built on the <span class="emphasis"><em>host system</em></span>, and will be loaded on the <span class="emphasis"><em>target kernel</em></span> of <span class="emphasis"><em>target system</em></span>. | 
| 17 | </div></li><li class="listitem"><div class="para"> | 17 | </div></li><li class="listitem"><div class="para"> | 
| 18 | <a id="idm47723005319888" class="indexterm"></a> <a id="idm47722990693632" class="indexterm"></a> <span class="emphasis"><em>Host system</em></span> — the system on which you compile the <span class="emphasis"><em>instrumentation modules</em></span> from SystemTap scripts in order to load them on <span class="emphasis"><em>target systems</em></span>. | 18 | <a id="idm47650183057632" class="indexterm"></a> <a id="idm47650199463184" class="indexterm"></a> <span class="emphasis"><em>Host system</em></span> — the system on which you compile the <span class="emphasis"><em>instrumentation modules</em></span> from SystemTap scripts in order to load them on <span class="emphasis"><em>target systems</em></span>. | 
| 19 | </div></li><li class="listitem"><div class="para"> | 19 | </div></li><li class="listitem"><div class="para"> | 
| 20 | <a id="idm47723004386512" class="indexterm"></a> <a id="idm47723004385552" class="indexterm"></a> <span class="emphasis"><em>Target system</em></span> — the system for which you are building the <span class="emphasis"><em>instrumentation modules</em></span> from SystemTap scripts. | 20 | <a id="idm47650181187440" class="indexterm"></a> <a id="idm47650184906256" class="indexterm"></a> <span class="emphasis"><em>Target system</em></span> — the system for which you are building the <span class="emphasis"><em>instrumentation modules</em></span> from SystemTap scripts. | 
| 21 | </div></li><li class="listitem"><div class="para"> | 21 | </div></li><li class="listitem"><div class="para"> | 
| 22 | <a id="idm47722998150432" class="indexterm"></a> <a id="idm47722995828384" class="indexterm"></a> <span class="emphasis"><em>Target kernel</em></span> — the kernel of the <span class="emphasis"><em>target system</em></span>. This is the kernel on which you intend to load or run the <span class="emphasis"><em>instrumentation module</em></span>. | 22 | <a id="idm47650181276800" class="indexterm"></a> <a id="idm47650185685056" class="indexterm"></a> <span class="emphasis"><em>Target kernel</em></span> — the kernel of the <span class="emphasis"><em>target system</em></span>. This is the kernel on which you intend to load or run the <span class="emphasis"><em>instrumentation module</em></span>. | 
| 23 | </div></li></ul></div><div class="para"> | 23 | </div></li></ul></div><div class="para"> | 
| 24 | To configure a host system and target systems, complete the following steps: | 24 | To configure a host system and target systems, complete the following steps: | 
| 25 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="procedure"><a id="preppingxcompile"> | 25 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="procedure"><a id="preppingxcompile"> | 
| 26 | </a><a id="idm47722988980608" class="indexterm"></a><a id="idm47722988982272" class="indexterm"></a><a id="idm47723009390752" class="indexterm"></a><ol class="1"><li class="step"><div class="para"> | 26 | </a><a id="idm47650192721936" class="indexterm"></a><a id="idm47650187379984" class="indexterm"></a><a id="idm47650183188112" class="indexterm"></a><ol class="1"><li class="step"><div class="para"> | 
| 27 | Install the <span class="package">systemtap-runtime</span> package on each <span class="emphasis"><em>target system</em></span>. | 27 | Install the <span class="package">systemtap-runtime</span> package on each <span class="emphasis"><em>target system</em></span>. | 
| 28 | </div></li><li class="step"><div class="para"> | 28 | </div></li><li class="step"><div class="para"> | 
| 29 | Determine the kernel running on each <span class="emphasis"><em>target system</em></span> by running the <code class="command">uname -r</code> command on each of these systems. | 29 | Determine the kernel running on each <span class="emphasis"><em>target system</em></span> by running the <code class="command">uname -r</code> command on each of these systems. | 
| @@ -37,7 +37,7 @@ | |||
| 37 | To build the <span class="emphasis"><em>instrumentation module</em></span>, run the following command on the <span class="emphasis"><em>host system</em></span> (be sure to specify the appropriate values): | 37 | To build the <span class="emphasis"><em>instrumentation module</em></span>, run the following command on the <span class="emphasis"><em>host system</em></span> (be sure to specify the appropriate values): | 
| 38 | </div><pre class="screen"><code class="command">stap -r <em class="replaceable">kernel_version</em> <em class="replaceable">script</em> -m <em class="replaceable">module_name</em></code></pre><div class="para"> | 38 | </div><pre class="screen"><code class="command">stap -r <em class="replaceable">kernel_version</em> <em class="replaceable">script</em> -m <em class="replaceable">module_name</em></code></pre><div class="para"> | 
| 39 | Here, <em class="replaceable">kernel_version</em> refers to the version of the <span class="emphasis"><em>target kernel</em></span> (the output of the <code class="command">uname -r</code> command on the target machine), <em class="replaceable">script</em> refers to the script to be converted into the <span class="emphasis"><em>instrumentation module</em></span>, and <em class="replaceable">module_name</em> is the desired name of the <span class="emphasis"><em>instrumentation module</em></span>. | 39 | Here, <em class="replaceable">kernel_version</em> refers to the version of the <span class="emphasis"><em>target kernel</em></span> (the output of the <code class="command">uname -r</code> command on the target machine), <em class="replaceable">script</em> refers to the script to be converted into the <span class="emphasis"><em>instrumentation module</em></span>, and <em class="replaceable">module_name</em> is the desired name of the <span class="emphasis"><em>instrumentation module</em></span>. | 
| 40 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47722995237440" class="indexterm"></a><a id="idm47722998251920" class="indexterm"></a><a id="idm47722998250992" class="indexterm"></a><div class="para"> | 40 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47650188096256" class="indexterm"></a><a id="idm47650188095296" class="indexterm"></a><a id="idm47650193507584" class="indexterm"></a><div class="para"> | 
| 41 | To determine the architecture notation of a running kernel, you can run the following command: | 41 | To determine the architecture notation of a running kernel, you can run the following command: | 
| 42 | </div><pre class="screen"><code class="command">uname -m</code></pre></div></div><div class="para"> | 42 | </div><pre class="screen"><code class="command">uname -m</code></pre></div></div><div class="para"> | 
| 43 | Once the <span class="emphasis"><em>instrumentation module</em></span> is compiled, copy it to the <span class="emphasis"><em>target system</em></span> and then load it using: | 43 | Once the <span class="emphasis"><em>instrumentation module</em></span> is compiled, copy it to the <span class="emphasis"><em>target system</em></span> and then load it using: | 
| diff --git a/SystemTap_Beginners_Guide/errors.html b/SystemTap_Beginners_Guide/errors.html index d36d7462..bb85265f 100644 --- a/SystemTap_Beginners_Guide/errors.html +++ b/SystemTap_Beginners_Guide/errors.html | |||
| @@ -3,10 +3,10 @@ | |||
| 3 | </a>Chapter 6. Understanding SystemTap Errors</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="errors.html#parsetype">6.1. Parse and Semantic Errors</a></span></dt><dt><span class="section"><a href="runtimeerror.html">6.2. Runtime Errors and Warnings</a></span></dt></dl></div><div class="para"> | 3 | </a>Chapter 6. Understanding SystemTap Errors</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="errors.html#parsetype">6.1. Parse and Semantic Errors</a></span></dt><dt><span class="section"><a href="runtimeerror.html">6.2. Runtime Errors and Warnings</a></span></dt></dl></div><div class="para"> | 
| 4 | This chapter explains the most common errors you may encounter while using SystemTap. | 4 | This chapter explains the most common errors you may encounter while using SystemTap. | 
| 5 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="parsetype"> | 5 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="parsetype"> | 
| 6 | </a>6.1. Parse and Semantic Errors</h2></div></div></div><a id="idm47722955856688" class="indexterm"></a><a id="idm47722986231360" class="indexterm"></a><a id="idm47723003334752" class="indexterm"></a><div class="para"> | 6 | </a>6.1. Parse and Semantic Errors</h2></div></div></div><a id="idm47650195800176" class="indexterm"></a><a id="idm47650197638544" class="indexterm"></a><a id="idm47650168993984" class="indexterm"></a><div class="para"> | 
| 7 | Parse and semantic errors occur while SystemTap attempts to parse and translate the script into C, before converting it into a kernel module. For example, type errors result from operations that assign invalid values to variables or arrays. | 7 | Parse and semantic errors occur while SystemTap attempts to parse and translate the script into C, before converting it into a kernel module. For example, type errors result from operations that assign invalid values to variables or arrays. | 
| 8 | </div><h3><a id="idm47722955017808"> | 8 | </div><h3><a id="idm47650183678384"> | 
| 9 | </a>parse error: expected <em class="replaceable">foo</em>, saw <em class="replaceable">bar</em></h3><a id="idm47722952942688" class="indexterm"></a><a id="idm47722950870096" class="indexterm"></a><a id="idm47722956286176" class="indexterm"></a><a id="idm47722955461008" class="indexterm"></a><a id="idm47722956680880" class="indexterm"></a><a id="idm47722990888048" class="indexterm"></a><a id="idm47722990886160" class="indexterm"></a><a id="idm47722995443040" class="indexterm"></a><a id="idm47722995440896" class="indexterm"></a><div class="para"> | 9 | </a>parse error: expected <em class="replaceable">foo</em>, saw <em class="replaceable">bar</em></h3><a id="idm47650184802720" class="indexterm"></a><a id="idm47650185622240" class="indexterm"></a><a id="idm47650193699664" class="indexterm"></a><a id="idm47650191223920" class="indexterm"></a><a id="idm47650192182688" class="indexterm"></a><a id="idm47650192868960" class="indexterm"></a><a id="idm47650192867072" class="indexterm"></a><a id="idm47650155650400" class="indexterm"></a><a id="idm47650155648256" class="indexterm"></a><div class="para"> | 
| 10 | The script contains a grammatical or typographical error. SystemTap detected the type of the construct that is incorrect, given the context of the probe. | 10 | The script contains a grammatical or typographical error. SystemTap detected the type of the construct that is incorrect, given the context of the probe. | 
| 11 | </div><div class="para"> | 11 | </div><div class="para"> | 
| 12 | For example, the following invalid SystemTap script is missing its probe handlers: | 12 | For example, the following invalid SystemTap script is missing its probe handlers: | 
| @@ -22,46 +22,46 @@ probe vfs.write | |||
| 22 | <pre class="programlisting">parse error: expected one of '. , ( ? ! { = +=' | 22 | <pre class="programlisting">parse error: expected one of '. , ( ? ! { = +=' | 
| 23 | saw: keyword at perror.stp:2:1 | 23 | saw: keyword at perror.stp:2:1 | 
| 24 | 1 parse error(s).</pre> | 24 | 1 parse error(s).</pre> | 
| 25 | </div><h3><a id="idm47722994293552"> | 25 | </div><h3><a id="idm47650149223440"> | 
| 26 | </a>parse error: embedded code in unprivileged script</h3><a id="idm47722994292784" class="indexterm"></a><a id="idm47722994290928" class="indexterm"></a><a id="idm47722989135392" class="indexterm"></a><a id="idm47722989133536" class="indexterm"></a><a id="idm47722989131680" class="indexterm"></a><a id="idm47722989129824" class="indexterm"></a><div class="para"> | 26 | </a>parse error: embedded code in unprivileged script</h3><a id="idm47650149222672" class="indexterm"></a><a id="idm47650190814048" class="indexterm"></a><a id="idm47650190812160" class="indexterm"></a><a id="idm47650190810304" class="indexterm"></a><a id="idm47650190808448" class="indexterm"></a><a id="idm47650145098928" class="indexterm"></a><div class="para"> | 
| 27 | The script contains unsafe embedded C code, that is, blocks of code surrounded by <code class="command">%{</code> and <code class="command">%}</code>. SystemTap allows you to embed C code in a script, which is useful if there are no tapsets to suit your purposes. However, embedded C constructs are not safe and SystemTap reports this error to warn you if such constructs appear in the script. | 27 | The script contains unsafe embedded C code, that is, blocks of code surrounded by <code class="command">%{</code> and <code class="command">%}</code>. SystemTap allows you to embed C code in a script, which is useful if there are no tapsets to suit your purposes. However, embedded C constructs are not safe and SystemTap reports this error to warn you if such constructs appear in the script. | 
| 28 | </div><a id="idm47722990826816" class="indexterm"></a><a id="idm47722990824928" class="indexterm"></a><a id="idm47722990823008" class="indexterm"></a><a id="idm47722949352880" class="indexterm"></a><div class="para"> | 28 | </div><a id="idm47650145095152" class="indexterm"></a><a id="idm47650145093264" class="indexterm"></a><a id="idm47650192570416" class="indexterm"></a><a id="idm47650192568528" class="indexterm"></a><div class="para"> | 
| 29 | If you are sure that any similar constructs in the script are safe <span class="emphasis"><em>and</em></span> you are a member of the <code class="systemitem">stapdev</code> group (or have root privileges), run the script in "guru" mode by using the <code class="option">-g</code> option: | 29 | If you are sure that any similar constructs in the script are safe <span class="emphasis"><em>and</em></span> you are a member of the <code class="systemitem">stapdev</code> group (or have root privileges), run the script in "guru" mode by using the <code class="option">-g</code> option: | 
| 30 | </div><pre class="screen"><code class="command">stap -g <em class="replaceable">script</em></code></pre><h3><a id="idm47722949348016"> | 30 | </div><pre class="screen"><code class="command">stap -g <em class="replaceable">script</em></code></pre><h3><a id="idm47650192563664"> | 
| 31 | </a>semantic error: type mismatch for identifier '<em class="replaceable">foo</em>' ... string vs. long</h3><a id="idm47722949346768" class="indexterm"></a><a id="idm47723009143296" class="indexterm"></a><a id="idm47723009141408" class="indexterm"></a><a id="idm47723009139552" class="indexterm"></a><a id="idm47723009137696" class="indexterm"></a><div class="para"> | 31 | </a>semantic error: type mismatch for identifier '<em class="replaceable">foo</em>' ... string vs. long</h3><a id="idm47650190957792" class="indexterm"></a><a id="idm47650190955936" class="indexterm"></a><a id="idm47650190954048" class="indexterm"></a><a id="idm47650190952192" class="indexterm"></a><a id="idm47650180972608" class="indexterm"></a><div class="para"> | 
| 32 | The function <em class="replaceable">foo</em> in the script used the wrong type (such as <code class="literal">%s</code> or <code class="literal">%d</code>). In the following example, the format specifier should be <code class="literal">%s</code> and not <code class="literal">%d</code>, because the <code class="function">execname()</code> function returns a string: | 32 | The function <em class="replaceable">foo</em> in the script used the wrong type (such as <code class="literal">%s</code> or <code class="literal">%d</code>). In the following example, the format specifier should be <code class="literal">%s</code> and not <code class="literal">%d</code>, because the <code class="function">execname()</code> function returns a string: | 
| 33 | </div><pre class="programlisting">probe syscall.open | 33 | </div><pre class="programlisting">probe syscall.open | 
| 34 | { | 34 | { | 
| 35 | printf ("%d(%d) open\n", execname(), pid()) | 35 | printf ("%d(%d) open\n", execname(), pid()) | 
| 36 | }</pre><h3><a id="idm47723005840048"> | 36 | }</pre><h3><a id="idm47650180967040"> | 
| 37 | </a>semantic error: unresolved type for identifier '<em class="replaceable">foo</em>'</h3><a id="idm47723005838800" class="indexterm"></a><a id="idm47723001409088" class="indexterm"></a><a id="idm47723001407200" class="indexterm"></a><a id="idm47723001405344" class="indexterm"></a><div class="para"> | 37 | </a>semantic error: unresolved type for identifier '<em class="replaceable">foo</em>'</h3><a id="idm47650180965792" class="indexterm"></a><a id="idm47650188002192" class="indexterm"></a><a id="idm47650188000304" class="indexterm"></a><a id="idm47650187998448" class="indexterm"></a><div class="para"> | 
| 38 | The identifier (variable) was used, but no type (integer or string) could be determined. This occurs, for instance, if you use a variable in a <code class="command">printf</code> statement while the script never assigns a value to the variable. | 38 | The identifier (variable) was used, but no type (integer or string) could be determined. This occurs, for instance, if you use a variable in a <code class="command">printf</code> statement while the script never assigns a value to the variable. | 
| 39 | </div><h3><a id="idm47723001402432"> | 39 | </div><h3><a id="idm47650145624448"> | 
| 40 | </a>semantic error: Expecting symbol or array index expression</h3><a id="idm47722993116896" class="indexterm"></a><a id="idm47722993115040" class="indexterm"></a><a id="idm47722993113152" class="indexterm"></a><a id="idm47722993111296" class="indexterm"></a><div class="para"> | 40 | </a>semantic error: Expecting symbol or array index expression</h3><a id="idm47650145623600" class="indexterm"></a><a id="idm47650145621744" class="indexterm"></a><a id="idm47650145619856" class="indexterm"></a><a id="idm47650145618000" class="indexterm"></a><div class="para"> | 
| 41 | SystemTap could not assign a value to a variable or to a location in an array. The destination for the assignment is not a valid destination. The following example code would generate this error: | 41 | SystemTap could not assign a value to a variable or to a location in an array. The destination for the assignment is not a valid destination. The following example code would generate this error: | 
| 42 | </div><pre class="programlisting">probe begin { printf("x") = 1 } | 42 | </div><pre class="programlisting">probe begin { printf("x") = 1 } | 
| 43 | </pre><h3><a id="idm47723005494576"> | 43 | </pre><h3><a id="idm47650197236080"> | 
| 44 | </a>while searching for arity <em class="replaceable">N</em> function, semantic error: unresolved function call</h3><a id="idm47723005493360" class="indexterm"></a><a id="idm47723005491504" class="indexterm"></a><a id="idm47723005489616" class="indexterm"></a><a id="idm47723003280784" class="indexterm"></a><a id="idm47723003278928" class="indexterm"></a><div class="para"> | 44 | </a>while searching for arity <em class="replaceable">N</em> function, semantic error: unresolved function call</h3><a id="idm47650197234864" class="indexterm"></a><a id="idm47650197233008" class="indexterm"></a><a id="idm47650197231120" class="indexterm"></a><a id="idm47650142114912" class="indexterm"></a><a id="idm47650142113056" class="indexterm"></a><div class="para"> | 
| 45 | A function call or array index expression in the script used an invalid number of arguments or parameters. In SystemTap, <em class="firstterm">arity</em> can either refer to the number of indices for an array, or the number of parameters to a function. | 45 | A function call or array index expression in the script used an invalid number of arguments or parameters. In SystemTap, <em class="firstterm">arity</em> can either refer to the number of indices for an array, or the number of parameters to a function. | 
| 46 | </div><h3><a id="idm47723003276032"> | 46 | </div><h3><a id="idm47650142110160"> | 
| 47 | </a>semantic error: array locals not supported, missing global declaration?</h3><a id="idm47723003275104" class="indexterm"></a><a id="idm47722953557200" class="indexterm"></a><a id="idm47722953555312" class="indexterm"></a><a id="idm47722953553392" class="indexterm"></a><a id="idm47722953551504" class="indexterm"></a><div class="para"> | 47 | </a>semantic error: array locals not supported, missing global declaration?</h3><a id="idm47650142109152" class="indexterm"></a><a id="idm47650193226000" class="indexterm"></a><a id="idm47650193224112" class="indexterm"></a><a id="idm47650193222192" class="indexterm"></a><a id="idm47650193220304" class="indexterm"></a><div class="para"> | 
| 48 | The script used an array operation without declaring the array as a global variable (global variables can be declared after their use in SystemTap scripts). Similar messages appear if an array is used, but with inconsistent arities. | 48 | The script used an array operation without declaring the array as a global variable (global variables can be declared after their use in SystemTap scripts). Similar messages appear if an array is used, but with inconsistent arities. | 
| 49 | </div><h3><a id="idm47722995743712"> | 49 | </div><h3><a id="idm47650193563920"> | 
| 50 | </a>semantic error: variable '<em class="replaceable">foo</em>' modified during 'foreach' iteration</h3><a id="idm47722995742416" class="indexterm"></a><a id="idm47722995740560" class="indexterm"></a><a id="idm47722995738672" class="indexterm"></a><a id="idm47722953924896" class="indexterm"></a><div class="para"> | 50 | </a>semantic error: variable '<em class="replaceable">foo</em>' modified during 'foreach' iteration</h3><a id="idm47650193562624" class="indexterm"></a><a id="idm47650193560768" class="indexterm"></a><a id="idm47650193558880" class="indexterm"></a><a id="idm47650192135008" class="indexterm"></a><div class="para"> | 
| 51 | The array <em class="replaceable">foo</em> is being modified (being assigned to or deleted from) within an active <code class="command">foreach</code> loop. This error also displays if an operation within the script performs a function call within the <code class="command">foreach</code> loop. | 51 | The array <em class="replaceable">foo</em> is being modified (being assigned to or deleted from) within an active <code class="command">foreach</code> loop. This error also displays if an operation within the script performs a function call within the <code class="command">foreach</code> loop. | 
| 52 | </div><h3><a id="idm47722953921184"> | 52 | </div><h3><a id="idm47650192131296"> | 
| 53 | </a>semantic error: probe point mismatch at position <em class="replaceable">N</em>, while resolving probe point <em class="replaceable">foo</em></h3><a id="idm47722953919488" class="indexterm"></a><a id="idm47722994995600" class="indexterm"></a><a id="idm47722994993680" class="indexterm"></a><a id="idm47722994991792" class="indexterm"></a><div class="para"> | 53 | </a>semantic error: probe point mismatch at position <em class="replaceable">N</em>, while resolving probe point <em class="replaceable">foo</em></h3><a id="idm47650192129600" class="indexterm"></a><a id="idm47650192307440" class="indexterm"></a><a id="idm47650192305520" class="indexterm"></a><a id="idm47650192303632" class="indexterm"></a><div class="para"> | 
| 54 | SystemTap did not understand what the event or SystemTap function <em class="replaceable">foo</em> refers to. This usually means that SystemTap could not find a match for <em class="replaceable">foo</em> in the tapset library. <em class="replaceable">N</em> refers to the line and column of the error. | 54 | SystemTap did not understand what the event or SystemTap function <em class="replaceable">foo</em> refers to. This usually means that SystemTap could not find a match for <em class="replaceable">foo</em> in the tapset library. <em class="replaceable">N</em> refers to the line and column of the error. | 
| 55 | </div><h3><a id="idm47723002749232"> | 55 | </div><h3><a id="idm47650150949888"> | 
| 56 | </a>semantic error: no match for probe point, while resolving probe point <em class="replaceable">foo</em></h3><a id="idm47723002747904" class="indexterm"></a><a id="idm47723002746048" class="indexterm"></a><a id="idm47723002744160" class="indexterm"></a><a id="idm47722995731536" class="indexterm"></a><a id="idm47722995729680" class="indexterm"></a><div class="para"> | 56 | </a>semantic error: no match for probe point, while resolving probe point <em class="replaceable">foo</em></h3><a id="idm47650150948560" class="indexterm"></a><a id="idm47650150946704" class="indexterm"></a><a id="idm47650150944816" class="indexterm"></a><a id="idm47650150942960" class="indexterm"></a><a id="idm47650180889456" class="indexterm"></a><div class="para"> | 
| 57 | SystemTap could not resolve the events or handler function <em class="replaceable">foo</em> for a variety of reasons. This error occurs when the script contains the event <code class="command">kernel.function("<em class="replaceable">something</em>")</code>, and <em class="replaceable">something</em> does not exist. In some cases, the error could also mean the script contains an invalid kernel file name or source line number. | 57 | SystemTap could not resolve the events or handler function <em class="replaceable">foo</em> for a variety of reasons. This error occurs when the script contains the event <code class="command">kernel.function("<em class="replaceable">something</em>")</code>, and <em class="replaceable">something</em> does not exist. In some cases, the error could also mean the script contains an invalid kernel file name or source line number. | 
| 58 | </div><h3><a id="idm47722995725296"> | 58 | </div><h3><a id="idm47650180885072"> | 
| 59 | </a>semantic error: unresolved target-symbol expression</h3><a id="idm47722995724448" class="indexterm"></a><a id="idm47723005177248" class="indexterm"></a><a id="idm47723005175360" class="indexterm"></a><a id="idm47723005173504" class="indexterm"></a><a id="idm47723005171648" class="indexterm"></a><div class="para"> | 59 | </a>semantic error: unresolved target-symbol expression</h3><a id="idm47650180884224" class="indexterm"></a><a id="idm47650190223776" class="indexterm"></a><a id="idm47650190221888" class="indexterm"></a><a id="idm47650190220032" class="indexterm"></a><a id="idm47650190218176" class="indexterm"></a><div class="para"> | 
| 60 | A handler in the script references a target variable, but the value of the variable could not be resolved. This error could also mean that a handler is referencing a target variable that is not valid in the context when it was referenced. This may be a result of compiler optimization of the generated code. | 60 | A handler in the script references a target variable, but the value of the variable could not be resolved. This error could also mean that a handler is referencing a target variable that is not valid in the context when it was referenced. This may be a result of compiler optimization of the generated code. | 
| 61 | </div><h3><a id="idm47722960504288"> | 61 | </div><h3><a id="idm47650188134688"> | 
| 62 | </a>semantic error: libdwfl failure </h3><a id="idm47722960503360" class="indexterm"></a><a id="idm47722960501472" class="indexterm"></a><a id="idm47722960499552" class="indexterm"></a><a id="idm47722951592416" class="indexterm"></a><div class="para"> | 62 | </a>semantic error: libdwfl failure </h3><a id="idm47650188133760" class="indexterm"></a><a id="idm47650188131872" class="indexterm"></a><a id="idm47650188129952" class="indexterm"></a><a id="idm47650188128064" class="indexterm"></a><div class="para"> | 
| 63 | There was a problem processing the debugging information. In most cases, this error results from the installation of a <span class="package">kernel-debuginfo</span> package whose version does not match the probed kernel exactly. The installed <span class="package">kernel-debuginfo</span> package itself may have some consistency or correctness problems. | 63 | There was a problem processing the debugging information. In most cases, this error results from the installation of a <span class="package">kernel-debuginfo</span> package whose version does not match the probed kernel exactly. The installed <span class="package">kernel-debuginfo</span> package itself may have some consistency or correctness problems. | 
| 64 | </div><h3><a id="idm47722951588960"> | 64 | </div><h3><a id="idm47650184679440"> | 
| 65 | </a>semantic error: cannot find <em class="replaceable">foo</em> debuginfo</h3><div class="para"> | 65 | </a>semantic error: cannot find <em class="replaceable">foo</em> debuginfo</h3><div class="para"> | 
| 66 | SystemTap could not find a suitable <span class="package">kernel-debuginfo</span> package. | 66 | SystemTap could not find a suitable <span class="package">kernel-debuginfo</span> package. | 
| 67 | </div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="futexcontentionsect.html"><strong>Prev</strong>5.4. Identifying Contended User-Space Locks</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="runtimeerror.html"><strong>Next</strong>6.2. Runtime Errors and Warnings</a></li></ul></body></html> \ No newline at end of file | 67 | </div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="futexcontentionsect.html"><strong>Prev</strong>5.4. Identifying Contended User-Space Locks</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="runtimeerror.html"><strong>Next</strong>6.2. Runtime Errors and Warnings</a></li></ul></body></html> \ No newline at end of file | 
| diff --git a/SystemTap_Beginners_Guide/futexcontentionsect.html b/SystemTap_Beginners_Guide/futexcontentionsect.html index d6508c4c..13c05689 100644 --- a/SystemTap_Beginners_Guide/futexcontentionsect.html +++ b/SystemTap_Beginners_Guide/futexcontentionsect.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.4. Identifying Contended User-Space Locks</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="useful-systemtap-scripts.html" title="Chapter 5. Useful SystemTap Scripts" /><link rel="prev" href="syscallsbyprocpidsect.html" title="5.3.6. Tracking System Call Volume Per Process" /><link rel="next" href="errors.html" title="Chapter 6. Understanding SystemTap Errors" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="syscallsbyprocpidsect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="errors.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="futexcontentionsect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.4. Identifying Contended User-Space Locks</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="useful-systemtap-scripts.html" title="Chapter 5. Useful SystemTap Scripts" /><link rel="prev" href="syscallsbyprocpidsect.html" title="5.3.6. Tracking System Call Volume Per Process" /><link rel="next" href="errors.html" title="Chapter 6. Understanding SystemTap Errors" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="syscallsbyprocpidsect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="errors.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="futexcontentionsect"> | 
| 3 | </a>5.4. Identifying Contended User-Space Locks</h2></div></div></div><a id="idm47723009245584" class="indexterm"></a><a id="idm47722997199504" class="indexterm"></a><a id="idm47722990893216" class="indexterm"></a><a id="idm47723005881056" class="indexterm"></a><div class="para"> | 3 | </a>5.4. Identifying Contended User-Space Locks</h2></div></div></div><a id="idm47650192988416" class="indexterm"></a><a id="idm47650146805328" class="indexterm"></a><a id="idm47650191389440" class="indexterm"></a><a id="idm47650183659296" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to identify contended user-space locks throughout the system within a specific time period. The ability to identify contended user-space locks can help you investigate poor program performance that you suspect may be caused by <code class="command">futex</code> contentions. | 4 | This section describes how to identify contended user-space locks throughout the system within a specific time period. The ability to identify contended user-space locks can help you investigate poor program performance that you suspect may be caused by <code class="command">futex</code> contentions. | 
| 5 | </div><a id="idm47722999373344" class="indexterm"></a><a id="idm47722995665296" class="indexterm"></a><a id="idm47722999295728" class="indexterm"></a><a id="idm47722993160928" class="indexterm"></a><a id="idm47722993159552" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650200003536" class="indexterm"></a><a id="idm47650144410464" class="indexterm"></a><a id="idm47650195841296" class="indexterm"></a><a id="idm47650143441312" class="indexterm"></a><a id="idm47650190423072" class="indexterm"></a><div class="para"> | 
| 6 | Simply put, <code class="command">futex</code> contention occurs when multiple processes are trying to access the same lock variable at the same time. This can result in a poor performance because the lock serializes execution; one process obtains the lock while the other processes must wait for the lock variable to become available again. | 6 | Simply put, <code class="command">futex</code> contention occurs when multiple processes are trying to access the same lock variable at the same time. This can result in a poor performance because the lock serializes execution; one process obtains the lock while the other processes must wait for the lock variable to become available again. | 
| 7 | </div><a id="idm47722987638896" class="indexterm"></a><a id="idm47722951877984" class="indexterm"></a><a id="idm47723001271840" class="indexterm"></a><div class="para"> | 7 | </div><a id="idm47650150825552" class="indexterm"></a><a id="idm47650145894592" class="indexterm"></a><a id="idm47650187837024" class="indexterm"></a><div class="para"> | 
| 8 | The <a class="xref" href="futexcontentionsect.html#futexcontention">futexes.stp</a> script probes the <code class="command">futex</code> system call to show lock contention. | 8 | The <a class="xref" href="futexcontentionsect.html#futexcontention">futexes.stp</a> script probes the <code class="command">futex</code> system call to show lock contention. | 
| 9 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">futexes.stp</div> | 9 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">futexes.stp</div> | 
| 10 | 10 | ||
| diff --git a/SystemTap_Beginners_Guide/handlerconditionalstatements.html b/SystemTap_Beginners_Guide/handlerconditionalstatements.html index cc4e9f14..0a23d564 100644 --- a/SystemTap_Beginners_Guide/handlerconditionalstatements.html +++ b/SystemTap_Beginners_Guide/handlerconditionalstatements.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.3. Conditional Statements</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="prev" href="targetavailable.html" title="3.3.2.3. Checking Target Variable Availability" /><link rel="next" href="commandlineargssect.html" title="3.3.4. Command-Line Arguments" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="targetavailable.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="commandlineargssect.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="handlerconditionalstatements"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.3. Conditional Statements</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="prev" href="targetavailable.html" title="3.3.2.3. Checking Target Variable Availability" /><link rel="next" href="commandlineargssect.html" title="3.3.4. Command-Line Arguments" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="targetavailable.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="commandlineargssect.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="handlerconditionalstatements"> | 
| 3 | </a>3.3.3. Conditional Statements</h3></div></div></div><a id="idm47723005887088" class="indexterm"></a><a id="idm47723004474400" class="indexterm"></a><div class="para"> | 3 | </a>3.3.3. Conditional Statements</h3></div></div></div><a id="idm47650183592400" class="indexterm"></a><a id="idm47650155616208" class="indexterm"></a><div class="para"> | 
| 4 | In some cases, the output of a SystemTap script may be too large. 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. | 4 | In some cases, the output of a SystemTap script may be too large. 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. | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | Do this by using <span class="emphasis"><em>conditionals</em></span> in handlers. SystemTap accepts the following types of conditional statements: | 6 | Do this by using <span class="emphasis"><em>conditionals</em></span> in handlers. SystemTap accepts the following types of conditional statements: | 
| 7 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">If/Else Statements</span></dt><dd><a id="idm47723005868704" class="indexterm"></a><a id="idm47722995690400" class="indexterm"></a><a id="idm47723004538656" class="indexterm"></a><div class="para"> | 7 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">If/Else Statements</span></dt><dd><a id="idm47650191399552" class="indexterm"></a><a id="idm47650183771104" class="indexterm"></a><a id="idm47650193346320" class="indexterm"></a><div class="para"> | 
| 8 | Format: | 8 | Format: | 
| 9 | </div><pre class="programlisting">if (<em class="replaceable">condition</em>) | 9 | </div><pre class="programlisting">if (<em class="replaceable">condition</em>) | 
| 10 | <em class="replaceable">statement1</em> | 10 | <em class="replaceable">statement1</em> | 
| @@ -26,12 +26,12 @@ probe end | |||
| 26 | printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread) | 26 | printf("VFS reads total %d\n VFS writes total %d\n", countread, countnonread) | 
| 27 | }</pre></div></div><div class="para"> | 27 | }</pre></div></div><div class="para"> | 
| 28 | <a class="xref" href="handlerconditionalstatements.html#simpleifelseexample">Example 3.11, “ifelse.stp”</a> is a script that counts how many virtual file system reads (<code class="command">vfs_read</code>) and writes (<code class="command">vfs_write</code>) the system performs within a 5-second span. When run, the script increments the value of the variable <code class="command">countread</code> by 1 if the name of the function it probed matches <code class="command">vfs_read</code> (as noted by the condition <code class="command">if (probefunc()=="vfs_read")</code>); otherwise, it increments <code class="command">countnonread</code> (<code class="command">else {countnonread ++}</code>). | 28 | <a class="xref" href="handlerconditionalstatements.html#simpleifelseexample">Example 3.11, “ifelse.stp”</a> is a script that counts how many virtual file system reads (<code class="command">vfs_read</code>) and writes (<code class="command">vfs_write</code>) the system performs within a 5-second span. When run, the script increments the value of the variable <code class="command">countread</code> by 1 if the name of the function it probed matches <code class="command">vfs_read</code> (as noted by the condition <code class="command">if (probefunc()=="vfs_read")</code>); otherwise, it increments <code class="command">countnonread</code> (<code class="command">else {countnonread ++}</code>). | 
| 29 | </div></dd><dt><span class="term">While Loops</span></dt><dd><a id="idm47722987499200" class="indexterm"></a><a id="idm47722960493328" class="indexterm"></a><a id="idm47722949704720" class="indexterm"></a><div class="para"> | 29 | </div></dd><dt><span class="term">While Loops</span></dt><dd><a id="idm47650190462144" class="indexterm"></a><a id="idm47650154812512" class="indexterm"></a><a id="idm47650183935152" class="indexterm"></a><div class="para"> | 
| 30 | Format: | 30 | Format: | 
| 31 | </div><pre class="programlisting">while (<em class="replaceable">condition</em>) | 31 | </div><pre class="programlisting">while (<em class="replaceable">condition</em>) | 
| 32 | <em class="replaceable">statement</em></pre><div class="para"> | 32 | <em class="replaceable">statement</em></pre><div class="para"> | 
| 33 | So long as <code class="command"><em class="replaceable">condition</em></code> is non-zero the block of statements in <code class="command"><em class="replaceable">statement</em></code> are executed. The <code class="command"><em class="replaceable">statement</em></code> is often a statement block and it must change a value so <code class="command"><em class="replaceable">condition</em></code> will eventually be zero. | 33 | So long as <code class="command"><em class="replaceable">condition</em></code> is non-zero the block of statements in <code class="command"><em class="replaceable">statement</em></code> are executed. The <code class="command"><em class="replaceable">statement</em></code> is often a statement block and it must change a value so <code class="command"><em class="replaceable">condition</em></code> will eventually be zero. | 
| 34 | </div></dd><dt><span class="term">For Loops</span></dt><dd><a id="idm47723004361072" class="indexterm"></a><a id="idm47723004519952" class="indexterm"></a><a id="idm47722988659088" class="indexterm"></a><div class="para"> | 34 | </div></dd><dt><span class="term">For Loops</span></dt><dd><a id="idm47650143756144" class="indexterm"></a><a id="idm47650148485168" class="indexterm"></a><a id="idm47650180860480" class="indexterm"></a><div class="para"> | 
| 35 | Format: | 35 | Format: | 
| 36 | </div><pre class="programlisting">for (<em class="replaceable">initialization</em>; <em class="replaceable">conditional</em>; <em class="replaceable">increment</em>) <em class="replaceable">statement</em></pre><div class="para"> | 36 | </div><pre class="programlisting">for (<em class="replaceable">initialization</em>; <em class="replaceable">conditional</em>; <em class="replaceable">increment</em>) <em class="replaceable">statement</em></pre><div class="para"> | 
| 37 | The <code class="command">for</code> loop is shorthand for a while loop. The following is the equivalent <code class="command">while</code> loop: | 37 | The <code class="command">for</code> loop is shorthand for a while loop. The following is the equivalent <code class="command">while</code> loop: | 
| @@ -39,7 +39,7 @@ probe end | |||
| 39 | while (<em class="replaceable">conditional</em>) { | 39 | while (<em class="replaceable">conditional</em>) { | 
| 40 | <em class="replaceable">statement</em> | 40 | <em class="replaceable">statement</em> | 
| 41 | <em class="replaceable">increment</em> | 41 | <em class="replaceable">increment</em> | 
| 42 | }</pre></dd></dl></div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Conditional Operators</div><a id="idm47722995895008" class="indexterm"></a><a id="idm47722997178368" class="indexterm"></a><a id="idm47722994631680" class="indexterm"></a> | 42 | }</pre></dd></dl></div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Conditional Operators</div><a id="idm47650193244512" class="indexterm"></a><a id="idm47650156526288" class="indexterm"></a><a id="idm47650187968160" class="indexterm"></a> | 
| 43 | Aside from <code class="command">==</code> ("is equal to"), following operators can also be used in conditional statements: | 43 | Aside from <code class="command">==</code> ("is equal to"), following operators can also be used in conditional statements: | 
| 44 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">>=</span></dt><dd><div class="para"> | 44 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">>=</span></dt><dd><div class="para"> | 
| 45 | Greater than or equal to | 45 | Greater than or equal to | 
| diff --git a/SystemTap_Beginners_Guide/index.html b/SystemTap_Beginners_Guide/index.html index 4620383d..4d6f0a08 100644 --- a/SystemTap_Beginners_Guide/index.html +++ b/SystemTap_Beginners_Guide/index.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">SystemTap Beginners Guide</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><meta name="description" content="This guide provides basic instructions on how to use SystemTap to monitor different subsystems of a Linux system in finer detail." /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="next" href="SystemTap_Beginners_Guide-Preface.html" title="Preface" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="SystemTap_Beginners_Guide-Preface.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="book" lang="en-US"><div class="titlepage"><div><div class="producttitle"><span xmlns:d="http://docbook.org/ns/docbook" class="productname">SystemTap</span> <span xmlns:d="http://docbook.org/ns/docbook" class="productnumber">2.7</span></div><div><h1 class="title"><a id="idm47722958571072"></a>SystemTap Beginners Guide</h1></div><div><h2 class="subtitle">Introduction to SystemTap</h2></div><p xmlns:d="http://docbook.org/ns/docbook" class="edition">Edition 2.7</p><div><h3 class="corpauthor"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">SystemTap Beginners Guide</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><meta name="description" content="This guide provides basic instructions on how to use SystemTap to monitor different subsystems of a Linux system in finer detail." /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="next" href="SystemTap_Beginners_Guide-Preface.html" title="Preface" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="SystemTap_Beginners_Guide-Preface.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="book" lang="en-US"><div class="titlepage"><div><div class="producttitle"><span xmlns:d="http://docbook.org/ns/docbook" class="productname">SystemTap</span> <span xmlns:d="http://docbook.org/ns/docbook" class="productnumber">2.7</span></div><div><h1 class="title"><a id="idm47650150963712"></a>SystemTap Beginners Guide</h1></div><div><h2 class="subtitle">Introduction to SystemTap</h2></div><p xmlns:d="http://docbook.org/ns/docbook" class="edition">Edition 2.7</p><div><h3 class="corpauthor"> | 
| 3 | <span class="inlinemediaobject"><object data="Common_Content/images/title_logo.svg" type="image/svg+xml"><img src="Common_Content/images/title_logo.png" alt="Logo" /></object></span> | 3 | <span class="inlinemediaobject"><object data="Common_Content/images/title_logo.svg" type="image/svg+xml"><img src="Common_Content/images/title_logo.png" alt="Logo" /></object></span> | 
| 4 | 4 | ||
| 5 | </h3></div><div><div xml:lang="en-US" class="authorgroup" lang="en-US"><h3 class="corpauthor"> | 5 | </h3></div><div><div xml:lang="en-US" class="authorgroup" lang="en-US"><h3 class="corpauthor"> | 
| 6 | Red Hat, Inc. | 6 | Red Hat, Inc. | 
| 7 | </h3><div class="author"><h3 class="author"><span class="firstname">Don</span> <span class="surname">Domingo </span></h3><div class="affiliation"><span xmlns:d="http://docbook.org/ns/docbook" class="orgname">Engineering Services and Operations</span> <span xmlns:d="http://docbook.org/ns/docbook" class="orgdiv">Content Services</span></div><code class="email"><a class="email" href="mailto:ddomingo@redhat.com">ddomingo@redhat.com</a></code></div><div class="author"><h3 class="author"><span class="firstname">William</span> <span class="surname">Cohen</span></h3><div class="affiliation"><span xmlns:d="http://docbook.org/ns/docbook" class="orgname">Engineering Services and Operations</span> <span xmlns:d="http://docbook.org/ns/docbook" class="orgdiv">Performance Tools</span></div><code class="email"><a class="email" href="mailto:wcohen@redhat.com">wcohen@redhat.com</a></code></div></div></div><div><p class="copyright">Copyright © 2013 Red Hat, Inc</p></div><div><div class="legalnotice"><a id="idm47722950218288"></a><h1 class="legalnotice">Legal Notice</h1><div class="para"> | 7 | </h3><div class="author"><h3 class="author"><span class="firstname">Don</span> <span class="surname">Domingo </span></h3><div class="affiliation"><span xmlns:d="http://docbook.org/ns/docbook" class="orgname">Engineering Services and Operations</span> <span xmlns:d="http://docbook.org/ns/docbook" class="orgdiv">Content Services</span></div><code class="email"><a class="email" href="mailto:ddomingo@redhat.com">ddomingo@redhat.com</a></code></div><div class="author"><h3 class="author"><span class="firstname">William</span> <span class="surname">Cohen</span></h3><div class="affiliation"><span xmlns:d="http://docbook.org/ns/docbook" class="orgname">Engineering Services and Operations</span> <span xmlns:d="http://docbook.org/ns/docbook" class="orgdiv">Performance Tools</span></div><code class="email"><a class="email" href="mailto:wcohen@redhat.com">wcohen@redhat.com</a></code></div></div></div><div><p class="copyright">Copyright © 2013 Red Hat, Inc</p></div><div><div class="legalnotice"><a id="idm47650149867808"></a><h1 class="legalnotice">Legal Notice</h1><div class="para"> | 
| 8 | This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. | 8 | This documentation is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. | 
| 9 | </div><div class="para"> | 9 | </div><div class="para"> | 
| 10 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | 10 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | 
| @@ -14,4 +14,4 @@ | |||
| 14 | For more details see the file COPYING in the source distribution of Linux. | 14 | For more details see the file COPYING in the source distribution of Linux. | 
| 15 | </div></div></div><div><div class="abstract"><p class="title"><strong>Abstract</strong></p><div class="para"> | 15 | </div></div></div><div><div class="abstract"><p class="title"><strong>Abstract</strong></p><div class="para"> | 
| 16 | This guide provides basic instructions on how to use SystemTap to monitor different subsystems of a Linux system in finer detail. | 16 | This guide provides basic instructions on how to use SystemTap to monitor different subsystems of a Linux system in finer detail. | 
| 17 | </div></div></div></div></div><div class="toc"><dl class="toc"><dt><span class="preface"><a href="SystemTap_Beginners_Guide-Preface.html">Preface</a></span></dt><dd><dl><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47723002008736">1. Document Conventions</a></span></dt><dd><dl><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47722993083520">1.1. Typographic Conventions</a></span></dt><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47722995926912">1.2. Pull-quote Conventions</a></span></dt><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47723003338560">1.3. Notes and Warnings</a></span></dt></dl></dd><dt><span class="section"><a href="pr01s02.html">2. We Need Feedback!</a></span></dt></dl></dd><dt><span class="chapter"><a href="introduction.html">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.html#goals">1.1. Documentation Goals</a></span></dt><dt><span class="section"><a href="intro-systemtap-vs-others.html">1.2. SystemTap Capabilities</a></span></dt><dt><span class="section"><a href="intro-systemtap-limitations.html">1.3. Limitations of SystemTap</a></span></dt></dl></dd><dt><span class="chapter"><a href="using-systemtap.html">2. Using SystemTap</a></span></dt><dd><dl><dt><span class="section"><a href="using-systemtap.html#using-setup">2.1. Installation and Setup</a></span></dt><dd><dl><dt><span class="section"><a href="using-systemtap.html#installproper">2.1.1. Installing SystemTap</a></span></dt><dt><span class="section"><a href="using-systemtap.html#install-kinfo">2.1.2. Installing Required Kernel Information Packages Manually</a></span></dt><dt><span class="section"><a href="using-systemtap.html#testing">2.1.3. Initial Testing</a></span></dt></dl></dd><dt><span class="section"><a href="cross-compiling.html">2.2. Generating Instrumentation for Other Computers</a></span></dt><dt><span class="section"><a href="using-usage.html">2.3. Running SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="using-usage.html#flight-recorder">2.3.1. SystemTap Flight Recorder Mode</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="understanding-how-systemtap-works.html">3. Understanding How SystemTap Works</a></span></dt><dd><dl><dt><span class="section"><a href="understanding-how-systemtap-works.html#understanding-architecture-tools">3.1. Architecture</a></span></dt><dt><span class="section"><a href="scripts.html">3.2. SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="scripts.html#systemtapscript-events">3.2.1. Event</a></span></dt><dt><span class="section"><a href="systemtapscript-handler.html">3.2.2. SystemTap Handler/Body</a></span></dt></dl></dd><dt><span class="section"><a href="scriptconstructions.html">3.3. Basic SystemTap Handler Constructs</a></span></dt><dd><dl><dt><span class="section"><a href="scriptconstructions.html#variablesconstructs">3.3.1. Variables</a></span></dt><dt><span class="section"><a href="targetvariables.html">3.3.2. Target Variables</a></span></dt><dt><span class="section"><a href="handlerconditionalstatements.html">3.3.3. Conditional Statements</a></span></dt><dt><span class="section"><a href="commandlineargssect.html">3.3.4. Command-Line Arguments</a></span></dt></dl></dd><dt><span class="section"><a href="associativearrays.html">3.4. Associative Arrays</a></span></dt><dt><span class="section"><a href="arrayoperators.html">3.5. Array Operations in SystemTap</a></span></dt><dd><dl><dt><span class="section"><a href="arrayoperators.html#arrayops-assignvalue">3.5.1. Assigning an Associated Value</a></span></dt><dt><span class="section"><a href="arrayops-readvalues.html">3.5.2. Reading Values From Arrays</a></span></dt><dt><span class="section"><a href="arrayops-increment.html">3.5.3. Incrementing Associated Values</a></span></dt><dt><span class="section"><a href="arrayops-foreach.html">3.5.4. Processing Multiple Elements in an Array</a></span></dt><dt><span class="section"><a href="arrayops-deleting.html">3.5.5. Clearing/Deleting Arrays and Array Elements</a></span></dt><dt><span class="section"><a href="arrayops-conditionals.html">3.5.6. Using Arrays in Conditional Statements</a></span></dt><dt><span class="section"><a href="arrayops-aggregates.html">3.5.7. Computing for Statistical Aggregates</a></span></dt></dl></dd><dt><span class="section"><a href="understanding-tapsets.html">3.6. Tapsets</a></span></dt></dl></dd><dt><span class="chapter"><a href="userspace-probing.html">4. User-space Probing</a></span></dt><dd><dl><dt><span class="section"><a href="userspace-probing.html#uevents">4.1. User-Space Events</a></span></dt><dt><span class="section"><a href="utargetvariable.html">4.2. Accessing User-Space Target Variables</a></span></dt><dt><span class="section"><a href="ustack.html">4.3. User-Space Stack Backtraces</a></span></dt></dl></dd><dt><span class="chapter"><a href="useful-systemtap-scripts.html">5. Useful SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="useful-systemtap-scripts.html#mainsect-network">5.1. Network</a></span></dt><dd><dl><dt><span class="section"><a href="useful-systemtap-scripts.html#nettopsect">5.1.1. Network Profiling</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#sockettracesect">5.1.2. Tracing Functions Called in Network Socket Code</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpconnectionssect">5.1.3. Monitoring Incoming TCP Connections</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpdumplikesect">5.1.4. Monitoring TCP Packets</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#dropwatchsect">5.1.5. Monitoring Network Packets Drops in Kernel</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-disk.html">5.2. Disk</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-disk.html#disktop">5.2.1. Summarizing Disk Read/Write Traffic</a></span></dt><dt><span class="section"><a href="iotimesect.html">5.2.2. Tracking I/O Time For Each File Read or Write</a></span></dt><dt><span class="section"><a href="traceiosect.html">5.2.3. Track Cumulative IO</a></span></dt><dt><span class="section"><a href="traceio2sect.html">5.2.4. I/O Monitoring (By Device)</a></span></dt><dt><span class="section"><a href="inodewatchsect.html">5.2.5. Monitoring Reads and Writes to a File</a></span></dt><dt><span class="section"><a href="inodewatch2sect.html">5.2.6. Monitoring Changes to File Attributes</a></span></dt><dt><span class="section"><a href="ioblktimesect.html">5.2.7. Periodically Print I/O Block Time</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-profiling.html">5.3. Profiling</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-profiling.html#countcallssect">5.3.1. Counting Function Calls Made</a></span></dt><dt><span class="section"><a href="paracallgraph.html">5.3.2. Call Graph Tracing</a></span></dt><dt><span class="section"><a href="threadtimessect.html">5.3.3. Determining Time Spent in Kernel and User Space</a></span></dt><dt><span class="section"><a href="timeoutssect.html">5.3.4. Monitoring Polling Applications</a></span></dt><dt><span class="section"><a href="topsyssect.html">5.3.5. Tracking Most Frequently Used System Calls</a></span></dt><dt><span class="section"><a href="syscallsbyprocpidsect.html">5.3.6. Tracking System Call Volume Per Process</a></span></dt></dl></dd><dt><span class="section"><a href="futexcontentionsect.html">5.4. Identifying Contended User-Space Locks</a></span></dt></dl></dd><dt><span class="chapter"><a href="errors.html">6. Understanding SystemTap Errors</a></span></dt><dd><dl><dt><span class="section"><a href="errors.html#parsetype">6.1. Parse and Semantic Errors</a></span></dt><dt><span class="section"><a href="runtimeerror.html">6.2. Runtime Errors and Warnings</a></span></dt></dl></dd><dt><span class="chapter"><a href="references.html">7. References</a></span></dt><dt><span class="appendix"><a href="appe-Publican-Revision_History.html">A. Revision History</a></span></dt><dt><span class="index"><a href="ix01.html">Index</a></span></dt></dl></div></div><ul class="docnav"><li class="previous"></li><li class="next"><a accesskey="n" href="SystemTap_Beginners_Guide-Preface.html"><strong>Next</strong>Preface</a></li></ul></body></html> \ No newline at end of file | 17 | </div></div></div></div></div><div class="toc"><dl class="toc"><dt><span class="preface"><a href="SystemTap_Beginners_Guide-Preface.html">Preface</a></span></dt><dd><dl><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47650199603760">1. Document Conventions</a></span></dt><dd><dl><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47650146025328">1.1. Typographic Conventions</a></span></dt><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47650199533440">1.2. Pull-quote Conventions</a></span></dt><dt><span class="section"><a href="SystemTap_Beginners_Guide-Preface.html#idm47650183097296">1.3. Notes and Warnings</a></span></dt></dl></dd><dt><span class="section"><a href="pr01s02.html">2. We Need Feedback!</a></span></dt></dl></dd><dt><span class="chapter"><a href="introduction.html">1. Introduction</a></span></dt><dd><dl><dt><span class="section"><a href="introduction.html#goals">1.1. Documentation Goals</a></span></dt><dt><span class="section"><a href="intro-systemtap-vs-others.html">1.2. SystemTap Capabilities</a></span></dt><dt><span class="section"><a href="intro-systemtap-limitations.html">1.3. Limitations of SystemTap</a></span></dt></dl></dd><dt><span class="chapter"><a href="using-systemtap.html">2. Using SystemTap</a></span></dt><dd><dl><dt><span class="section"><a href="using-systemtap.html#using-setup">2.1. Installation and Setup</a></span></dt><dd><dl><dt><span class="section"><a href="using-systemtap.html#installproper">2.1.1. Installing SystemTap</a></span></dt><dt><span class="section"><a href="using-systemtap.html#install-kinfo">2.1.2. Installing Required Kernel Information Packages Manually</a></span></dt><dt><span class="section"><a href="using-systemtap.html#testing">2.1.3. Initial Testing</a></span></dt></dl></dd><dt><span class="section"><a href="cross-compiling.html">2.2. Generating Instrumentation for Other Computers</a></span></dt><dt><span class="section"><a href="using-usage.html">2.3. Running SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="using-usage.html#flight-recorder">2.3.1. SystemTap Flight Recorder Mode</a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="understanding-how-systemtap-works.html">3. Understanding How SystemTap Works</a></span></dt><dd><dl><dt><span class="section"><a href="understanding-how-systemtap-works.html#understanding-architecture-tools">3.1. Architecture</a></span></dt><dt><span class="section"><a href="scripts.html">3.2. SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="scripts.html#systemtapscript-events">3.2.1. Event</a></span></dt><dt><span class="section"><a href="systemtapscript-handler.html">3.2.2. SystemTap Handler/Body</a></span></dt></dl></dd><dt><span class="section"><a href="scriptconstructions.html">3.3. Basic SystemTap Handler Constructs</a></span></dt><dd><dl><dt><span class="section"><a href="scriptconstructions.html#variablesconstructs">3.3.1. Variables</a></span></dt><dt><span class="section"><a href="targetvariables.html">3.3.2. Target Variables</a></span></dt><dt><span class="section"><a href="handlerconditionalstatements.html">3.3.3. Conditional Statements</a></span></dt><dt><span class="section"><a href="commandlineargssect.html">3.3.4. Command-Line Arguments</a></span></dt></dl></dd><dt><span class="section"><a href="associativearrays.html">3.4. Associative Arrays</a></span></dt><dt><span class="section"><a href="arrayoperators.html">3.5. Array Operations in SystemTap</a></span></dt><dd><dl><dt><span class="section"><a href="arrayoperators.html#arrayops-assignvalue">3.5.1. Assigning an Associated Value</a></span></dt><dt><span class="section"><a href="arrayops-readvalues.html">3.5.2. Reading Values From Arrays</a></span></dt><dt><span class="section"><a href="arrayops-increment.html">3.5.3. Incrementing Associated Values</a></span></dt><dt><span class="section"><a href="arrayops-foreach.html">3.5.4. Processing Multiple Elements in an Array</a></span></dt><dt><span class="section"><a href="arrayops-deleting.html">3.5.5. Clearing/Deleting Arrays and Array Elements</a></span></dt><dt><span class="section"><a href="arrayops-conditionals.html">3.5.6. Using Arrays in Conditional Statements</a></span></dt><dt><span class="section"><a href="arrayops-aggregates.html">3.5.7. Computing for Statistical Aggregates</a></span></dt></dl></dd><dt><span class="section"><a href="understanding-tapsets.html">3.6. Tapsets</a></span></dt></dl></dd><dt><span class="chapter"><a href="userspace-probing.html">4. User-space Probing</a></span></dt><dd><dl><dt><span class="section"><a href="userspace-probing.html#uevents">4.1. User-Space Events</a></span></dt><dt><span class="section"><a href="utargetvariable.html">4.2. Accessing User-Space Target Variables</a></span></dt><dt><span class="section"><a href="ustack.html">4.3. User-Space Stack Backtraces</a></span></dt></dl></dd><dt><span class="chapter"><a href="useful-systemtap-scripts.html">5. Useful SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="useful-systemtap-scripts.html#mainsect-network">5.1. Network</a></span></dt><dd><dl><dt><span class="section"><a href="useful-systemtap-scripts.html#nettopsect">5.1.1. Network Profiling</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#sockettracesect">5.1.2. Tracing Functions Called in Network Socket Code</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpconnectionssect">5.1.3. Monitoring Incoming TCP Connections</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpdumplikesect">5.1.4. Monitoring TCP Packets</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#dropwatchsect">5.1.5. Monitoring Network Packets Drops in Kernel</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-disk.html">5.2. Disk</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-disk.html#disktop">5.2.1. Summarizing Disk Read/Write Traffic</a></span></dt><dt><span class="section"><a href="iotimesect.html">5.2.2. Tracking I/O Time For Each File Read or Write</a></span></dt><dt><span class="section"><a href="traceiosect.html">5.2.3. Track Cumulative IO</a></span></dt><dt><span class="section"><a href="traceio2sect.html">5.2.4. I/O Monitoring (By Device)</a></span></dt><dt><span class="section"><a href="inodewatchsect.html">5.2.5. Monitoring Reads and Writes to a File</a></span></dt><dt><span class="section"><a href="inodewatch2sect.html">5.2.6. Monitoring Changes to File Attributes</a></span></dt><dt><span class="section"><a href="ioblktimesect.html">5.2.7. Periodically Print I/O Block Time</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-profiling.html">5.3. Profiling</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-profiling.html#countcallssect">5.3.1. Counting Function Calls Made</a></span></dt><dt><span class="section"><a href="paracallgraph.html">5.3.2. Call Graph Tracing</a></span></dt><dt><span class="section"><a href="threadtimessect.html">5.3.3. Determining Time Spent in Kernel and User Space</a></span></dt><dt><span class="section"><a href="timeoutssect.html">5.3.4. Monitoring Polling Applications</a></span></dt><dt><span class="section"><a href="topsyssect.html">5.3.5. Tracking Most Frequently Used System Calls</a></span></dt><dt><span class="section"><a href="syscallsbyprocpidsect.html">5.3.6. Tracking System Call Volume Per Process</a></span></dt></dl></dd><dt><span class="section"><a href="futexcontentionsect.html">5.4. Identifying Contended User-Space Locks</a></span></dt></dl></dd><dt><span class="chapter"><a href="errors.html">6. Understanding SystemTap Errors</a></span></dt><dd><dl><dt><span class="section"><a href="errors.html#parsetype">6.1. Parse and Semantic Errors</a></span></dt><dt><span class="section"><a href="runtimeerror.html">6.2. Runtime Errors and Warnings</a></span></dt></dl></dd><dt><span class="chapter"><a href="references.html">7. References</a></span></dt><dt><span class="appendix"><a href="appe-Publican-Revision_History.html">A. Revision History</a></span></dt><dt><span class="index"><a href="ix01.html">Index</a></span></dt></dl></div></div><ul class="docnav"><li class="previous"></li><li class="next"><a accesskey="n" href="SystemTap_Beginners_Guide-Preface.html"><strong>Next</strong>Preface</a></li></ul></body></html> \ No newline at end of file | 
| diff --git a/SystemTap_Beginners_Guide/inodewatch2sect.html b/SystemTap_Beginners_Guide/inodewatch2sect.html index de13b9ce..8153376f 100644 --- a/SystemTap_Beginners_Guide/inodewatch2sect.html +++ b/SystemTap_Beginners_Guide/inodewatch2sect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.6. Monitoring Changes to File Attributes</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="inodewatchsect.html" title="5.2.5. Monitoring Reads and Writes to a File" /><link rel="next" href="ioblktimesect.html" title="5.2.7. Periodically Print I/O Block Time" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="inodewatchsect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="ioblktimesect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="inodewatch2sect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.6. Monitoring Changes to File Attributes</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="inodewatchsect.html" title="5.2.5. Monitoring Reads and Writes to a File" /><link rel="next" href="ioblktimesect.html" title="5.2.7. Periodically Print I/O Block Time" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="inodewatchsect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="ioblktimesect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="inodewatch2sect"> | 
| 3 | </a>5.2.6. Monitoring Changes to File Attributes</h3></div></div></div><a id="idm47722953178624" class="indexterm"></a><a id="idm47722991056864" class="indexterm"></a><a id="idm47722994685072" class="indexterm"></a><a id="idm47722952022048" class="indexterm"></a><a id="idm47722995763920" class="indexterm"></a><div class="para"> | 3 | </a>5.2.6. Monitoring Changes to File Attributes</h3></div></div></div><a id="idm47650169029184" class="indexterm"></a><a id="idm47650186626256" class="indexterm"></a><a id="idm47650188746416" class="indexterm"></a><a id="idm47650183577712" class="indexterm"></a><a id="idm47650154793408" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time. | 4 | This section describes how to monitor if any processes are changing the attributes of a targeted file, in real time. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">inodewatch2.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">inodewatch2.stp</div> | 
| 6 | 6 | ||
| diff --git a/SystemTap_Beginners_Guide/inodewatchsect.html b/SystemTap_Beginners_Guide/inodewatchsect.html index 4b549820..d662a56e 100644 --- a/SystemTap_Beginners_Guide/inodewatchsect.html +++ b/SystemTap_Beginners_Guide/inodewatchsect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.5. Monitoring Reads and Writes to a File</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="traceio2sect.html" title="5.2.4. I/O Monitoring (By Device)" /><link rel="next" href="inodewatch2sect.html" title="5.2.6. Monitoring Changes to File Attributes" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="traceio2sect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="inodewatch2sect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="inodewatchsect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.5. Monitoring Reads and Writes to a File</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="traceio2sect.html" title="5.2.4. I/O Monitoring (By Device)" /><link rel="next" href="inodewatch2sect.html" title="5.2.6. Monitoring Changes to File Attributes" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="traceio2sect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="inodewatch2sect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="inodewatchsect"> | 
| 3 | </a>5.2.5. Monitoring Reads and Writes to a File</h3></div></div></div><a id="idm47722990928912" class="indexterm"></a><a id="idm47722999196416" class="indexterm"></a><a id="idm47722957334960" class="indexterm"></a><a id="idm47722999816272" class="indexterm"></a><a id="idm47722957211120" class="indexterm"></a><a id="idm47723005669424" class="indexterm"></a><div class="para"> | 3 | </a>5.2.5. Monitoring Reads and Writes to a File</h3></div></div></div><a id="idm47650195627504" class="indexterm"></a><a id="idm47650154795184" class="indexterm"></a><a id="idm47650193394784" class="indexterm"></a><a id="idm47650169030752" class="indexterm"></a><a id="idm47650187714336" class="indexterm"></a><a id="idm47650189173056" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to monitor reads from and writes to a file in real time. | 4 | This section describes how to monitor reads from and writes to a file in real time. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">inodewatch.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">inodewatch.stp</div> | 
| 6 | 6 | ||
| @@ -17,17 +17,17 @@ probe vfs.write, vfs.read | |||
| 17 | </pre> | 17 | </pre> | 
| 18 | </div><div class="para"> | 18 | </div><div class="para"> | 
| 19 | <a class="xref" href="inodewatchsect.html#inodewatch">inodewatch.stp</a> takes the following information about the file as arguments on the command line: | 19 | <a class="xref" href="inodewatchsect.html#inodewatch">inodewatch.stp</a> takes the following information about the file as arguments on the command line: | 
| 20 | </div><a id="idm47722993138368" class="indexterm"></a><a id="idm47722987927056" class="indexterm"></a><a id="idm47722998277104" class="indexterm"></a><a id="idm47722999390400" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 20 | </div><a id="idm47650180952464" class="indexterm"></a><a id="idm47650183253648" class="indexterm"></a><a id="idm47650183219872" class="indexterm"></a><a id="idm47650185530096" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 
| 21 | The file's major device number. | 21 | The file's major device number. | 
| 22 | </div></li><li class="listitem"><div class="para"> | 22 | </div></li><li class="listitem"><div class="para"> | 
| 23 | The file's minor device number. | 23 | The file's minor device number. | 
| 24 | </div></li><li class="listitem"><div class="para"> | 24 | </div></li><li class="listitem"><div class="para"> | 
| 25 | The file's <code class="command">inode</code> number. | 25 | The file's <code class="command">inode</code> number. | 
| 26 | </div></li></ul></div><a id="idm47722987774320" class="indexterm"></a><a id="idm47722951191152" class="indexterm"></a><a id="idm47723004363376" class="indexterm"></a><div class="para"> | 26 | </div></li></ul></div><a id="idm47650188916640" class="indexterm"></a><a id="idm47650196344272" class="indexterm"></a><a id="idm47650183146720" class="indexterm"></a><div class="para"> | 
| 27 | To get this information, use <code class="command">stat -c '%D %i' <em class="replaceable">filename</em></code>, where <code class="command"><em class="replaceable">filename</em></code> is an absolute path. | 27 | To get this information, use <code class="command">stat -c '%D %i' <em class="replaceable">filename</em></code>, where <code class="command"><em class="replaceable">filename</em></code> is an absolute path. | 
| 28 | </div><div class="para"> | 28 | </div><div class="para"> | 
| 29 | For instance: to monitor <code class="filename">/etc/crontab</code>, run <code class="command">stat -c '%D %i' /etc/crontab</code> first. This gives the following output: | 29 | For instance: to monitor <code class="filename">/etc/crontab</code>, run <code class="command">stat -c '%D %i' /etc/crontab</code> first. This gives the following output: | 
| 30 | </div><pre class="screen">805 1078319</pre><a id="idm47723005590544" class="indexterm"></a><a id="idm47722954410768" class="indexterm"></a><a id="idm47722999838160" class="indexterm"></a><div class="para"> | 30 | </div><pre class="screen">805 1078319</pre><a id="idm47650191184800" class="indexterm"></a><a id="idm47650145401424" class="indexterm"></a><a id="idm47650191458016" class="indexterm"></a><div class="para"> | 
| 31 | <code class="computeroutput">805</code> is the base-16 (hexadecimal) device number. The lower two digits are the minor device number and the upper digits are the major number. <code class="computeroutput">1078319</code> is the <code class="command">inode</code> number. To start monitoring <code class="filename">/etc/crontab</code>, run <code class="command">stap inodewatch.stp 0x8 0x05 1078319</code> (The <code class="command">0x</code> prefixes indicate base-16 values. | 31 | <code class="computeroutput">805</code> is the base-16 (hexadecimal) device number. The lower two digits are the minor device number and the upper digits are the major number. <code class="computeroutput">1078319</code> is the <code class="command">inode</code> number. To start monitoring <code class="filename">/etc/crontab</code>, run <code class="command">stap inodewatch.stp 0x8 0x05 1078319</code> (The <code class="command">0x</code> prefixes indicate base-16 values. | 
| 32 | </div><div class="para"> | 32 | </div><div class="para"> | 
| 33 | The output of this command contains the name and ID of any process performing a read/write, the function it is performing (that is, <code class="command">vfs_read</code> or <code class="command">vfs_write</code>), the device number (in hex format), and the <code class="command">inode</code> number. <a class="xref" href="inodewatchsect.html#inodewatchoutput">Example 5.10, “inodewatch.stp Sample Output”</a> contains the output of <code class="command">stap inodewatch.stp 0x8 0x05 1078319</code> (when <code class="command">cat /etc/crontab</code> is executed while the script is running) : | 33 | The output of this command contains the name and ID of any process performing a read/write, the function it is performing (that is, <code class="command">vfs_read</code> or <code class="command">vfs_write</code>), the device number (in hex format), and the <code class="command">inode</code> number. <a class="xref" href="inodewatchsect.html#inodewatchoutput">Example 5.10, “inodewatch.stp Sample Output”</a> contains the output of <code class="command">stap inodewatch.stp 0x8 0x05 1078319</code> (when <code class="command">cat /etc/crontab</code> is executed while the script is running) : | 
| diff --git a/SystemTap_Beginners_Guide/intro-systemtap-limitations.html b/SystemTap_Beginners_Guide/intro-systemtap-limitations.html index 0fad8a7a..aeededf8 100644 --- a/SystemTap_Beginners_Guide/intro-systemtap-limitations.html +++ b/SystemTap_Beginners_Guide/intro-systemtap-limitations.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">1.3. Limitations of SystemTap</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="introduction.html" title="Chapter 1. Introduction" /><link rel="prev" href="intro-systemtap-vs-others.html" title="1.2. SystemTap Capabilities" /><link rel="next" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="intro-systemtap-vs-others.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="using-systemtap.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="intro-systemtap-limitations"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">1.3. Limitations of SystemTap</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="introduction.html" title="Chapter 1. Introduction" /><link rel="prev" href="intro-systemtap-vs-others.html" title="1.2. SystemTap Capabilities" /><link rel="next" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="intro-systemtap-vs-others.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="using-systemtap.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="intro-systemtap-limitations"> | 
| 3 | </a>1.3. Limitations of SystemTap</h2></div></div></div><a id="idm47723004038720" class="indexterm"></a><a id="idm47723004037312" class="indexterm"></a><div class="para"> | 3 | </a>1.3. Limitations of SystemTap</h2></div></div></div><a id="idm47650150072848" class="indexterm"></a><a id="idm47650150071440" class="indexterm"></a><div class="para"> | 
| 4 | The current iteration of SystemTap allows for a multitude of options when probing kernel-space events for a wide range of kernels. However, SystemTap's ability to probe user-space events depends on kernel support (the Utrace mechanism) that is not available in many kernels. As a consequence, only some kernel versions support user-space probing. | 4 | The current iteration of SystemTap allows for a multitude of options when probing kernel-space events for a wide range of kernels. However, SystemTap's ability to probe user-space events depends on kernel support (the Utrace mechanism) that is not available in many kernels. As a consequence, only some kernel versions support user-space probing. | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | At present, the developmental efforts of the SystemTap community are geared towards improving SystemTap's user-space probing capabilities. | 6 | At present, the developmental efforts of the SystemTap community are geared towards improving SystemTap's user-space probing capabilities. | 
| diff --git a/SystemTap_Beginners_Guide/intro-systemtap-vs-others.html b/SystemTap_Beginners_Guide/intro-systemtap-vs-others.html index 1b1e3d1f..6c70f2ed 100644 --- a/SystemTap_Beginners_Guide/intro-systemtap-vs-others.html +++ b/SystemTap_Beginners_Guide/intro-systemtap-vs-others.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">1.2. SystemTap Capabilities</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="introduction.html" title="Chapter 1. Introduction" /><link rel="prev" href="introduction.html" title="Chapter 1. Introduction" /><link rel="next" href="intro-systemtap-limitations.html" title="1.3. Limitations of SystemTap" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="introduction.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="intro-systemtap-limitations.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="intro-systemtap-vs-others"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">1.2. SystemTap Capabilities</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="introduction.html" title="Chapter 1. Introduction" /><link rel="prev" href="introduction.html" title="Chapter 1. Introduction" /><link rel="next" href="intro-systemtap-limitations.html" title="1.3. Limitations of SystemTap" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="introduction.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="intro-systemtap-limitations.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="intro-systemtap-vs-others"> | 
| 3 | </a>1.2. SystemTap Capabilities</h2></div></div></div><a id="idm47722994154992" class="indexterm"></a><a id="idm47722994153584" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 3 | </a>1.2. SystemTap Capabilities</h2></div></div></div><a id="idm47650146824976" class="indexterm"></a><a id="idm47650187592272" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 
| 4 | <span class="strong strong"><strong>Flexibility:</strong></span> 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. As a result, SystemTap is not so much a <span class="emphasis"><em>tool</em></span> as it is a system that allows you to develop your own kernel-specific forensic and monitoring tools. | 4 | <span class="strong strong"><strong>Flexibility:</strong></span> 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. As a result, SystemTap is not so much a <span class="emphasis"><em>tool</em></span> as it is a system that allows you to develop your own kernel-specific forensic and monitoring tools. | 
| 5 | </div></li><li class="listitem"><div class="para"> | 5 | </div></li><li class="listitem"><div class="para"> | 
| 6 | <span class="strong strong"><strong>Ease of use</strong></span>: as mentioned earlier, SystemTap allows users to probe kernel-space events without having to resort to instrument, recompile, install, and reboot the kernel. | 6 | <span class="strong strong"><strong>Ease of use</strong></span>: as mentioned earlier, SystemTap allows users to probe kernel-space events without having to resort to instrument, recompile, install, and reboot the kernel. | 
| diff --git a/SystemTap_Beginners_Guide/introduction.html b/SystemTap_Beginners_Guide/introduction.html index 450865b6..b360d355 100644 --- a/SystemTap_Beginners_Guide/introduction.html +++ b/SystemTap_Beginners_Guide/introduction.html | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 1. Introduction</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="pr01s02.html" title="2. We Need Feedback!" /><link rel="next" href="intro-systemtap-vs-others.html" title="1.2. SystemTap Capabilities" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="pr01s02.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="intro-systemtap-vs-others.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="introduction"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 1. Introduction</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="pr01s02.html" title="2. We Need Feedback!" /><link rel="next" href="intro-systemtap-vs-others.html" title="1.2. SystemTap Capabilities" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="pr01s02.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="intro-systemtap-vs-others.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="introduction"> | 
| 3 | </a>Chapter 1. Introduction</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="introduction.html#goals">1.1. Documentation Goals</a></span></dt><dt><span class="section"><a href="intro-systemtap-vs-others.html">1.2. SystemTap Capabilities</a></span></dt><dt><span class="section"><a href="intro-systemtap-limitations.html">1.3. Limitations of SystemTap</a></span></dt></dl></div><a id="idm47722956220384" class="indexterm"></a><a id="idm47722951230960" class="indexterm"></a><div class="para"> | 3 | </a>Chapter 1. Introduction</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="introduction.html#goals">1.1. Documentation Goals</a></span></dt><dt><span class="section"><a href="intro-systemtap-vs-others.html">1.2. SystemTap Capabilities</a></span></dt><dt><span class="section"><a href="intro-systemtap-limitations.html">1.3. Limitations of SystemTap</a></span></dt></dl></div><a id="idm47650143512080" class="indexterm"></a><a id="idm47650151535056" class="indexterm"></a><div class="para"> | 
| 4 | SystemTap is a tracing and probing tool that allows users to study and monitor the activities of the computer system (particularly, the kernel) in fine detail. It provides information similar to the output of tools like <code class="command">netstat</code>, <code class="command">ps</code>, <code class="command">top</code>, and <code class="command">iostat</code>, but is designed to provide more filtering and analysis options for collected information. | 4 | SystemTap is a tracing and probing tool that allows users to study and monitor the activities of the computer system (particularly, the kernel) in fine detail. It provides information similar to the output of tools like <code class="command">netstat</code>, <code class="command">ps</code>, <code class="command">top</code>, and <code class="command">iostat</code>, but is designed to provide more filtering and analysis options for collected information. | 
| 5 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="goals"> | 5 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="goals"> | 
| 6 | </a>1.1. Documentation Goals</h2></div></div></div><a id="idm47722993492224" class="indexterm"></a><a id="idm47722951456384" class="indexterm"></a><a id="idm47722949379872" class="indexterm"></a><a id="idm47722997707056" class="indexterm"></a><div class="para"> | 6 | </a>1.1. Documentation Goals</h2></div></div></div><a id="idm47650148050896" class="indexterm"></a><a id="idm47650192212032" class="indexterm"></a><a id="idm47650198747760" class="indexterm"></a><a id="idm47650192619040" class="indexterm"></a><div class="para"> | 
| 7 | 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. | 7 | 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. | 
| 8 | </div><div class="para"> | 8 | </div><div class="para"> | 
| 9 | 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 and allows users to gather the same information by running user-written SystemTap scripts. | 9 | 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 and allows users to gather the same information by running user-written SystemTap scripts. | 
| diff --git a/SystemTap_Beginners_Guide/ioblktimesect.html b/SystemTap_Beginners_Guide/ioblktimesect.html index b47c61ab..c1d77eb5 100644 --- a/SystemTap_Beginners_Guide/ioblktimesect.html +++ b/SystemTap_Beginners_Guide/ioblktimesect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.7. Periodically Print I/O Block Time</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="inodewatch2sect.html" title="5.2.6. Monitoring Changes to File Attributes" /><link rel="next" href="mainsect-profiling.html" title="5.3. Profiling" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="inodewatch2sect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="mainsect-profiling.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="ioblktimesect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.7. Periodically Print I/O Block Time</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="inodewatch2sect.html" title="5.2.6. Monitoring Changes to File Attributes" /><link rel="next" href="mainsect-profiling.html" title="5.3. Profiling" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="inodewatch2sect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="mainsect-profiling.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="ioblktimesect"> | 
| 3 | </a>5.2.7. Periodically Print I/O Block Time</h3></div></div></div><a id="idm47722988090192" class="indexterm"></a><a id="idm47723001459184" class="indexterm"></a><a id="idm47723001311568" class="indexterm"></a><a id="idm47723001835024" class="indexterm"></a><a id="idm47723001414592" class="indexterm"></a><div class="para"> | 3 | </a>5.2.7. Periodically Print I/O Block Time</h3></div></div></div><a id="idm47650197157744" class="indexterm"></a><a id="idm47650186991552" class="indexterm"></a><a id="idm47650192345360" class="indexterm"></a><a id="idm47650196316192" class="indexterm"></a><a id="idm47650190327168" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to track the amount of time each block I/O requests spends waiting for completion. This is useful in determining whether there are too many outstanding block I/O operations at any given time. | 4 | This section describes how to track the amount of time each block I/O requests spends waiting for completion. This is useful in determining whether there are too many outstanding block I/O operations at any given time. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">ioblktime.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">ioblktime.stp</div> | 
| 6 | 6 | ||
| diff --git a/SystemTap_Beginners_Guide/iotimesect.html b/SystemTap_Beginners_Guide/iotimesect.html index 6f7aec3a..d94dfc94 100644 --- a/SystemTap_Beginners_Guide/iotimesect.html +++ b/SystemTap_Beginners_Guide/iotimesect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.2. Tracking I/O Time For Each File Read or Write</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="mainsect-disk.html" title="5.2. Disk" /><link rel="next" href="traceiosect.html" title="5.2.3. Track Cumulative IO" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="mainsect-disk.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="traceiosect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="iotimesect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.2. Tracking I/O Time For Each File Read or Write</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="mainsect-disk.html" title="5.2. Disk" /><link rel="next" href="traceiosect.html" title="5.2.3. Track Cumulative IO" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="mainsect-disk.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="traceiosect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="iotimesect"> | 
| 3 | </a>5.2.2. Tracking I/O Time For Each File Read or Write</h3></div></div></div><a id="idm47722960582208" class="indexterm"></a><a id="idm47722949627776" class="indexterm"></a><a id="idm47722955124256" class="indexterm"></a><a id="idm47722990945856" class="indexterm"></a><a id="idm47723005372624" class="indexterm"></a><div class="para"> | 3 | </a>5.2.2. Tracking I/O Time For Each File Read or Write</h3></div></div></div><a id="idm47650190456912" class="indexterm"></a><a id="idm47650187707856" class="indexterm"></a><a id="idm47650148428720" class="indexterm"></a><a id="idm47650196105200" class="indexterm"></a><a id="idm47650180951632" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to monitor the amount of time it takes for each process to read from or write to any file. This is useful to determine what files are slow to load on a given system. | 4 | This section describes how to monitor the amount of time it takes for each process to read from or write to any file. This is useful to determine what files are slow to load on a given system. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">iotime.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">iotime.stp</div> | 
| 6 | 6 | ||
| @@ -91,7 +91,7 @@ probe syscall.close { | |||
| 91 | </pre> | 91 | </pre> | 
| 92 | </div><div class="para"> | 92 | </div><div class="para"> | 
| 93 | <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> tracks each time a system call opens, closes, reads from, and writes to a file. For each file any system call accesses, <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> counts the number of microseconds it takes for any reads or writes to finish and tracks the amount of data (in bytes) read from or written to the file. | 93 | <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> tracks each time a system call opens, closes, reads from, and writes to a file. For each file any system call accesses, <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> counts the number of microseconds it takes for any reads or writes to finish and tracks the amount of data (in bytes) read from or written to the file. | 
| 94 | </div><a id="idm47722990821712" class="indexterm"></a><a id="idm47722951202160" class="indexterm"></a><a id="idm47722954907552" class="indexterm"></a><div class="para"> | 94 | </div><a id="idm47650154845040" class="indexterm"></a><a id="idm47650197292288" class="indexterm"></a><a id="idm47650193547456" class="indexterm"></a><div class="para"> | 
| 95 | <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> also uses the local variable <code class="command">$count</code> to track the amount of data (in bytes) that any system call <span class="emphasis"><em>attempts</em></span> to read or write. Note that <code class="command">$return</code> (as used in <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> from <a class="xref" href="mainsect-disk.html#disktop">Section 5.2.1, “Summarizing Disk Read/Write Traffic”</a>) stores the <span class="emphasis"><em>actual</em></span> amount of data read/written. <code class="command">$count</code> can only be used on probes that track data reads or writes (that is, <code class="command">syscall.read</code> and <code class="command">syscall.write</code>). | 95 | <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> also uses the local variable <code class="command">$count</code> to track the amount of data (in bytes) that any system call <span class="emphasis"><em>attempts</em></span> to read or write. Note that <code class="command">$return</code> (as used in <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> from <a class="xref" href="mainsect-disk.html#disktop">Section 5.2.1, “Summarizing Disk Read/Write Traffic”</a>) stores the <span class="emphasis"><em>actual</em></span> amount of data read/written. <code class="command">$count</code> can only be used on probes that track data reads or writes (that is, <code class="command">syscall.read</code> and <code class="command">syscall.write</code>). | 
| 96 | </div><div class="example"><a id="iotimeoutput"> | 96 | </div><div class="example"><a id="iotimeoutput"> | 
| 97 | </a><p class="title"><strong>Example 5.7. <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 97 | </a><p class="title"><strong>Example 5.7. <a class="xref" href="iotimesect.html#iotime">iotime.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 
| diff --git a/SystemTap_Beginners_Guide/ix01.html b/SystemTap_Beginners_Guide/ix01.html index ffda4146..f141130f 100644 --- a/SystemTap_Beginners_Guide/ix01.html +++ b/SystemTap_Beginners_Guide/ix01.html | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Index</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="appe-Publican-Revision_History.html" title="Appendix A. Revision History" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="appe-Publican-Revision_History.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"></li></ul><div class="index"><div class="titlepage"><div><div><h1 class="title"><a id="idm47723009871504"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Index</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="appe-Publican-Revision_History.html" title="Appendix A. Revision History" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="appe-Publican-Revision_History.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"></li></ul><div class="index"><div class="titlepage"><div><div><h1 class="title"><a id="idm47650148145472"> | 
| 3 | </a>Index</h1></div></div></div><div class="index"><div class="indexdiv"><h3>Symbols</h3><dl><dt>$count</dt><dd><dl><dt>sample usage</dt><dd><dl><dt>local variables, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd></dl></dd><dt>$return</dt><dd><dl><dt>sample usage</dt><dd><dl><dt>local variables, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a>, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd></dl></dd><dt>@avg (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@count (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@max (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@min (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@sum (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>A</h3><dl><dt>adding values to statistical aggregates</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>advantages of cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>aggregate element not found</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>aggregates (statistical)</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>aggregation overflow</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>algebraic formulas using arrays</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>architecture notation, determining, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>architecture of SystemTap, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>array locals not supported</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>array operations</dt><dd><dl><dt>assigning associated values, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt><dd><dl><dt>associating timestamps to process names, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>associative arrays, <a class="indexterm" href="arrayoperators.html">Array Operations in SystemTap</a></dt><dt>clearing arrays/array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dd><dl><dt>delete operator, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>multiple array operations within the same probe, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>virtual file system reads (non-cumulative), tallying, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd><dt>computing for statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dd><dl><dt>@avg (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@count (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@max (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@min (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@sum (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>adding values to statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>count (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>extracting data collected by statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>conditional statements, using arrays in, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt><dd><dl><dt>testing for array membership, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd><dt>deleting arrays and array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>incrementing associated values, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt><dd><dl><dt>tallying virtual file system reads (VFS reads), <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd><dt>multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>processing multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dd><dl><dt>cumulative virtual file system reads, tallying, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>iterations, processing elements in an array as, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>limiting the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>ordering the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>reading values from arrays, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dd><dl><dt>computing for timestamp deltas, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>empty unique keys, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>using arrays in simple computations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dd><dl><dt>(see also associative arrays)</dt></dl></dd><dt>assigning associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt><dd><dl><dt>associating timestamps to process names, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>associating timestamps to process names</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd></dl></dd><dt>associated values</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>associating timestamps to process names</dt><dd><dl><dt>assigning associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd></dl></dd><dt>associative arrays</dt><dd><dl><dt>introduction, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dd><dl><dt>associated values, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>example, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>index expression, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>key pairs, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>syntax, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>unique keys, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>asynchronous events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>B</h3><dl><dt>begin</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>building instrumentation modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>building kernel modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></div><div class="indexdiv"><h3>C</h3><dl><dt>call graph tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>capabilities of SystemTap</dt><dd><dl><dt>Introduction, <a class="indexterm" href="intro-systemtap-vs-others.html">SystemTap Capabilities</a></dt></dl></dd><dt>changes to file attributes, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt></dl></dd><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dd><dl><dt>delete operator, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>multiple array operations within the same probe, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>virtual file system reads (non-cumulative), tallying, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd><dt>command-line arguments</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt></dl></dd></dl></dd><dt>compiling instrumentation/kernel modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>components</dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dd><dl><dt>@avg (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@count (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@max (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@min (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@sum (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>adding values to statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>count (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>extracting data collected by statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>computing for timestamp deltas</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>conditional operators</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>conditional statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt><dd><dl><dt>testing for array membership, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd></dl></dd><dt>CONFIG_HZ, computing for, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt><dt>contended user-space locks (futex contentions), identifying</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>copy fault</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>count operator</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>counting function calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>CPU ticks</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>cpu()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>cross-compiling, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>cross-instrumentation</dt><dd><dl><dt>advantages of, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>building kernel modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>configuration</dt><dd><dl><dt>host system and target system, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>generating instrumentation from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>host system, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>instrumentation module, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>target kernel, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>target system, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>ctime()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>ctime(), example of usage</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>cumulative I/O, tracking</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>cumulative virtual file system reads, tallying</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>D</h3><dl><dt>delete operator</dt><dd><dl><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd><dt>determining architecture notation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>determining the kernel version, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>determining time spent in kernel and user space</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>device I/O, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>device number of a file (integer format)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>disk I/O traffic, summarizing</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>division by 0</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>documentation goals</dt><dd><dl><dt>Introduction, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>E</h3><dl><dt>embedded code in unprivileged script</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>empty unique keys</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>end</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>errors</dt><dd><dl><dt>parse/semantics error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dd><dl><dt>embedded code in unprivileged script, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>expected symbol/array index expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>grammatical/typographical script error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>guru mode, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>invalid values to variables/arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>libdwfl failure, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>no match for probe point, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>non-global arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>probe mismatch, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>type mismatch for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved function call, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved target-symbol expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved type for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>variable modified during 'foreach', <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd><dt>runtime errors/warnings, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dd><dl><dt>aggregate element not found, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>aggregation overflow, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>copy fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>division by 0, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXACTION exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXNESTING exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>number of errors: N, skipped probes: M, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>pointer dereference fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>event types</dt><dd><dl><dt>Understanding How SystemTap Works, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt></dl></dd><dt>Events</dt><dd><dl><dt>asynchronous events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>begin, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>end, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>examples of synchronous and asynchronous events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>introduction, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>kernel.function("function"), <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>kernel.trace("tracepoint"), <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>module("module"), <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>synchronous events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>syscall.system_call, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>timer events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>user-space, <a class="indexterm" href="userspace-probing.html#uevents">User-Space Events</a></dt><dt>vfs.file_operation, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>wildcards, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>events and handlers, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dt>events wildcards, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>example</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>example of multiple command-line arguments</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>examples of synchronous and asynchronous events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt><dd><dl><dt>call graph tracing, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>CPU ticks, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>ctime(), example of usage, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>determining time spent in kernel and user space, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>futex (lock) contentions, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>futex system call, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>identifying contended user-space locks (futex contentions), <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>if/else conditionals, alternative syntax, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a></dt><dt>inode number, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring changes to file attributes, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt><dt>monitoring device I/O, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>monitoring I/O block time, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt><dt>monitoring I/O time, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>monitoring incoming TCP connections, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt><dt>monitoring polling applications, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt><dt>monitoring reads and writes to a file, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring system calls, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>monitoring system calls (volume per process), <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt><dt>monitoring TCP packets, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt><dt>multiple command-line arguments, example of, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>net/socket.c, tracing functions from, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>network profiling, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt><dt>stat -c, determining file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>stat -c, determining whole device number, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>summarizing disk I/O traffic, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>tallying function calls, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>thread_indent(), sample usage, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>timer.ms(), sample usage, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>timer.s(), sample usage, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a>, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>tracing functions called in network socket code, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>tracking cumulative I/O, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt><dt>trigger function, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>usrdev2kerndev(), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>whole device number (usage as a command-line argument), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>exceeded MAXACTION</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>exceeded MAXNESTING</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>exit()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>expected symbol/array index expression</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>extracting data collected by statistical aggregates</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>F</h3><dl><dt>feedback</dt><dd><dl><dt>contact information for this manual, <a class="indexterm" href="pr01s02.html">We Need Feedback!</a></dt></dl></dd><dt>file attributes, monitoring changes to</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt></dl></dd><dt>file device number (integer format)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>file reads/writes, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>flight recorder mode, <a class="indexterm" href="using-usage.html#flight-recorder">SystemTap Flight Recorder Mode</a></dt><dd><dl><dt>file mode, <a class="indexterm" href="using-usage.html#file-flight-recorder">File Flight Recorder</a></dt><dt>in-memory mode, <a class="indexterm" href="using-usage.html#memory-flight-recorder">In-memory Flight Recorder</a></dt></dl></dd><dt>for loops</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>foreach</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>format</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>format and syntax</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>format specifiers</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>format strings</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>function call (unresolved)</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>function calls (incoming/outgoing), tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>function calls, tallying</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dd><dl><dt>cpu(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>ctime(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>gettimeofday_s(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>pp(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd><dt>target(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>thread_indent(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>tid(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>uid(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>functions (used in handlers)</dt><dd><dl><dt>exit(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>functions called in network socket code, tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>futex (lock) contentions</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>futex contention, definition</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>futex contentions, identifying</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>futex system call</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>G</h3><dl><dt>gettimeofday_s()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>global</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd></dl></dd><dt>goals, documentation</dt><dd><dl><dt>Introduction, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt></dl></dd><dt>grammatical/typographical script error</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>guru mode</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>H</h3><dl><dt>handler functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>handlers</dt><dd><dl><dt>conditional statements, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dd><dl><dt>conditional operators, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>for loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>if/else, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>while loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd><dt>introduction, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap handler constructs, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt><dd><dl><dt>command-line arguments, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>global, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt><dt>syntax and format, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt><dt>variable notations, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>variables, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd><dt>target variables, <a class="indexterm" href="targetvariables.html">Target Variables</a></dt></dl></dd><dt>handlers and events, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>heaviest disk reads/writes, identifying</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>host system</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>host system and target system</dt><dd><dl><dt>cross-instrumentation</dt><dd><dl><dt>configuration, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>I</h3><dl><dt>I/O block time, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt></dl></dd><dt>I/O monitoring (by device)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>I/O time, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd><dt>I/O traffic, summarizing</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>identifier type mismatch</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>identifying contended user-space locks (futex contentions)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>identifying heaviest disk reads/writes</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>if/else</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>if/else conditionals, alternative syntax</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a></dt></dl></dd><dt>if/else statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd><dt>incoming TCP connections, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt></dl></dd><dt>incoming/outgoing function calls, tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>incrementing associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt><dd><dl><dt>tallying virtual file system reads (VFS reads), <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd></dl></dd><dt>index expression</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>initial testing, <a class="indexterm" href="using-systemtap.html#testing">Initial Testing</a></dt><dt>inode number</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>Installation</dt><dd><dl><dt>initial testing, <a class="indexterm" href="using-systemtap.html#testing">Initial Testing</a></dt><dt>kernel information packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>kernel version, determining the, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>required packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>Setup and Installation, <a class="indexterm" href="using-systemtap.html#using-setup">Installation and Setup</a></dt><dt>systemtap package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt><dt>systemtap-runtime package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt></dl></dd><dt>instrumentation module</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>instrumentation modules from SystemTap scripts, building, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>integer extractors</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>Introduction</dt><dd><dl><dt>capabilities of SystemTap, <a class="indexterm" href="intro-systemtap-vs-others.html">SystemTap Capabilities</a></dt><dt>documentation goals, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt><dt>goals, documentation, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt><dt>limitations of SystemTap, <a class="indexterm" href="intro-systemtap-limitations.html">Limitations of SystemTap</a></dt><dt>performance monitoring, <a class="indexterm" href="introduction.html">Introduction</a></dt></dl></dd><dt>invalid division</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>invalid values to variables/arrays</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>iterations, processing elements in an array as</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>K</h3><dl><dt>kernel and user space, determining time spent in</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>kernel information packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>kernel modules from SystemTap scripts, building, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>kernel version, determining the, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>kernel.function("function")</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>kernel.trace("tracepoint")</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>key pairs</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>L</h3><dl><dt>libdwfl failure</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>limitations of SystemTap</dt><dd><dl><dt>Introduction, <a class="indexterm" href="intro-systemtap-limitations.html">Limitations of SystemTap</a></dt></dl></dd><dt>limiting the output of foreach</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>local variables</dt><dd><dl><dt>name, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>sample usage</dt><dd><dl><dt>$count, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>$return, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a>, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>M</h3><dl><dt>MAXACTION exceeded</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>MAXNESTING exceeded</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>membership (in array), testing for</dt><dd><dl><dt>conditional statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd></dl></dd><dt>module("module")</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>monitoring changes to file attributes</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt></dl></dd><dt>monitoring cumulative I/O</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>monitoring device I/O</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>monitoring I/O block time</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt></dl></dd><dt>monitoring I/O time</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd><dt>monitoring incoming TCP connections</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt></dl></dd><dt>monitoring polling applications</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt></dl></dd><dt>monitoring reads and writes to a file</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>monitoring system calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt></dl></dd><dt>monitoring system calls (volume per process)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt></dl></dd><dt>monitoring TCP packets</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt></dl></dd><dt>multiple array operations within the same probe</dt><dd><dl><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd><dt>multiple command-line arguments, example of</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>N</h3><dl><dt>name</dt><dd><dl><dt>local variables, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>net/socket.c, tracing functions from</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>network profiling</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt></dl></dd><dt>network socket code, tracing functions called in</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>network traffic, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt></dl></dd><dt>no match for probe point</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>non-global arrays</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>number of errors: N, skipped probes: M</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>O</h3><dl><dt>operations</dt><dd><dl><dt>assigning associated values</dt><dd><dl><dt>associating timestamps to process names, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>associative arrays, <a class="indexterm" href="arrayoperators.html">Array Operations in SystemTap</a></dt><dt>clearing arrays/array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dd><dl><dt>delete operator, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>multiple array operations within the same probe, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>virtual file system reads (non-cumulative), tallying, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd><dt>computing for statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dd><dl><dt>@avg (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@count (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@max (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@min (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@sum (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>adding values to statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>count (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>extracting data collected by statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>conditional statements, using arrays in, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt><dd><dl><dt>testing for array membership, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd><dt>deleting arrays and array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>incrementing associated values, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt><dd><dl><dt>tallying virtual file system reads (VFS reads), <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd><dt>multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>processing multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dd><dl><dt>cumulative virtual file system reads, tallying, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>iterations, processing elements in an array as, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>limiting the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>ordering the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>reading values from arrays, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dd><dl><dt>computing for timestamp deltas, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>empty unique keys, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>using arrays in simple computations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>options, stap</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>ordering the output of foreach</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>overflow of aggregation</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>P</h3><dl><dt>packages required to run SystemTap, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dd><dl><dt>embedded code in unprivileged script, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>expected symbol/array index expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>grammatical/typographical script error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>guru mode, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>invalid values to variables/arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>libdwfl failure, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>no match for probe point, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>non-global arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>probe mismatch, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>type mismatch for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved function call, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved target-symbol expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved type for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>variable modified during 'foreach', <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>performance monitoring</dt><dd><dl><dt>Introduction, <a class="indexterm" href="introduction.html">Introduction</a></dt></dl></dd><dt>pointer dereference fault</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>polling applications, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt></dl></dd><dt>pp()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>printf()</dt><dd><dl><dt>format specifiers, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>format strings, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>syntax and format, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>printing I/O activity (cumulative)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>printing I/O block time (periodically)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt></dl></dd><dt>probe mismatch</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>probe point (no match for)</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>probes</dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>cumulative virtual file system reads, tallying</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>foreach</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>limiting the output of foreach</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>ordering the output of foreach</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>profiling the network</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>R</h3><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dd><dl><dt>empty unique keys, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>using arrays in simple computations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd><dt>computing for timestamp deltas</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>reads/writes to a file, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>required packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>RPMs required to run SystemTap, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>running scripts from standard input, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>running SystemTap scripts</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dd><dl><dt>aggregate element not found, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>aggregation overflow, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>copy fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>division by 0, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXACTION exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXNESTING exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>number of errors: N, skipped probes: M, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>pointer dereference fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>S</h3><dl><dt>script examples</dt><dd><dl><dt>call graph tracing, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>CPU ticks, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>ctime(), example of usage, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>determining time spent in kernel and user space, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>futex (lock) contentions, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>futex system call, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>identifying contended user-space locks (futex contentions), <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>if/else conditionals, alternative syntax, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a></dt><dt>inode number, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring changes to file attributes, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt><dt>monitoring device I/O, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>monitoring I/O block time, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt><dt>monitoring I/O time, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>monitoring incoming TCP connections, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt><dt>monitoring polling applications, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt><dt>monitoring reads and writes to a file, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring system calls, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>monitoring system calls (volume per process), <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt><dt>monitoring TCP packets, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt><dt>multiple command-line arguments, example of, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>net/socket.c, tracing functions from, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>network profiling, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt><dt>stat -c, determining file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>stat -c, determining whole device number, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>summarizing disk I/O traffic, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>tallying function calls, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>thread_indent(), sample usage, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>timer.ms(), sample usage, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>timer.s(), sample usage, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a>, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>tracing functions called in network socket code, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>tracking cumulative I/O, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt><dt>trigger function, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>usrdev2kerndev(), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>whole device number (usage as a command-line argument), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dd><dl><dt>components, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>events and handlers, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>format and syntax, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>functions, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>probes, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>statement blocks, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>sessions, SystemTap, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>Setup and Installation, <a class="indexterm" href="using-systemtap.html#using-setup">Installation and Setup</a></dt><dt>Stack backtrace</dt><dd><dl><dt>user-space, <a class="indexterm" href="ustack.html">User-Space Stack Backtraces</a></dt></dl></dd><dt>standard input, running scripts from</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stap</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stap options, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stapdev</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>staprun</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stapusr</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stat -c, determining file device number (integer format)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>stat -c, determining whole device number</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>statement blocks</dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>summarizing disk I/O traffic</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>synchronous events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>syntax</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>syntax and format</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt></dl></dd><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>syscall.system_call</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>system calls volume (per process), monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt></dl></dd><dt>system calls, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt></dl></dd><dt>SystemTap architecture, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>SystemTap handlers</dt><dd><dl><dt>SystemTap handler constructs, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt><dd><dl><dt>syntax and format, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt></dl></dd></dl></dd><dt>systemtap package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt><dt>SystemTap script functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dd><dl><dt>components, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>events and handlers, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>format and syntax, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>functions, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>probes, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>statement blocks, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd><dt>useful examples, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt></dl></dd><dt>SystemTap scripts, how to run, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>SystemTap sessions, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>SystemTap statements</dt><dd><dl><dt>conditional statements, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dd><dl><dt>conditional operators, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>for loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>if/else, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>while loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd><dt>SystemTap handler constructs</dt><dd><dl><dt>command-line arguments, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>global, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt><dt>variable notations, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>variables, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd></dl></dd><dt>systemtap-runtime package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt><dt>systemtap-testsuite package</dt><dd><dl><dt>sample scripts, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>T</h3><dl><dt>tallying function calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>tallying virtual file system reads (VFS reads)</dt><dd><dl><dt>incrementing associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd></dl></dd><dt>Tapsets</dt><dd><dl><dt>definition of, <a class="indexterm" href="understanding-tapsets.html">Tapsets</a></dt></dl></dd><dt>target kernel</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>target system</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>target system and host system</dt><dd><dl><dt>configuration, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>target variables, <a class="indexterm" href="targetvariables.html">Target Variables</a></dt><dd><dl><dt>pretty printing, <a class="indexterm" href="targetvariables.html#targetprettyprinting">Pretty Printing Target Variables</a></dt><dt>typecasting, <a class="indexterm" href="typecasting.html">Typecasting</a></dt><dt>user-space, <a class="indexterm" href="utargetvariable.html">Accessing User-Space Target Variables</a></dt><dt>variable availability, <a class="indexterm" href="targetavailable.html">Checking Target Variable Availability</a></dt></dl></dd><dt>target()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>target-symbol expression, unresolved</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>TCP connections (incoming), monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt></dl></dd><dt>TCP packets, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt></dl></dd><dt>testing for array membership</dt><dd><dl><dt>conditional statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd></dl></dd><dt>testing, initial, <a class="indexterm" href="using-systemtap.html#testing">Initial Testing</a></dt><dt>thread_indent()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>thread_indent(), sample usage</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>tid()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>time of I/O </dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd><dt>time spent in kernel/user space, determining</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>timer events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>timer.ms(), sample usage</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>timer.s(), sample usage</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a>, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt></dl></dd><dt>timestamp deltas, computing for</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>timestamps, association thereof to process names</dt><dd><dl><dt>assigning associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd></dl></dd><dt>tracepoint, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt><dt>tracing call graph</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>tracing functions called in network socket code</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>tracing incoming/outgoing function calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>tracking cumulative I/O</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>trigger function</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>type mismatch for identifier</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>typographical script error</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>U</h3><dl><dt>uid()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>uname -m, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>uname -r, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>understainding SystemTap errors</dt><dd><dl><dt>runtime errors/warnings, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dd><dl><dt>aggregate element not found, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>aggregation overflow, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>copy fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>division by 0, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXACTION exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXNESTING exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>number of errors: N, skipped probes: M, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>pointer dereference fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>Understanding How SystemTap Works, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dd><dl><dt>architecture, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>event types, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dt>events and handlers, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dt>SystemTap sessions, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt></dl></dd><dt>understanding SystemTap errors</dt><dd><dl><dt>parse/semantics error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dd><dl><dt>embedded code in unprivileged script, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>expected symbol/array index expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>grammatical/typographical script error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>guru mode, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>invalid values to variables/arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>libdwfl failure, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>no match for probe point, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>non-global arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>probe mismatch, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>type mismatch for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved function call, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved target-symbol expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved type for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>variable modified during 'foreach', <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unique keys</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>unprivileged script, embedded code in</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unresolved function call</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unresolved target-symbol expression</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unresolved type for identifier</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unsafe embedded code in unprivileged script</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>Usage</dt><dd><dl><dt>options, stap, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>running SystemTap scripts, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>standard input, running scripts from, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stap, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stapdev, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>staprun, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stapusr, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>useful examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt><dt>user and kernel space, determining time spent in</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>using arrays in simple computations</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>Using SystemTap, <a class="indexterm" href="using-systemtap.html">Using SystemTap</a></dt><dt>usrdev2kerndev()</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>V</h3><dl><dt>values, assignment of</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>variable modified during 'foreach'</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>variable notations</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt></dl></dd></dl></dd><dt>variables</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd></dl></dd><dt>variables (local)</dt><dd><dl><dt>name, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>sample usage</dt><dd><dl><dt>$count, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>$return, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a>, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd></dl></dd><dt>VFS reads, tallying of</dt><dd><dl><dt>incrementing associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd></dl></dd><dt>vfs.file_operation</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>virtual file system reads (cumulative), tallying</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>virtual file system reads (non-cumulative), tallying</dt><dd><dl><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>W</h3><dl><dt>while loops</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>whole device number (usage as a command-line argument)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>wildcards in events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>writes/reads to a file, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd></dl></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="appe-Publican-Revision_History.html"><strong>Prev</strong>Appendix A. Revision History</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li></ul></body></html> \ No newline at end of file | 3 | </a>Index</h1></div></div></div><div class="index"><div class="indexdiv"><h3>Symbols</h3><dl><dt>$count</dt><dd><dl><dt>sample usage</dt><dd><dl><dt>local variables, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd></dl></dd><dt>$return</dt><dd><dl><dt>sample usage</dt><dd><dl><dt>local variables, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a>, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd></dl></dd><dt>@avg (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@count (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@max (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@min (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>@sum (integer extractor)</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>A</h3><dl><dt>adding values to statistical aggregates</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>advantages of cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>aggregate element not found</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>aggregates (statistical)</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>aggregation overflow</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>algebraic formulas using arrays</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>architecture notation, determining, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>architecture of SystemTap, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>array locals not supported</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>array operations</dt><dd><dl><dt>assigning associated values, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt><dd><dl><dt>associating timestamps to process names, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>associative arrays, <a class="indexterm" href="arrayoperators.html">Array Operations in SystemTap</a></dt><dt>clearing arrays/array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dd><dl><dt>delete operator, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>multiple array operations within the same probe, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>virtual file system reads (non-cumulative), tallying, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd><dt>computing for statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dd><dl><dt>@avg (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@count (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@max (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@min (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@sum (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>adding values to statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>count (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>extracting data collected by statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>conditional statements, using arrays in, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt><dd><dl><dt>testing for array membership, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd><dt>deleting arrays and array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>incrementing associated values, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt><dd><dl><dt>tallying virtual file system reads (VFS reads), <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd><dt>multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>processing multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dd><dl><dt>cumulative virtual file system reads, tallying, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>iterations, processing elements in an array as, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>limiting the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>ordering the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>reading values from arrays, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dd><dl><dt>computing for timestamp deltas, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>empty unique keys, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>using arrays in simple computations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dd><dl><dt>(see also associative arrays)</dt></dl></dd><dt>assigning associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt><dd><dl><dt>associating timestamps to process names, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>associating timestamps to process names</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd></dl></dd><dt>associated values</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>associating timestamps to process names</dt><dd><dl><dt>assigning associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd></dl></dd><dt>associative arrays</dt><dd><dl><dt>introduction, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dd><dl><dt>associated values, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>example, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>index expression, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>key pairs, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>syntax, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt><dt>unique keys, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>asynchronous events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>B</h3><dl><dt>begin</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>building instrumentation modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>building kernel modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></div><div class="indexdiv"><h3>C</h3><dl><dt>call graph tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>capabilities of SystemTap</dt><dd><dl><dt>Introduction, <a class="indexterm" href="intro-systemtap-vs-others.html">SystemTap Capabilities</a></dt></dl></dd><dt>changes to file attributes, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt></dl></dd><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dd><dl><dt>delete operator, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>multiple array operations within the same probe, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>virtual file system reads (non-cumulative), tallying, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd><dt>command-line arguments</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt></dl></dd></dl></dd><dt>compiling instrumentation/kernel modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>components</dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dd><dl><dt>@avg (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@count (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@max (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@min (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@sum (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>adding values to statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>count (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>extracting data collected by statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>computing for timestamp deltas</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>conditional operators</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>conditional statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt><dd><dl><dt>testing for array membership, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd></dl></dd><dt>CONFIG_HZ, computing for, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt><dt>contended user-space locks (futex contentions), identifying</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>copy fault</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>count operator</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>counting function calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>CPU ticks</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>cpu()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>cross-compiling, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>cross-instrumentation</dt><dd><dl><dt>advantages of, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>building kernel modules from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>configuration</dt><dd><dl><dt>host system and target system, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>generating instrumentation from SystemTap scripts, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>host system, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>instrumentation module, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>target kernel, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>target system, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>ctime()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>ctime(), example of usage</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>cumulative I/O, tracking</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>cumulative virtual file system reads, tallying</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>D</h3><dl><dt>delete operator</dt><dd><dl><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd><dt>determining architecture notation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>determining the kernel version, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>determining time spent in kernel and user space</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>device I/O, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>device number of a file (integer format)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>disk I/O traffic, summarizing</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>division by 0</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>documentation goals</dt><dd><dl><dt>Introduction, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>E</h3><dl><dt>embedded code in unprivileged script</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>empty unique keys</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>end</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>errors</dt><dd><dl><dt>parse/semantics error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dd><dl><dt>embedded code in unprivileged script, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>expected symbol/array index expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>grammatical/typographical script error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>guru mode, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>invalid values to variables/arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>libdwfl failure, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>no match for probe point, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>non-global arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>probe mismatch, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>type mismatch for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved function call, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved target-symbol expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved type for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>variable modified during 'foreach', <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd><dt>runtime errors/warnings, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dd><dl><dt>aggregate element not found, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>aggregation overflow, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>copy fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>division by 0, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXACTION exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXNESTING exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>number of errors: N, skipped probes: M, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>pointer dereference fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>event types</dt><dd><dl><dt>Understanding How SystemTap Works, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt></dl></dd><dt>Events</dt><dd><dl><dt>asynchronous events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>begin, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>end, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>examples of synchronous and asynchronous events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>introduction, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>kernel.function("function"), <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>kernel.trace("tracepoint"), <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>module("module"), <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>synchronous events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>syscall.system_call, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>timer events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>user-space, <a class="indexterm" href="userspace-probing.html#uevents">User-Space Events</a></dt><dt>vfs.file_operation, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>wildcards, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>events and handlers, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dt>events wildcards, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>example</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>example of multiple command-line arguments</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>examples of synchronous and asynchronous events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt><dd><dl><dt>call graph tracing, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>CPU ticks, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>ctime(), example of usage, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>determining time spent in kernel and user space, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>futex (lock) contentions, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>futex system call, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>identifying contended user-space locks (futex contentions), <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>if/else conditionals, alternative syntax, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a></dt><dt>inode number, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring changes to file attributes, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt><dt>monitoring device I/O, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>monitoring I/O block time, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt><dt>monitoring I/O time, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>monitoring incoming TCP connections, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt><dt>monitoring polling applications, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt><dt>monitoring reads and writes to a file, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring system calls, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>monitoring system calls (volume per process), <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt><dt>monitoring TCP packets, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt><dt>multiple command-line arguments, example of, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>net/socket.c, tracing functions from, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>network profiling, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt><dt>stat -c, determining file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>stat -c, determining whole device number, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>summarizing disk I/O traffic, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>tallying function calls, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>thread_indent(), sample usage, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>timer.ms(), sample usage, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>timer.s(), sample usage, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a>, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>tracing functions called in network socket code, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>tracking cumulative I/O, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt><dt>trigger function, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>usrdev2kerndev(), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>whole device number (usage as a command-line argument), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>exceeded MAXACTION</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>exceeded MAXNESTING</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>exit()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>expected symbol/array index expression</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>extracting data collected by statistical aggregates</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>F</h3><dl><dt>feedback</dt><dd><dl><dt>contact information for this manual, <a class="indexterm" href="pr01s02.html">We Need Feedback!</a></dt></dl></dd><dt>file attributes, monitoring changes to</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt></dl></dd><dt>file device number (integer format)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>file reads/writes, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>flight recorder mode, <a class="indexterm" href="using-usage.html#flight-recorder">SystemTap Flight Recorder Mode</a></dt><dd><dl><dt>file mode, <a class="indexterm" href="using-usage.html#file-flight-recorder">File Flight Recorder</a></dt><dt>in-memory mode, <a class="indexterm" href="using-usage.html#memory-flight-recorder">In-memory Flight Recorder</a></dt></dl></dd><dt>for loops</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>foreach</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>format</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>format and syntax</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>format specifiers</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>format strings</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>function call (unresolved)</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>function calls (incoming/outgoing), tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>function calls, tallying</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dd><dl><dt>cpu(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>ctime(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>gettimeofday_s(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>pp(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd><dt>target(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>thread_indent(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>tid(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>uid(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>functions (used in handlers)</dt><dd><dl><dt>exit(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>functions called in network socket code, tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>futex (lock) contentions</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>futex contention, definition</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>futex contentions, identifying</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>futex system call</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>G</h3><dl><dt>gettimeofday_s()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>global</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd></dl></dd><dt>goals, documentation</dt><dd><dl><dt>Introduction, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt></dl></dd><dt>grammatical/typographical script error</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>guru mode</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>H</h3><dl><dt>handler functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>handlers</dt><dd><dl><dt>conditional statements, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dd><dl><dt>conditional operators, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>for loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>if/else, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>while loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd><dt>introduction, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap handler constructs, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt><dd><dl><dt>command-line arguments, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>global, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt><dt>syntax and format, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt><dt>variable notations, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>variables, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd><dt>target variables, <a class="indexterm" href="targetvariables.html">Target Variables</a></dt></dl></dd><dt>handlers and events, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>heaviest disk reads/writes, identifying</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>host system</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>host system and target system</dt><dd><dl><dt>cross-instrumentation</dt><dd><dl><dt>configuration, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>I</h3><dl><dt>I/O block time, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt></dl></dd><dt>I/O monitoring (by device)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>I/O time, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd><dt>I/O traffic, summarizing</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>identifier type mismatch</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>identifying contended user-space locks (futex contentions)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt></dl></dd><dt>identifying heaviest disk reads/writes</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>if/else</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>if/else conditionals, alternative syntax</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a></dt></dl></dd><dt>if/else statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd><dt>incoming TCP connections, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt></dl></dd><dt>incoming/outgoing function calls, tracing</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>incrementing associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt><dd><dl><dt>tallying virtual file system reads (VFS reads), <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd></dl></dd><dt>index expression</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>initial testing, <a class="indexterm" href="using-systemtap.html#testing">Initial Testing</a></dt><dt>inode number</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>Installation</dt><dd><dl><dt>initial testing, <a class="indexterm" href="using-systemtap.html#testing">Initial Testing</a></dt><dt>kernel information packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>kernel version, determining the, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>required packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>Setup and Installation, <a class="indexterm" href="using-systemtap.html#using-setup">Installation and Setup</a></dt><dt>systemtap package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt><dt>systemtap-runtime package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt></dl></dd><dt>instrumentation module</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>instrumentation modules from SystemTap scripts, building, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>integer extractors</dt><dd><dl><dt>computing for statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd></dl></dd><dt>Introduction</dt><dd><dl><dt>capabilities of SystemTap, <a class="indexterm" href="intro-systemtap-vs-others.html">SystemTap Capabilities</a></dt><dt>documentation goals, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt><dt>goals, documentation, <a class="indexterm" href="introduction.html#goals">Documentation Goals</a></dt><dt>limitations of SystemTap, <a class="indexterm" href="intro-systemtap-limitations.html">Limitations of SystemTap</a></dt><dt>performance monitoring, <a class="indexterm" href="introduction.html">Introduction</a></dt></dl></dd><dt>invalid division</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>invalid values to variables/arrays</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>iterations, processing elements in an array as</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>K</h3><dl><dt>kernel and user space, determining time spent in</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>kernel information packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>kernel modules from SystemTap scripts, building, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>kernel version, determining the, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>kernel.function("function")</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>kernel.trace("tracepoint")</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>key pairs</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>L</h3><dl><dt>libdwfl failure</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>limitations of SystemTap</dt><dd><dl><dt>Introduction, <a class="indexterm" href="intro-systemtap-limitations.html">Limitations of SystemTap</a></dt></dl></dd><dt>limiting the output of foreach</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>local variables</dt><dd><dl><dt>name, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>sample usage</dt><dd><dl><dt>$count, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>$return, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a>, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>M</h3><dl><dt>MAXACTION exceeded</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>MAXNESTING exceeded</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>membership (in array), testing for</dt><dd><dl><dt>conditional statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd></dl></dd><dt>module("module")</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>monitoring changes to file attributes</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt></dl></dd><dt>monitoring cumulative I/O</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>monitoring device I/O</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>monitoring I/O block time</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt></dl></dd><dt>monitoring I/O time</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd><dt>monitoring incoming TCP connections</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt></dl></dd><dt>monitoring polling applications</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt></dl></dd><dt>monitoring reads and writes to a file</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>monitoring system calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt></dl></dd><dt>monitoring system calls (volume per process)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt></dl></dd><dt>monitoring TCP packets</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt></dl></dd><dt>multiple array operations within the same probe</dt><dd><dl><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd><dt>multiple command-line arguments, example of</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>N</h3><dl><dt>name</dt><dd><dl><dt>local variables, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>net/socket.c, tracing functions from</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>network profiling</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt></dl></dd><dt>network socket code, tracing functions called in</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>network traffic, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt></dl></dd><dt>no match for probe point</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>non-global arrays</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>number of errors: N, skipped probes: M</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>O</h3><dl><dt>operations</dt><dd><dl><dt>assigning associated values</dt><dd><dl><dt>associating timestamps to process names, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>associative arrays, <a class="indexterm" href="arrayoperators.html">Array Operations in SystemTap</a></dt><dt>clearing arrays/array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dd><dl><dt>delete operator, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>multiple array operations within the same probe, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>virtual file system reads (non-cumulative), tallying, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd><dt>computing for statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dd><dl><dt>@avg (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@count (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@max (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@min (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>@sum (integer extractor), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>adding values to statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>count (operator), <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt><dt>extracting data collected by statistical aggregates, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>conditional statements, using arrays in, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt><dd><dl><dt>testing for array membership, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd><dt>deleting arrays and array elements, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt><dt>incrementing associated values, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt><dd><dl><dt>tallying virtual file system reads (VFS reads), <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd><dt>multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>processing multiple elements in an array, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dd><dl><dt>cumulative virtual file system reads, tallying, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>iterations, processing elements in an array as, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>limiting the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>ordering the output of foreach, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>reading values from arrays, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dd><dl><dt>computing for timestamp deltas, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>empty unique keys, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>using arrays in simple computations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>options, stap</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>ordering the output of foreach</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>overflow of aggregation</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>P</h3><dl><dt>packages required to run SystemTap, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dd><dl><dt>embedded code in unprivileged script, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>expected symbol/array index expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>grammatical/typographical script error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>guru mode, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>invalid values to variables/arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>libdwfl failure, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>no match for probe point, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>non-global arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>probe mismatch, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>type mismatch for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved function call, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved target-symbol expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved type for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>variable modified during 'foreach', <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>performance monitoring</dt><dd><dl><dt>Introduction, <a class="indexterm" href="introduction.html">Introduction</a></dt></dl></dd><dt>pointer dereference fault</dt><dd><dl><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>polling applications, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt></dl></dd><dt>pp()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>printf()</dt><dd><dl><dt>format specifiers, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>format strings, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>syntax and format, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>printing I/O activity (cumulative)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>printing I/O block time (periodically)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt></dl></dd><dt>probe mismatch</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>probe point (no match for)</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>probes</dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt><dt>cumulative virtual file system reads, tallying</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>foreach</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>limiting the output of foreach</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd><dt>ordering the output of foreach</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>profiling the network</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>R</h3><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dd><dl><dt>empty unique keys, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt><dt>using arrays in simple computations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd><dt>computing for timestamp deltas</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>reads/writes to a file, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>required packages, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>RPMs required to run SystemTap, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>running scripts from standard input, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>running SystemTap scripts</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>runtime errors/warnings</dt><dd><dl><dt>understainding SystemTap errors, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dd><dl><dt>aggregate element not found, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>aggregation overflow, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>copy fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>division by 0, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXACTION exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXNESTING exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>number of errors: N, skipped probes: M, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>pointer dereference fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>S</h3><dl><dt>script examples</dt><dd><dl><dt>call graph tracing, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>CPU ticks, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>ctime(), example of usage, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>determining time spent in kernel and user space, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt><dt>file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>futex (lock) contentions, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>futex system call, <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>identifying contended user-space locks (futex contentions), <a class="indexterm" href="futexcontentionsect.html">Identifying Contended User-Space Locks</a></dt><dt>if/else conditionals, alternative syntax, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a></dt><dt>inode number, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring changes to file attributes, <a class="indexterm" href="inodewatch2sect.html">Monitoring Changes to File Attributes</a></dt><dt>monitoring device I/O, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>monitoring I/O block time, <a class="indexterm" href="ioblktimesect.html">Periodically Print I/O Block Time</a></dt><dt>monitoring I/O time, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>monitoring incoming TCP connections, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt><dt>monitoring polling applications, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a></dt><dt>monitoring reads and writes to a file, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>monitoring system calls, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>monitoring system calls (volume per process), <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt><dt>monitoring TCP packets, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt><dt>multiple command-line arguments, example of, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>net/socket.c, tracing functions from, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>network profiling, <a class="indexterm" href="useful-systemtap-scripts.html#nettopsect">Network Profiling</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt><dt>stat -c, determining file device number (integer format), <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt><dt>stat -c, determining whole device number, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>summarizing disk I/O traffic, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt><dt>tallying function calls, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>thread_indent(), sample usage, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>timer.ms(), sample usage, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt><dt>timer.s(), sample usage, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a>, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt><dt>tracing functions called in network socket code, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt><dt>tracking cumulative I/O, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt><dt>trigger function, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt><dt>usrdev2kerndev(), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt><dt>whole device number (usage as a command-line argument), <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dd><dl><dt>components, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>events and handlers, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>format and syntax, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>functions, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>probes, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>statement blocks, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>sessions, SystemTap, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>Setup and Installation, <a class="indexterm" href="using-systemtap.html#using-setup">Installation and Setup</a></dt><dt>Stack backtrace</dt><dd><dl><dt>user-space, <a class="indexterm" href="ustack.html">User-Space Stack Backtraces</a></dt></dl></dd><dt>standard input, running scripts from</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stap</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stap options, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stapdev</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>staprun</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stapusr</dt><dd><dl><dt>Usage, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>stat -c, determining file device number (integer format)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd><dt>stat -c, determining whole device number</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>statement blocks</dt><dd><dl><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>statistical aggregates</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-aggregates.html">Computing for Statistical Aggregates</a></dt></dl></dd><dt>summarizing disk I/O traffic</dt><dd><dl><dt>script examples, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a></dt></dl></dd><dt>synchronous events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>syntax</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>syntax and format</dt><dd><dl><dt>printf(), <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt></dl></dd><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd></dl></dd><dt>syscall.system_call</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>system calls volume (per process), monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="syscallsbyprocpidsect.html">Tracking System Call Volume Per Process</a></dt></dl></dd><dt>system calls, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt></dl></dd><dt>SystemTap architecture, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>SystemTap handlers</dt><dd><dl><dt>SystemTap handler constructs, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt><dd><dl><dt>syntax and format, <a class="indexterm" href="scriptconstructions.html">Basic SystemTap Handler Constructs</a></dt></dl></dd></dl></dd><dt>systemtap package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt><dt>SystemTap script functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>SystemTap scripts</dt><dd><dl><dt>introduction, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dd><dl><dt>components, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>events and handlers, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>format and syntax, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>functions, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>probes, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt><dt>statement blocks, <a class="indexterm" href="scripts.html">SystemTap Scripts</a></dt></dl></dd><dt>useful examples, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt></dl></dd><dt>SystemTap scripts, how to run, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>SystemTap sessions, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>SystemTap statements</dt><dd><dl><dt>conditional statements, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dd><dl><dt>conditional operators, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>for loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>if/else, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt><dt>while loops, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd><dt>SystemTap handler constructs</dt><dd><dl><dt>command-line arguments, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>global, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt><dt>variable notations, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt><dt>variables, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd></dl></dd><dt>systemtap-runtime package, <a class="indexterm" href="using-systemtap.html#installproper">Installing SystemTap</a></dt><dt>systemtap-testsuite package</dt><dd><dl><dt>sample scripts, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>T</h3><dl><dt>tallying function calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>tallying virtual file system reads (VFS reads)</dt><dd><dl><dt>incrementing associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd></dl></dd><dt>Tapsets</dt><dd><dl><dt>definition of, <a class="indexterm" href="understanding-tapsets.html">Tapsets</a></dt></dl></dd><dt>target kernel</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>target system</dt><dd><dl><dt>cross-instrumentation, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>target system and host system</dt><dd><dl><dt>configuration, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt></dl></dd><dt>target variables, <a class="indexterm" href="targetvariables.html">Target Variables</a></dt><dd><dl><dt>pretty printing, <a class="indexterm" href="targetvariables.html#targetprettyprinting">Pretty Printing Target Variables</a></dt><dt>typecasting, <a class="indexterm" href="typecasting.html">Typecasting</a></dt><dt>user-space, <a class="indexterm" href="utargetvariable.html">Accessing User-Space Target Variables</a></dt><dt>variable availability, <a class="indexterm" href="targetavailable.html">Checking Target Variable Availability</a></dt></dl></dd><dt>target()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>target-symbol expression, unresolved</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>TCP connections (incoming), monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpconnectionssect">Monitoring Incoming TCP Connections</a></dt></dl></dd><dt>TCP packets, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#tcpdumplikesect">Monitoring TCP Packets</a></dt></dl></dd><dt>testing for array membership</dt><dd><dl><dt>conditional statements, using arrays in</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-conditionals.html">Using Arrays in Conditional Statements</a></dt></dl></dd></dl></dd><dt>testing, initial, <a class="indexterm" href="using-systemtap.html#testing">Initial Testing</a></dt><dt>thread_indent()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>thread_indent(), sample usage</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>tid()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>time of I/O </dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt></dl></dd><dt>time spent in kernel/user space, determining</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>timer events</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>timer.ms(), sample usage</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="mainsect-profiling.html#countcallssect">Counting Function Calls Made</a></dt></dl></dd><dt>timer.s(), sample usage</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="timeoutssect.html">Monitoring Polling Applications</a>, <a class="indexterm" href="topsyssect.html">Tracking Most Frequently Used System Calls</a></dt></dl></dd><dt>timestamp deltas, computing for</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>timestamps, association thereof to process names</dt><dd><dl><dt>assigning associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd></dl></dd><dt>tracepoint, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a>, <a class="indexterm" href="useful-systemtap-scripts.html#dropwatchsect">Monitoring Network Packets Drops in Kernel</a></dt><dt>tracing call graph</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>tracing functions called in network socket code</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html#sockettracesect">Tracing Functions Called in Network Socket Code</a></dt></dl></dd><dt>tracing incoming/outgoing function calls</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>tracking cumulative I/O</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd><dt>trigger function</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="paracallgraph.html">Call Graph Tracing</a></dt></dl></dd><dt>type mismatch for identifier</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>typographical script error</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>U</h3><dl><dt>uid()</dt><dd><dl><dt>functions, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt></dl></dd><dt>uname -m, <a class="indexterm" href="cross-compiling.html">Generating Instrumentation for Other Computers</a></dt><dt>uname -r, <a class="indexterm" href="using-systemtap.html#install-kinfo">Installing Required Kernel Information Packages Manually</a></dt><dt>understainding SystemTap errors</dt><dd><dl><dt>runtime errors/warnings, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dd><dl><dt>aggregate element not found, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>aggregation overflow, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>copy fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>division by 0, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXACTION exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>MAXNESTING exceeded, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>number of errors: N, skipped probes: M, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt><dt>pointer dereference fault, <a class="indexterm" href="runtimeerror.html">Runtime Errors and Warnings</a></dt></dl></dd></dl></dd><dt>Understanding How SystemTap Works, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dd><dl><dt>architecture, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt><dt>event types, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dt>events and handlers, <a class="indexterm" href="understanding-how-systemtap-works.html">Understanding How SystemTap Works</a></dt><dt>SystemTap sessions, <a class="indexterm" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Architecture</a></dt></dl></dd><dt>understanding SystemTap errors</dt><dd><dl><dt>parse/semantics error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dd><dl><dt>embedded code in unprivileged script, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>expected symbol/array index expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>grammatical/typographical script error, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>guru mode, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>invalid values to variables/arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>libdwfl failure, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>no match for probe point, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>non-global arrays, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>probe mismatch, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>type mismatch for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved function call, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved target-symbol expression, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>unresolved type for identifier, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt><dt>variable modified during 'foreach', <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unique keys</dt><dd><dl><dt>introduction</dt><dd><dl><dt>arrays, <a class="indexterm" href="associativearrays.html">Associative Arrays</a></dt></dl></dd></dl></dd><dt>unprivileged script, embedded code in</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unresolved function call</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unresolved target-symbol expression</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unresolved type for identifier</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>unsafe embedded code in unprivileged script</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>Usage</dt><dd><dl><dt>options, stap, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>running SystemTap scripts, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>standard input, running scripts from, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stap, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stapdev, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>staprun, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt><dt>stapusr, <a class="indexterm" href="using-usage.html">Running SystemTap Scripts</a></dt></dl></dd><dt>useful examples of SystemTap scripts, <a class="indexterm" href="useful-systemtap-scripts.html">Useful SystemTap Scripts</a></dt><dt>user and kernel space, determining time spent in</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="threadtimessect.html">Determining Time Spent in Kernel and User Space</a></dt></dl></dd><dt>using arrays in simple computations</dt><dd><dl><dt>reading values from arrays</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-readvalues.html">Reading Values From Arrays</a></dt></dl></dd></dl></dd><dt>Using SystemTap, <a class="indexterm" href="using-systemtap.html">Using SystemTap</a></dt><dt>usrdev2kerndev()</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd></dl></div><div class="indexdiv"><h3>V</h3><dl><dt>values, assignment of</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayoperators.html#arrayops-assignvalue">Assigning an Associated Value</a></dt></dl></dd><dt>variable modified during 'foreach'</dt><dd><dl><dt>parse/semantics error</dt><dd><dl><dt>understanding SystemTap errors, <a class="indexterm" href="errors.html#parsetype">Parse and Semantic Errors</a></dt></dl></dd></dl></dd><dt>variable notations</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="commandlineargssect.html">Command-Line Arguments</a></dt></dl></dd></dl></dd><dt>variables</dt><dd><dl><dt>SystemTap handler constructs</dt><dd><dl><dt>handlers, <a class="indexterm" href="scriptconstructions.html#variablesconstructs">Variables</a></dt></dl></dd></dl></dd><dt>variables (local)</dt><dd><dl><dt>name, <a class="indexterm" href="systemtapscript-handler.html">SystemTap Handler/Body</a></dt><dt>sample usage</dt><dd><dl><dt>$count, <a class="indexterm" href="iotimesect.html">Tracking I/O Time For Each File Read or Write</a></dt><dt>$return, <a class="indexterm" href="mainsect-disk.html#disktop">Summarizing Disk Read/Write Traffic</a>, <a class="indexterm" href="traceiosect.html">Track Cumulative IO</a></dt></dl></dd></dl></dd><dt>VFS reads, tallying of</dt><dd><dl><dt>incrementing associated values</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-increment.html">Incrementing Associated Values</a></dt></dl></dd></dl></dd><dt>vfs.file_operation</dt><dd><dl><dt>Events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt></dl></dd><dt>virtual file system reads (cumulative), tallying</dt><dd><dl><dt>processing multiple elements in an array</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-foreach.html">Processing Multiple Elements in an Array</a></dt></dl></dd></dl></dd><dt>virtual file system reads (non-cumulative), tallying</dt><dd><dl><dt>clearing arrays/array elements</dt><dd><dl><dt>array operations, <a class="indexterm" href="arrayops-deleting.html">Clearing/Deleting Arrays and Array Elements</a></dt></dl></dd></dl></dd></dl></div><div class="indexdiv"><h3>W</h3><dl><dt>while loops</dt><dd><dl><dt>conditional statements</dt><dd><dl><dt>handlers, <a class="indexterm" href="handlerconditionalstatements.html">Conditional Statements</a></dt></dl></dd></dl></dd><dt>whole device number (usage as a command-line argument)</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="traceio2sect.html">I/O Monitoring (By Device)</a></dt></dl></dd><dt>wildcards in events, <a class="indexterm" href="scripts.html#systemtapscript-events">Event</a></dt><dt>writes/reads to a file, monitoring</dt><dd><dl><dt>examples of SystemTap scripts, <a class="indexterm" href="inodewatchsect.html">Monitoring Reads and Writes to a File</a></dt></dl></dd></dl></div></div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="appe-Publican-Revision_History.html"><strong>Prev</strong>Appendix A. Revision History</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li></ul></body></html> \ No newline at end of file | 
| diff --git a/SystemTap_Beginners_Guide/mainsect-disk.html b/SystemTap_Beginners_Guide/mainsect-disk.html index 30d733b7..828f9de5 100644 --- a/SystemTap_Beginners_Guide/mainsect-disk.html +++ b/SystemTap_Beginners_Guide/mainsect-disk.html | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | </a>5.2. Disk</h2></div></div></div><div class="para"> | 3 | </a>5.2. Disk</h2></div></div></div><div class="para"> | 
| 4 | The following sections showcase scripts that monitor disk and I/O activity. | 4 | The following sections showcase scripts that monitor disk and I/O activity. | 
| 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="disktop"> | 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="disktop"> | 
| 6 | </a>5.2.1. Summarizing Disk Read/Write Traffic</h3></div></div></div><a id="idm47723009183904" class="indexterm"></a><a id="idm47722987699392" class="indexterm"></a><a id="idm47723001254112" class="indexterm"></a><a id="idm47722949642640" class="indexterm"></a><a id="idm47722952884064" class="indexterm"></a><a id="idm47723001312992" class="indexterm"></a><a id="idm47723001754416" class="indexterm"></a><a id="idm47723009137360" class="indexterm"></a><div class="para"> | 6 | </a>5.2.1. Summarizing Disk Read/Write Traffic</h3></div></div></div><a id="idm47650154486896" class="indexterm"></a><a id="idm47650169082832" class="indexterm"></a><a id="idm47650188694960" class="indexterm"></a><a id="idm47650190304528" class="indexterm"></a><a id="idm47650180912112" class="indexterm"></a><a id="idm47650196375904" class="indexterm"></a><a id="idm47650154527808" class="indexterm"></a><a id="idm47650191195344" class="indexterm"></a><div class="para"> | 
| 7 | This section describes how to identify which processes are performing the heaviest disk reads/writes to the system. | 7 | This section describes how to identify which processes are performing the heaviest disk reads/writes to the system. | 
| 8 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">disktop.stp</div> | 8 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">disktop.stp</div> | 
| 9 | 9 | ||
| @@ -95,9 +95,9 @@ probe end{ | |||
| 95 | <code class="computeroutput">T</code> — the type of action performed by the listed process; <code class="computeroutput">W</code> refers to write, while <code class="computeroutput">R</code> refers to read. | 95 | <code class="computeroutput">T</code> — the type of action performed by the listed process; <code class="computeroutput">W</code> refers to write, while <code class="computeroutput">R</code> refers to read. | 
| 96 | </div></li><li class="listitem"><div class="para"> | 96 | </div></li><li class="listitem"><div class="para"> | 
| 97 | <code class="computeroutput">BYTES</code> — the amount of data read to or written from disk. | 97 | <code class="computeroutput">BYTES</code> — the amount of data read to or written from disk. | 
| 98 | </div></li></ul></div><a id="idm47722950239424" class="indexterm"></a><a id="idm47722999783504" class="indexterm"></a><a id="idm47723005613872" class="indexterm"></a><div class="para"> | 98 | </div></li></ul></div><a id="idm47650189275648" class="indexterm"></a><a id="idm47650143835440" class="indexterm"></a><a id="idm47650193263408" class="indexterm"></a><div class="para"> | 
| 99 | The time and date in the output of <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> is returned by the functions <code class="command">ctime()</code> and <code class="command">gettimeofday_s()</code>. <code class="command">ctime()</code> derives calendar time in terms of seconds passed since the Unix epoch (January 1, 1970). <code class="command">gettimeofday_s()</code> counts the <span class="emphasis"><em>actual</em></span> number of seconds since Unix epoch, which gives a fairly accurate human-readable timestamp for the output. | 99 | The time and date in the output of <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> is returned by the functions <code class="command">ctime()</code> and <code class="command">gettimeofday_s()</code>. <code class="command">ctime()</code> derives calendar time in terms of seconds passed since the Unix epoch (January 1, 1970). <code class="command">gettimeofday_s()</code> counts the <span class="emphasis"><em>actual</em></span> number of seconds since Unix epoch, which gives a fairly accurate human-readable timestamp for the output. | 
| 100 | </div><a id="idm47722994136096" class="indexterm"></a><a id="idm47722949175088" class="indexterm"></a><a id="idm47722987896512" class="indexterm"></a><div class="para"> | 100 | </div><a id="idm47650190491168" class="indexterm"></a><a id="idm47650143595200" class="indexterm"></a><a id="idm47650182840592" class="indexterm"></a><div class="para"> | 
| 101 | In this script, the <code class="command">$return</code> is a local variable that stores the actual number of bytes each process reads or writes from the virtual file system. <code class="command">$return</code> can only be used in return probes (for example, <code class="command">vfs.read.return</code> and <code class="command">vfs.read.return</code>). | 101 | In this script, the <code class="command">$return</code> is a local variable that stores the actual number of bytes each process reads or writes from the virtual file system. <code class="command">$return</code> can only be used in return probes (for example, <code class="command">vfs.read.return</code> and <code class="command">vfs.read.return</code>). | 
| 102 | </div><div class="example"><a id="disktopoutput"> | 102 | </div><div class="example"><a id="disktopoutput"> | 
| 103 | </a><p class="title"><strong>Example 5.6. <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 103 | </a><p class="title"><strong>Example 5.6. <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 
| diff --git a/SystemTap_Beginners_Guide/mainsect-profiling.html b/SystemTap_Beginners_Guide/mainsect-profiling.html index 0a1fdc9f..24d42256 100644 --- a/SystemTap_Beginners_Guide/mainsect-profiling.html +++ b/SystemTap_Beginners_Guide/mainsect-profiling.html | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | </a>5.3. Profiling</h2></div></div></div><div class="para"> | 3 | </a>5.3. Profiling</h2></div></div></div><div class="para"> | 
| 4 | The following sections showcase scripts that profile kernel activity by monitoring function calls. | 4 | The following sections showcase scripts that profile kernel activity by monitoring function calls. | 
| 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="countcallssect"> | 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="countcallssect"> | 
| 6 | </a>5.3.1. Counting Function Calls Made</h3></div></div></div><a id="idm47722993321056" class="indexterm"></a><a id="idm47723003429200" class="indexterm"></a><a id="idm47723005488192" class="indexterm"></a><a id="idm47722987780784" class="indexterm"></a><a id="idm47722955093824" class="indexterm"></a><div class="para"> | 6 | </a>5.3.1. Counting Function Calls Made</h3></div></div></div><a id="idm47650169060768" class="indexterm"></a><a id="idm47650150666560" class="indexterm"></a><a id="idm47650150626336" class="indexterm"></a><a id="idm47650187295920" class="indexterm"></a><a id="idm47650188814000" class="indexterm"></a><div class="para"> | 
| 7 | This section describes how to identify how many times the system called a specific kernel function in a 30-second sample. Depending on the use of wildcards, you can also use this script to target multiple kernel functions. | 7 | This section describes how to identify how many times the system called a specific kernel function in a 30-second sample. Depending on the use of wildcards, you can also use this script to target multiple kernel functions. | 
| 8 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">functioncallcount.stp</div> | 8 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">functioncallcount.stp</div> | 
| 9 | 9 | ||
| @@ -28,7 +28,7 @@ probe end { | |||
| 28 | </pre> | 28 | </pre> | 
| 29 | </div><div class="para"> | 29 | </div><div class="para"> | 
| 30 | <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> takes the targeted kernel function as an argument. The argument supports wildcards, which enables you to target multiple kernel functions up to a certain extent. | 30 | <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> takes the targeted kernel function as an argument. The argument supports wildcards, which enables you to target multiple kernel functions up to a certain extent. | 
| 31 | </div><a id="idm47723005503616" class="indexterm"></a><a id="idm47722990934576" class="indexterm"></a><a id="idm47723003308928" class="indexterm"></a><div class="para"> | 31 | </div><a id="idm47650197298432" class="indexterm"></a><a id="idm47650149877296" class="indexterm"></a><a id="idm47650193143728" class="indexterm"></a><div class="para"> | 
| 32 | The output of <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> contains the name of the function called and how many times it was called during the sample time (in alphabetical order). <a class="xref" href="mainsect-profiling.html#countcallsoutput">Example 5.13, “functioncallcount.stp Sample Output”</a> contains an excerpt from the output of <code class="command">stap functioncallcount.stp "*@mm/*.c"</code>: | 32 | The output of <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> contains the name of the function called and how many times it was called during the sample time (in alphabetical order). <a class="xref" href="mainsect-profiling.html#countcallsoutput">Example 5.13, “functioncallcount.stp Sample Output”</a> contains an excerpt from the output of <code class="command">stap functioncallcount.stp "*@mm/*.c"</code>: | 
| 33 | </div><div class="example"><a id="countcallsoutput"> | 33 | </div><div class="example"><a id="countcallsoutput"> | 
| 34 | </a><p class="title"><strong>Example 5.13. <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 34 | </a><p class="title"><strong>Example 5.13. <a class="xref" href="mainsect-profiling.html#countcalls">functioncallcount.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 
| diff --git a/SystemTap_Beginners_Guide/paracallgraph.html b/SystemTap_Beginners_Guide/paracallgraph.html index 566f64dc..63924bea 100644 --- a/SystemTap_Beginners_Guide/paracallgraph.html +++ b/SystemTap_Beginners_Guide/paracallgraph.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.2. Call Graph Tracing</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="next" href="threadtimessect.html" title="5.3.3. Determining Time Spent in Kernel and User Space" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="mainsect-profiling.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="threadtimessect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="paracallgraph"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.2. Call Graph Tracing</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="next" href="threadtimessect.html" title="5.3.3. Determining Time Spent in Kernel and User Space" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="mainsect-profiling.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="threadtimessect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="paracallgraph"> | 
| 3 | </a>5.3.2. Call Graph Tracing</h3></div></div></div><a id="idm47723001724816" class="indexterm"></a><a id="idm47722995805568" class="indexterm"></a><a id="idm47722952022912" class="indexterm"></a><a id="idm47723005498144" class="indexterm"></a><a id="idm47722988587600" class="indexterm"></a><a id="idm47722954482112" class="indexterm"></a><a id="idm47722953688992" class="indexterm"></a><div class="para"> | 3 | </a>5.3.2. Call Graph Tracing</h3></div></div></div><a id="idm47650154797216" class="indexterm"></a><a id="idm47650145372304" class="indexterm"></a><a id="idm47650195584864" class="indexterm"></a><a id="idm47650189263728" class="indexterm"></a><a id="idm47650144408368" class="indexterm"></a><a id="idm47650183265616" class="indexterm"></a><a id="idm47650193380592" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to trace incoming and outgoing function calls. | 4 | This section describes how to trace incoming and outgoing function calls. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">para-callgraph.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">para-callgraph.stp</div> | 
| 6 | 6 | ||
| @@ -29,13 +29,13 @@ probe $2.return { | |||
| 29 | probe $1.call { trace(1, $$parms) } | 29 | probe $1.call { trace(1, $$parms) } | 
| 30 | probe $1.return { trace(-1, $$return) } | 30 | probe $1.return { trace(-1, $$return) } | 
| 31 | </pre> | 31 | </pre> | 
| 32 | </div><a id="idm47722994473136" class="indexterm"></a><a id="idm47722956353968" class="indexterm"></a><a id="idm47722951594144" class="indexterm"></a><a id="idm47722987631728" class="indexterm"></a><div class="para"> | 32 | </div><a id="idm47650151152368" class="indexterm"></a><a id="idm47650193352224" class="indexterm"></a><a id="idm47650183854320" class="indexterm"></a><a id="idm47650147299424" class="indexterm"></a><div class="para"> | 
| 33 | <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> takes two command-line arguments: | 33 | <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> takes two command-line arguments: | 
| 34 | </div><a id="idm47722955556320" class="indexterm"></a><a id="idm47722994699280" class="indexterm"></a><a id="idm47722957309792" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 34 | </div><a id="idm47650190405456" class="indexterm"></a><a id="idm47650154907856" class="indexterm"></a><a id="idm47650190992560" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 
| 35 | The function/s whose entry/exit call you'd like to trace (<code class="command">$1</code>). | 35 | The function/s whose entry/exit call you'd like to trace (<code class="command">$1</code>). | 
| 36 | </div></li><li class="listitem"><div class="para"> | 36 | </div></li><li class="listitem"><div class="para"> | 
| 37 | A second optional <em class="firstterm">trigger function</em> (<code class="command">$2</code>), which enables or disables tracing on a per-thread basis. Tracing in each thread will continue as long as the trigger function has not exited yet. | 37 | A second optional <em class="firstterm">trigger function</em> (<code class="command">$2</code>), which enables or disables tracing on a per-thread basis. Tracing in each thread will continue as long as the trigger function has not exited yet. | 
| 38 | </div></li></ul></div><a id="idm47722988605120" class="indexterm"></a><a id="idm47723004502208" class="indexterm"></a><a id="idm47722999823648" class="indexterm"></a><div class="para"> | 38 | </div></li></ul></div><a id="idm47650183030768" class="indexterm"></a><a id="idm47650154837680" class="indexterm"></a><a id="idm47650193122288" class="indexterm"></a><div class="para"> | 
| 39 | <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> uses <code class="command">thread_indent()</code>; as such, its output contains the timestamp, process name, and thread ID of <code class="command">$1</code> (that is, the probe function you are tracing). For more information about <code class="command">thread_indent()</code>, refer to its entry in <a class="xref" href="systemtapscript-handler.html#systemtapscript-functions">SystemTap Functions</a>. | 39 | <a class="xref" href="paracallgraph.html#scriptcallgraph">para-callgraph.stp</a> uses <code class="command">thread_indent()</code>; as such, its output contains the timestamp, process name, and thread ID of <code class="command">$1</code> (that is, the probe function you are tracing). For more information about <code class="command">thread_indent()</code>, refer to its entry in <a class="xref" href="systemtapscript-handler.html#systemtapscript-functions">SystemTap Functions</a>. | 
| 40 | </div><div class="para"> | 40 | </div><div class="para"> | 
| 41 | The following example contains an excerpt from the output for <code class="command">stap para-callgraph.stp 'kernel.function("*@fs/*.c")' 'kernel.function("sys_read")'</code>: | 41 | The following example contains an excerpt from the output for <code class="command">stap para-callgraph.stp 'kernel.function("*@fs/*.c")' 'kernel.function("sys_read")'</code>: | 
| diff --git a/SystemTap_Beginners_Guide/pr01s02.html b/SystemTap_Beginners_Guide/pr01s02.html index c28e900c..05618bf0 100644 --- a/SystemTap_Beginners_Guide/pr01s02.html +++ b/SystemTap_Beginners_Guide/pr01s02.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2. We Need Feedback!</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="SystemTap_Beginners_Guide-Preface.html" title="Preface" /><link rel="prev" href="SystemTap_Beginners_Guide-Preface.html" title="Preface" /><link rel="next" href="introduction.html" title="Chapter 1. Introduction" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="SystemTap_Beginners_Guide-Preface.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="introduction.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="idm47722957303024"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2. We Need Feedback!</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="SystemTap_Beginners_Guide-Preface.html" title="Preface" /><link rel="prev" href="SystemTap_Beginners_Guide-Preface.html" title="Preface" /><link rel="next" href="introduction.html" title="Chapter 1. Introduction" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="SystemTap_Beginners_Guide-Preface.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="introduction.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="idm47650146483136"> | 
| 3 | </a>2. We Need Feedback!</h2></div></div></div><a id="idm47722957302032" class="indexterm"></a><div class="para"> | 3 | </a>2. We Need Feedback!</h2></div></div></div><a id="idm47650146482144" class="indexterm"></a><div class="para"> | 
| 4 | If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: <a href="http://sourceware.org/bugzilla/">http://sourceware.org/bugzilla/</a> against the product <span class="application"><strong>systemtap</strong></span>. | 4 | If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a report in Bugzilla: <a href="http://sourceware.org/bugzilla/">http://sourceware.org/bugzilla/</a> against the product <span class="application"><strong>systemtap</strong></span>. | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | When submitting a report, be sure to include the specific file or URL the report refers to and the manual's identifier: <em class="citetitle">SystemTap_Beginners_Guide</em> | 6 | When submitting a report, be sure to include the specific file or URL the report refers to and the manual's identifier: <em class="citetitle">SystemTap_Beginners_Guide</em> | 
| diff --git a/SystemTap_Beginners_Guide/runtimeerror.html b/SystemTap_Beginners_Guide/runtimeerror.html index c25ca01c..cb772d6a 100644 --- a/SystemTap_Beginners_Guide/runtimeerror.html +++ b/SystemTap_Beginners_Guide/runtimeerror.html | |||
| @@ -1,29 +1,29 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">6.2. Runtime Errors and Warnings</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="errors.html" title="Chapter 6. Understanding SystemTap Errors" /><link rel="prev" href="errors.html" title="Chapter 6. Understanding SystemTap Errors" /><link rel="next" href="references.html" title="Chapter 7. References" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="errors.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="references.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="runtimeerror"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">6.2. Runtime Errors and Warnings</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="errors.html" title="Chapter 6. Understanding SystemTap Errors" /><link rel="prev" href="errors.html" title="Chapter 6. Understanding SystemTap Errors" /><link rel="next" href="references.html" title="Chapter 7. References" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="errors.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="references.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="runtimeerror"> | 
| 3 | </a>6.2. Runtime Errors and Warnings</h2></div></div></div><a id="idm47722997837344" class="indexterm"></a><a id="idm47722997835936" class="indexterm"></a><a id="idm47722997834496" class="indexterm"></a><div class="para"> | 3 | </a>6.2. Runtime Errors and Warnings</h2></div></div></div><a id="idm47650184675840" class="indexterm"></a><a id="idm47650154505168" class="indexterm"></a><a id="idm47650154503728" class="indexterm"></a><div class="para"> | 
| 4 | Runtime errors and warnings occur when the SystemTap instrumentation has been installed and is collecting data on the system. | 4 | Runtime errors and warnings occur when the SystemTap instrumentation has been installed and is collecting data on the system. | 
| 5 | </div><h3><a id="idm47722997832496"> | 5 | </div><h3><a id="idm47650154501728"> | 
| 6 | </a>WARNING: Number of errors: <em class="replaceable">N</em>, skipped probes: <em class="replaceable">M</em></h3><a id="idm47722997830928" class="indexterm"></a><a id="idm47722997550048" class="indexterm"></a><a id="idm47722997548160" class="indexterm"></a><a id="idm47722997546304" class="indexterm"></a><div class="para"> | 6 | </a>WARNING: Number of errors: <em class="replaceable">N</em>, skipped probes: <em class="replaceable">M</em></h3><a id="idm47650154500080" class="indexterm"></a><a id="idm47650154498224" class="indexterm"></a><a id="idm47650196231216" class="indexterm"></a><a id="idm47650196229360" class="indexterm"></a><div class="para"> | 
| 7 | Errors and/or skipped probes occurred during this run. Both <em class="replaceable">N</em> and <em class="replaceable">M</em> are the counts of the number of probes that were not executed due to conditions such as too much time required to execute event handlers over an interval of time. | 7 | Errors and/or skipped probes occurred during this run. Both <em class="replaceable">N</em> and <em class="replaceable">M</em> are the counts of the number of probes that were not executed due to conditions such as too much time required to execute event handlers over an interval of time. | 
| 8 | </div><h3><a id="idm47722951269168"> | 8 | </div><h3><a id="idm47650196225872"> | 
| 9 | </a>division by 0</h3><a id="idm47722951268368" class="indexterm"></a><a id="idm47722951266480" class="indexterm"></a><a id="idm47722951264560" class="indexterm"></a><a id="idm47722951262672" class="indexterm"></a><a id="idm47722999521040" class="indexterm"></a><div class="para"> | 9 | </a>division by 0</h3><a id="idm47650196225072" class="indexterm"></a><a id="idm47650186819792" class="indexterm"></a><a id="idm47650186817872" class="indexterm"></a><a id="idm47650186815984" class="indexterm"></a><a id="idm47650186814096" class="indexterm"></a><div class="para"> | 
| 10 | The script code performed an invalid division. | 10 | The script code performed an invalid division. | 
| 11 | </div><h3><a id="idm47722999518704"> | 11 | </div><h3><a id="idm47650184769776"> | 
| 12 | </a>aggregate element not found</h3><a id="idm47722999517936" class="indexterm"></a><a id="idm47722999516080" class="indexterm"></a><a id="idm47722999514192" class="indexterm"></a><a id="idm47722962526064" class="indexterm"></a><div class="para"> | 12 | </a>aggregate element not found</h3><a id="idm47650184769008" class="indexterm"></a><a id="idm47650184767152" class="indexterm"></a><a id="idm47650184765264" class="indexterm"></a><a id="idm47650184763408" class="indexterm"></a><div class="para"> | 
| 13 | A statistics extractor function other than <code class="command">@count</code> was invoked on an aggregate that has not had any values accumulated yet. This is similar to a division by zero. | 13 | A statistics extractor function other than <code class="command">@count</code> was invoked on an aggregate that has not had any values accumulated yet. This is similar to a division by zero. | 
| 14 | </div><h3><a id="idm47722962523184"> | 14 | </div><h3><a id="idm47650189281312"> | 
| 15 | </a>aggregation overflow</h3><a id="idm47722962522384" class="indexterm"></a><a id="idm47722962520496" class="indexterm"></a><a id="idm47723001761648" class="indexterm"></a><a id="idm47723001759760" class="indexterm"></a><a id="idm47723001757872" class="indexterm"></a><div class="para"> | 15 | </a>aggregation overflow</h3><a id="idm47650189280512" class="indexterm"></a><a id="idm47650189278624" class="indexterm"></a><a id="idm47650189276704" class="indexterm"></a><a id="idm47650145698640" class="indexterm"></a><a id="idm47650145696752" class="indexterm"></a><div class="para"> | 
| 16 | An array containing aggregate values contains too many distinct key pairs at this time. | 16 | An array containing aggregate values contains too many distinct key pairs at this time. | 
| 17 | </div><h3><a id="idm47722987831808"> | 17 | </div><h3><a id="idm47650145694000"> | 
| 18 | </a>MAXNESTING exceeded</h3><a id="idm47722987831136" class="indexterm"></a><a id="idm47722987829248" class="indexterm"></a><a id="idm47722987827328" class="indexterm"></a><a id="idm47722987825440" class="indexterm"></a><a id="idm47722956810960" class="indexterm"></a><div class="para"> | 18 | </a>MAXNESTING exceeded</h3><a id="idm47650145693328" class="indexterm"></a><a id="idm47650187951760" class="indexterm"></a><a id="idm47650187949840" class="indexterm"></a><a id="idm47650187947952" class="indexterm"></a><a id="idm47650187946064" class="indexterm"></a><div class="para"> | 
| 19 | Too many levels of function call nesting were attempted. The default nesting of function calls allowed is 10. | 19 | Too many levels of function call nesting were attempted. The default nesting of function calls allowed is 10. | 
| 20 | </div><h3><a id="idm47722956808496"> | 20 | </div><h3><a id="idm47650193008640"> | 
| 21 | </a>MAXACTION exceeded</h3><a id="idm47722956807696" class="indexterm"></a><a id="idm47722956805808" class="indexterm"></a><a id="idm47722956803888" class="indexterm"></a><a id="idm47722960397440" class="indexterm"></a><a id="idm47722960395552" class="indexterm"></a><div class="para"> | 21 | </a>MAXACTION exceeded</h3><a id="idm47650193007840" class="indexterm"></a><a id="idm47650193005952" class="indexterm"></a><a id="idm47650193004032" class="indexterm"></a><a id="idm47650193002144" class="indexterm"></a><a id="idm47650192109088" class="indexterm"></a><div class="para"> | 
| 22 | The probe handler attempted to execute too many statements in the probe handler. The default number of actions allowed in a probe handler is 1000. | 22 | The probe handler attempted to execute too many statements in the probe handler. The default number of actions allowed in a probe handler is 1000. | 
| 23 | </div><h3><a id="idm47722960393040"> | 23 | </div><h3><a id="idm47650192106576"> | 
| 24 | </a>kernel/user string copy fault at <em class="replaceable">ADDR</em></h3><a id="idm47722960391952" class="indexterm"></a><a id="idm47722987444656" class="indexterm"></a><a id="idm47722987442736" class="indexterm"></a><a id="idm47722987440848" class="indexterm"></a><div class="para"> | 24 | </a>kernel/user string copy fault at <em class="replaceable">ADDR</em></h3><a id="idm47650192105488" class="indexterm"></a><a id="idm47650192103600" class="indexterm"></a><a id="idm47650150070000" class="indexterm"></a><a id="idm47650150068112" class="indexterm"></a><div class="para"> | 
| 25 | The probe handler attempted to copy a string from kernel or user space at an invalid address (<em class="replaceable">ADDR</em>). | 25 | The probe handler attempted to copy a string from kernel or user space at an invalid address (<em class="replaceable">ADDR</em>). | 
| 26 | </div><h3><a id="idm47722987438032"> | 26 | </div><h3><a id="idm47650150065296"> | 
| 27 | </a>pointer dereference fault</h3><a id="idm47722957118864" class="indexterm"></a><a id="idm47722957117008" class="indexterm"></a><a id="idm47722957115120" class="indexterm"></a><a id="idm47722957113264" class="indexterm"></a><div class="para"> | 27 | </a>pointer dereference fault</h3><a id="idm47650150064368" class="indexterm"></a><a id="idm47650150062512" class="indexterm"></a><a id="idm47650183172352" class="indexterm"></a><a id="idm47650183170496" class="indexterm"></a><div class="para"> | 
| 28 | There was a fault encountered during a pointer dereference operation such as a target variable evaluation. | 28 | There was a fault encountered during a pointer dereference operation such as a target variable evaluation. | 
| 29 | </div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="errors.html"><strong>Prev</strong>Chapter 6. Understanding SystemTap Errors</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="references.html"><strong>Next</strong>Chapter 7. References</a></li></ul></body></html> \ No newline at end of file | 29 | </div></div><ul class="docnav"><li class="previous"><a accesskey="p" href="errors.html"><strong>Prev</strong>Chapter 6. Understanding SystemTap Errors</a></li><li class="up"><a accesskey="u" href="#"><strong>Up</strong></a></li><li class="home"><a accesskey="h" href="index.html"><strong>Home</strong></a></li><li class="next"><a accesskey="n" href="references.html"><strong>Next</strong>Chapter 7. References</a></li></ul></body></html> \ No newline at end of file | 
| diff --git a/SystemTap_Beginners_Guide/scriptconstructions.html b/SystemTap_Beginners_Guide/scriptconstructions.html index b388e9e7..9af659cb 100644 --- a/SystemTap_Beginners_Guide/scriptconstructions.html +++ b/SystemTap_Beginners_Guide/scriptconstructions.html | |||
| @@ -1,11 +1,11 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3. Basic SystemTap Handler Constructs</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="systemtapscript-handler.html" title="3.2.2. SystemTap Handler/Body" /><link rel="next" href="targetvariables.html" title="3.3.2. Target Variables" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="systemtapscript-handler.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="targetvariables.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="scriptconstructions"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3. Basic SystemTap Handler Constructs</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="systemtapscript-handler.html" title="3.2.2. SystemTap Handler/Body" /><link rel="next" href="targetvariables.html" title="3.3.2. Target Variables" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="systemtapscript-handler.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="targetvariables.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="scriptconstructions"> | 
| 3 | </a>3.3. Basic SystemTap Handler Constructs</h2></div></div></div><a id="idm47722957071200" class="indexterm"></a><a id="idm47722987935968" class="indexterm"></a><a id="idm47722956916464" class="indexterm"></a><a id="idm47722956917232" class="indexterm"></a><a id="idm47722956919152" class="indexterm"></a><div class="para"> | 3 | </a>3.3. Basic SystemTap Handler Constructs</h2></div></div></div><a id="idm47650182891728" class="indexterm"></a><a id="idm47650182893680" class="indexterm"></a><a id="idm47650187327232" class="indexterm"></a><a id="idm47650187329600" class="indexterm"></a><a id="idm47650187331520" class="indexterm"></a><div class="para"> | 
| 4 | SystemTap supports the use of several basic constructs in handlers. The syntax for most of these handler constructs are mostly based on C and <code class="command">awk</code> 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. | 4 | SystemTap supports the use of several basic constructs in handlers. The syntax for most of these handler constructs are mostly based on C and <code class="command">awk</code> 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. | 
| 5 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="variablesconstructs"> | 5 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="variablesconstructs"> | 
| 6 | </a>3.3.1. Variables</h3></div></div></div><a id="idm47722949708208" class="indexterm"></a><a id="idm47723005081072" class="indexterm"></a><a id="idm47722993511904" class="indexterm"></a><a id="idm47722954960688" class="indexterm"></a><div class="para"> | 6 | </a>3.3.1. Variables</h3></div></div></div><a id="idm47650188659344" class="indexterm"></a><a id="idm47650191131472" class="indexterm"></a><a id="idm47650144168064" class="indexterm"></a><a id="idm47650142533056" class="indexterm"></a><div class="para"> | 
| 7 | Variables can be used freely throughout a handler; simply choose a name, assign a value from a function or expression to it, and use it in an expression. SystemTap automatically identifies whether a variable should be typed as a string or integer, based on the type of the values assigned to it. For instance, if you use set the variable <code class="command">foo</code> to <code class="command">gettimeofday_s()</code> (as in <code class="command">foo = gettimeofday_s()</code>), then <code class="command">foo</code> is typed as a number and can be printed in a <code class="command">printf()</code> with the integer format specifier (<code class="command">%d</code>). | 7 | Variables can be used freely throughout a handler; simply choose a name, assign a value from a function or expression to it, and use it in an expression. SystemTap automatically identifies whether a variable should be typed as a string or integer, based on the type of the values assigned to it. For instance, if you use set the variable <code class="command">foo</code> to <code class="command">gettimeofday_s()</code> (as in <code class="command">foo = gettimeofday_s()</code>), then <code class="command">foo</code> is typed as a number and can be printed in a <code class="command">printf()</code> with the integer format specifier (<code class="command">%d</code>). | 
| 8 | </div><a id="idm47722957070720" class="indexterm"></a><a id="idm47723004465712" class="indexterm"></a><a id="idm47723004029456" class="indexterm"></a><div class="para"> | 8 | </div><a id="idm47650192226304" class="indexterm"></a><a id="idm47650143388896" class="indexterm"></a><a id="idm47650187333312" class="indexterm"></a><div class="para"> | 
| 9 | 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 using <code class="command">global</code> outside of the probes. Consider the following example: | 9 | 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 using <code class="command">global</code> outside of the probes. Consider the following example: | 
| 10 | </div><div class="example"><a id="timerjiffies"> | 10 | </div><div class="example"><a id="timerjiffies"> | 
| 11 | </a><p class="title"><strong>Example 3.8. timer-jiffies.stp</strong></p><div class="example-contents"><pre class="programlisting">global count_jiffies, count_ms | 11 | </a><p class="title"><strong>Example 3.8. timer-jiffies.stp</strong></p><div class="example-contents"><pre class="programlisting">global count_jiffies, count_ms | 
| @@ -17,7 +17,7 @@ probe timer.ms(12345) | |||
| 17 | printf ("jiffies:ms ratio %d:%d => CONFIG_HZ=%d\n", | 17 | printf ("jiffies:ms ratio %d:%d => CONFIG_HZ=%d\n", | 
| 18 | count_jiffies, count_ms, hz) | 18 | count_jiffies, count_ms, hz) | 
| 19 | exit () | 19 | exit () | 
| 20 | }</pre></div></div><a id="idm47723001581120" class="indexterm"></a><div class="para"> | 20 | }</pre></div></div><a id="idm47650151493632" class="indexterm"></a><div class="para"> | 
| 21 | <a class="xref" href="scriptconstructions.html#timerjiffies">Example 3.8, “timer-jiffies.stp”</a> computes the <code class="command">CONFIG_HZ</code> setting of the kernel using timers that count jiffies and milliseconds, then computing accordingly. The <code class="command">global</code> statement allows the script to use the variables <code class="command">count_jiffies</code> and <code class="command">count_ms</code> (set in their own respective probes) to be shared with <code class="command">probe timer.ms(12345)</code>. | 21 | <a class="xref" href="scriptconstructions.html#timerjiffies">Example 3.8, “timer-jiffies.stp”</a> computes the <code class="command">CONFIG_HZ</code> setting of the kernel using timers that count jiffies and milliseconds, then computing accordingly. The <code class="command">global</code> statement allows the script to use the variables <code class="command">count_jiffies</code> and <code class="command">count_ms</code> (set in their own respective probes) to be shared with <code class="command">probe timer.ms(12345)</code>. | 
| 22 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 22 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 
| 23 | The <code class="command">++</code> notation in <a class="xref" href="scriptconstructions.html#timerjiffies">Example 3.8, “timer-jiffies.stp”</a> (that is, <code class="command">count_jiffies ++</code> and <code class="command">count_ms ++</code>) is used to increment the value of a variable by 1. In the following probe, <code class="command">count_jiffies</code> is incremented by 1 every 100 jiffies: | 23 | The <code class="command">++</code> notation in <a class="xref" href="scriptconstructions.html#timerjiffies">Example 3.8, “timer-jiffies.stp”</a> (that is, <code class="command">count_jiffies ++</code> and <code class="command">count_ms ++</code>) is used to increment the value of a variable by 1. In the following probe, <code class="command">count_jiffies</code> is incremented by 1 every 100 jiffies: | 
| diff --git a/SystemTap_Beginners_Guide/scripts.html b/SystemTap_Beginners_Guide/scripts.html index 2e458810..be7d518e 100644 --- a/SystemTap_Beginners_Guide/scripts.html +++ b/SystemTap_Beginners_Guide/scripts.html | |||
| @@ -1,10 +1,10 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.2. SystemTap Scripts</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="next" href="systemtapscript-handler.html" title="3.2.2. SystemTap Handler/Body" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="understanding-how-systemtap-works.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="systemtapscript-handler.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="scripts"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.2. SystemTap Scripts</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="next" href="systemtapscript-handler.html" title="3.2.2. SystemTap Handler/Body" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="understanding-how-systemtap-works.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="systemtapscript-handler.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="scripts"> | 
| 3 | </a>3.2. SystemTap Scripts</h2></div></div></div><a id="idm47722995123200" class="indexterm"></a><a id="idm47722995125008" class="indexterm"></a><div class="para"> | 3 | </a>3.2. SystemTap Scripts</h2></div></div></div><a id="idm47650154650000" class="indexterm"></a><a id="idm47650154651152" class="indexterm"></a><div class="para"> | 
| 4 | 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. | 4 | 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. | 
| 5 | </div><a id="idm47722995126976" class="indexterm"></a><a id="idm47722995129040" class="indexterm"></a><a id="idm47722995130512" class="indexterm"></a><a id="idm47722995132640" class="indexterm"></a><a id="idm47722995134624" class="indexterm"></a><a id="idm47722995136592" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650154654432" class="indexterm"></a><a id="idm47650154655360" class="indexterm"></a><a id="idm47650154657312" class="indexterm"></a><a id="idm47650154659440" class="indexterm"></a><a id="idm47650154661424" class="indexterm"></a><a id="idm47650154663392" class="indexterm"></a><div class="para"> | 
| 6 | As stated in <a class="xref" href="understanding-how-systemtap-works.html">Chapter 3, <em>Understanding How SystemTap Works</em></a>, SystemTap scripts are made up of two components: <span class="emphasis"><em>events</em></span> and <span class="emphasis"><em>handlers</em></span>. Once a SystemTap session is underway, SystemTap monitors the operating system for the specified events and executes the handlers as they occur. | 6 | As stated in <a class="xref" href="understanding-how-systemtap-works.html">Chapter 3, <em>Understanding How SystemTap Works</em></a>, SystemTap scripts are made up of two components: <span class="emphasis"><em>events</em></span> and <span class="emphasis"><em>handlers</em></span>. Once a SystemTap session is underway, SystemTap monitors the operating system for the specified events and executes the handlers as they occur. | 
| 7 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47722995141840" class="indexterm"></a><a id="idm47722995143776" class="indexterm"></a><a id="idm47722995145680" class="indexterm"></a><div class="para"> | 7 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47650154670096" class="indexterm"></a><a id="idm47650154672000" class="indexterm"></a><a id="idm47650154673904" class="indexterm"></a><div class="para"> | 
| 8 | An event and its corresponding handler is collectively called a <span class="emphasis"><em>probe</em></span>. A SystemTap script can have multiple probes. | 8 | An event and its corresponding handler is collectively called a <span class="emphasis"><em>probe</em></span>. A SystemTap script can have multiple probes. | 
| 9 | </div><div class="para"> | 9 | </div><div class="para"> | 
| 10 | A probe's handler is commonly referred to as a <span class="emphasis"><em>probe body</em></span>. | 10 | A probe's handler is commonly referred to as a <span class="emphasis"><em>probe body</em></span>. | 
| @@ -12,15 +12,15 @@ | |||
| 12 | In terms of application development, using events and handlers is similar to instrumenting the code by inserting diagnostic print statements in a program's sequence of commands. These diagnostic print statements allow you to view a history of commands executed once the program is run. | 12 | In terms of application development, using events and handlers is similar to instrumenting the code by inserting diagnostic print statements in a program's sequence of commands. These diagnostic print statements allow you to view a history of commands executed once the program is run. | 
| 13 | </div><div class="para"> | 13 | </div><div class="para"> | 
| 14 | SystemTap scripts allow insertion of the instrumentation code without 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. | 14 | SystemTap scripts allow insertion of the instrumentation code without 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. | 
| 15 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Format</div><a id="idm47722995153872" class="indexterm"></a><a id="idm47722995152944" class="indexterm"></a><a id="idm47722995154512" class="indexterm"></a><a id="idm47722995156032" class="indexterm"></a> | 15 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Format</div><a id="idm47650154678512" class="indexterm"></a><a id="idm47650154679296" class="indexterm"></a><a id="idm47650154680832" class="indexterm"></a><a id="idm47650154682256" class="indexterm"></a> | 
| 16 | SystemTap scripts use the file extension <code class="filename">.stp</code>, and contains probes written in the following format: | 16 | SystemTap scripts use the file extension <code class="filename">.stp</code>, and contains probes written in the following format: | 
| 17 | </div><pre class="screen">probe <em class="replaceable">event</em> {<em class="replaceable">statements</em>}</pre><div class="para"> | 17 | </div><pre class="screen">probe <em class="replaceable">event</em> {<em class="replaceable">statements</em>}</pre><div class="para"> | 
| 18 | SystemTap supports multiple events per probe; multiple events are delimited by a comma (<code class="command">,</code>). If multiple events are specified in a single probe, SystemTap will execute the handler when any of the specified events occur. | 18 | SystemTap supports multiple events per probe; multiple events are delimited by a comma (<code class="command">,</code>). If multiple events are specified in a single probe, SystemTap will execute the handler when any of the specified events occur. | 
| 19 | </div><a id="idm47722995161216" class="indexterm"></a><a id="idm47722995163152" class="indexterm"></a><a id="idm47722995165088" class="indexterm"></a><div class="para"> | 19 | </div><a id="idm47650154687440" class="indexterm"></a><a id="idm47650154689360" class="indexterm"></a><a id="idm47650154691312" class="indexterm"></a><div class="para"> | 
| 20 | Each probe has a corresponding <em class="firstterm">statement block</em>. This statement block is enclosed in braces (<code class="command">{ }</code>) and contains the statements to be executed per event. SystemTap executes these statements in sequence; special separators or terminators are generally not necessary between multiple statements. | 20 | Each probe has a corresponding <em class="firstterm">statement block</em>. This statement block is enclosed in braces (<code class="command">{ }</code>) and contains the statements to be executed per event. SystemTap executes these statements in sequence; special separators or terminators are generally not necessary between multiple statements. | 
| 21 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 21 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><div class="para"> | 
| 22 | Statement blocks in SystemTap scripts follow the same syntax and semantics as the C programming language. A statement block can be nested within another statement block. | 22 | Statement blocks in SystemTap scripts follow the same syntax and semantics as the C programming language. A statement block can be nested within another statement block. | 
| 23 | </div></div></div><a id="idm47722995170240" class="indexterm"></a><a id="idm47722995171808" class="indexterm"></a><a id="idm47722995173776" class="indexterm"></a><div class="para"> | 23 | </div></div></div><a id="idm47650154696464" class="indexterm"></a><a id="idm47650154698512" class="indexterm"></a><a id="idm47650154700480" class="indexterm"></a><div class="para"> | 
| 24 | 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 series of statements in multiple probes, you can just place the instructions in a <em class="firstterm">function</em>, as in: | 24 | 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 series of statements in multiple probes, you can just place the instructions in a <em class="firstterm">function</em>, as in: | 
| 25 | </div><pre class="screen">function <em class="replaceable">function_name</em>(<em class="replaceable">arguments</em>) {<em class="replaceable">statements</em>} | 25 | </div><pre class="screen">function <em class="replaceable">function_name</em>(<em class="replaceable">arguments</em>) {<em class="replaceable">statements</em>} | 
| 26 | probe <em class="replaceable">event</em> {<em class="replaceable">function_name</em>(<em class="replaceable">arguments</em>)}</pre><div class="para"> | 26 | probe <em class="replaceable">event</em> {<em class="replaceable">function_name</em>(<em class="replaceable">arguments</em>)}</pre><div class="para"> | 
| @@ -28,27 +28,27 @@ probe <em class="replaceable">event</em> {<em class="replaceable">function_name< | |||
| 28 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="important"><div class="admonition_header"><p><strong>Important</strong></p></div><div class="admonition"><div class="para"> | 28 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="important"><div class="admonition_header"><p><strong>Important</strong></p></div><div class="admonition"><div class="para"> | 
| 29 | <a class="xref" href="scripts.html">Section 3.2, “SystemTap Scripts”</a> is designed to introduce readers to the basics of SystemTap scripts. To understand SystemTap scripts better, it is advisable that you refer to <a class="xref" href="useful-systemtap-scripts.html">Chapter 5, <em>Useful SystemTap Scripts</em></a>; each section therein provides a detailed explanation of the script, its events, handlers, and expected output. | 29 | <a class="xref" href="scripts.html">Section 3.2, “SystemTap Scripts”</a> is designed to introduce readers to the basics of SystemTap scripts. To understand SystemTap scripts better, it is advisable that you refer to <a class="xref" href="useful-systemtap-scripts.html">Chapter 5, <em>Useful SystemTap Scripts</em></a>; each section therein provides a detailed explanation of the script, its events, handlers, and expected output. | 
| 30 | </div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="systemtapscript-events"> | 30 | </div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="systemtapscript-events"> | 
| 31 | </a>3.2.1. Event</h3></div></div></div><a id="idm47722995187280" class="indexterm"></a><div class="para"> | 31 | </a>3.2.1. Event</h3></div></div></div><a id="idm47650154713504" class="indexterm"></a><div class="para"> | 
| 32 | SystemTap events can be broadly classified into two types: <em class="firstterm">synchronous</em> and <em class="firstterm">asynchronous</em>. | 32 | SystemTap events can be broadly classified into two types: <em class="firstterm">synchronous</em> and <em class="firstterm">asynchronous</em>. | 
| 33 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Synchronous Events</div><a id="idm47722995190848" class="indexterm"></a><a id="idm47722995192208" class="indexterm"></a> | 33 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Synchronous Events</div><a id="idm47650154717552" class="indexterm"></a><a id="idm47650154718192" class="indexterm"></a> | 
| 34 | A <em class="firstterm">synchronous</em> event occurs when any process executes an instruction at a particular location in kernel code. This gives other events a reference point from which more contextual data may be available. | 34 | A <em class="firstterm">synchronous</em> event occurs when any process executes an instruction at a particular location in kernel code. This gives other events a reference point from which more contextual data may be available. | 
| 35 | </div><a id="idm47722995195408" class="indexterm"></a><a id="idm47722995196368" class="indexterm"></a><div class="para"> | 35 | </div><a id="idm47650154721632" class="indexterm"></a><a id="idm47650154723072" class="indexterm"></a><div class="para"> | 
| 36 | Examples of synchronous events include: | 36 | Examples of synchronous events include: | 
| 37 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">syscall.<em class="replaceable">system_call</em></span></dt><dd><a id="idm47722988990064" class="indexterm"></a><a id="idm47722988991872" class="indexterm"></a><div class="para"> | 37 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">syscall.<em class="replaceable">system_call</em></span></dt><dd><a id="idm47650148987344" class="indexterm"></a><a id="idm47650148988512" class="indexterm"></a><div class="para"> | 
| 38 | The entry to the system call <em class="replaceable">system_call</em>. If the exit from a syscall is desired, appending a <code class="command">.return</code> to the event monitor the exit of the system call instead. For example, to specify the entry and exit of the system call <code class="command">close</code>, use <code class="command">syscall.close</code> and <code class="command">syscall.close.return</code> respectively. | 38 | The entry to the system call <em class="replaceable">system_call</em>. If the exit from a syscall is desired, appending a <code class="command">.return</code> to the event monitor the exit of the system call instead. For example, to specify the entry and exit of the system call <code class="command">close</code>, use <code class="command">syscall.close</code> and <code class="command">syscall.close.return</code> respectively. | 
| 39 | </div></dd><dt><span class="term">vfs.<em class="replaceable">file_operation</em></span></dt><dd><a id="idm47722988999136" class="indexterm"></a><a id="idm47722989001088" class="indexterm"></a><div class="para"> | 39 | </div></dd><dt><span class="term">vfs.<em class="replaceable">file_operation</em></span></dt><dd><a id="idm47650148995968" class="indexterm"></a><a id="idm47650148999344" class="indexterm"></a><div class="para"> | 
| 40 | The entry to the <em class="replaceable">file_operation</em> event for Virtual File System (VFS). Similar to <code class="command">syscall</code> event, appending a <code class="command">.return</code> to the event monitors the exit of the <em class="replaceable">file_operation</em> operation. | 40 | The entry to the <em class="replaceable">file_operation</em> event for Virtual File System (VFS). Similar to <code class="command">syscall</code> event, appending a <code class="command">.return</code> to the event monitors the exit of the <em class="replaceable">file_operation</em> operation. | 
| 41 | </div></dd><dt><span class="term">kernel.function("<em class="replaceable">function</em>")</span></dt><dd><a id="idm47722989006928" class="indexterm"></a><a id="idm47722989008736" class="indexterm"></a><div class="para"> | 41 | </div></dd><dt><span class="term">kernel.function("<em class="replaceable">function</em>")</span></dt><dd><a id="idm47650149004208" class="indexterm"></a><a id="idm47650149005536" class="indexterm"></a><div class="para"> | 
| 42 | The entry to the kernel function <em class="replaceable">function</em>. For example, <code class="command">kernel.function("sys_open")</code> refers to the "event" that occurs when the kernel function <code class="command">sys_open</code> is called by any thread in the system. To specify the <span class="emphasis"><em>return</em></span> of the kernel function <code class="command">sys_open</code>, append the <code class="command">return</code> string to the event statement; that is, <code class="command">kernel.function("sys_open").return</code>. | 42 | The entry to the kernel function <em class="replaceable">function</em>. For example, <code class="command">kernel.function("sys_open")</code> refers to the "event" that occurs when the kernel function <code class="command">sys_open</code> is called by any thread in the system. To specify the <span class="emphasis"><em>return</em></span> of the kernel function <code class="command">sys_open</code>, append the <code class="command">return</code> string to the event statement; that is, <code class="command">kernel.function("sys_open").return</code>. | 
| 43 | </div><a id="idm47722989015184" class="indexterm"></a><a id="idm47722989016112" class="indexterm"></a><a id="idm47722989016560" class="indexterm"></a><div class="para"> | 43 | </div><a id="idm47650149011968" class="indexterm"></a><a id="idm47650149012912" class="indexterm"></a><a id="idm47650149013392" class="indexterm"></a><div class="para"> | 
| 44 | When defining probe events, you can use asterisk (<code class="literal">*</code>) for wildcards. You can also trace the entry or exit of a function in a kernel source file. Consider the following example: | 44 | When defining probe events, you can use asterisk (<code class="literal">*</code>) for wildcards. You can also trace the entry or exit of a function in a kernel source file. Consider the following example: | 
| 45 | </div><div class="example"><a id="wildcards"> | 45 | </div><div class="example"><a id="wildcards"> | 
| 46 | </a><p class="title"><strong>Example 3.1. wildcards.stp</strong></p><div class="example-contents"><pre class="programlisting">probe kernel.function("*@net/socket.c") { } | 46 | </a><p class="title"><strong>Example 3.1. wildcards.stp</strong></p><div class="example-contents"><pre class="programlisting">probe kernel.function("*@net/socket.c") { } | 
| 47 | probe kernel.function("*@net/socket.c").return { }</pre></div></div><div class="para"> | 47 | probe kernel.function("*@net/socket.c").return { }</pre></div></div><div class="para"> | 
| 48 | In the previous example, the first probe's event specifies the entry of ALL functions in the kernel source file <code class="filename">net/socket.c</code>. The second probe specifies the exit of all those functions. Note that in this example, there are no statements in the handler; as such, no information will be collected or displayed. | 48 | In the previous example, the first probe's event specifies the entry of ALL functions in the kernel source file <code class="filename">net/socket.c</code>. The second probe specifies the exit of all those functions. Note that in this example, there are no statements in the handler; as such, no information will be collected or displayed. | 
| 49 | </div></dd><dt><span class="term">kernel.trace("<em class="replaceable">tracepoint</em>")</span></dt><dd><a id="idm47722989023504" class="indexterm"></a><a id="idm47722989023984" class="indexterm"></a><a id="idm47722989025680" class="indexterm"></a><div class="para"> | 49 | </div></dd><dt><span class="term">kernel.trace("<em class="replaceable">tracepoint</em>")</span></dt><dd><a id="idm47650149020304" class="indexterm"></a><a id="idm47650149020784" class="indexterm"></a><a id="idm47650149023408" class="indexterm"></a><div class="para"> | 
| 50 | The static probe for <em class="replaceable">tracepoint</em>. Recent kernels (2.6.30 and newer) include instrumentation for specific events in the kernel. These events are statically marked with tracepoints. One example of a tracepoint available in systemtap is <code class="command">kernel.trace("kfree_skb")</code> which indicates each time a network buffer is freed in the kernel. | 50 | The static probe for <em class="replaceable">tracepoint</em>. Recent kernels (2.6.30 and newer) include instrumentation for specific events in the kernel. These events are statically marked with tracepoints. One example of a tracepoint available in systemtap is <code class="command">kernel.trace("kfree_skb")</code> which indicates each time a network buffer is freed in the kernel. | 
| 51 | </div></dd><dt><span class="term">module("<em class="replaceable">module</em>").function("<em class="replaceable">function</em>")</span></dt><dd><a id="idm47722989031952" class="indexterm"></a><a id="idm47722989033696" class="indexterm"></a><div class="para"> | 51 | </div></dd><dt><span class="term">module("<em class="replaceable">module</em>").function("<em class="replaceable">function</em>")</span></dt><dd><a id="idm47650149028752" class="indexterm"></a><a id="idm47650149030496" class="indexterm"></a><div class="para"> | 
| 52 | Allows you to probe functions within modules. For example: | 52 | Allows you to probe functions within modules. For example: | 
| 53 | </div><div class="example"><a id="eventsmodules"> | 53 | </div><div class="example"><a id="eventsmodules"> | 
| 54 | </a><p class="title"><strong>Example 3.2. moduleprobe.stp</strong></p><div class="example-contents"><pre class="programlisting">probe module("ext3").function("*") { } | 54 | </a><p class="title"><strong>Example 3.2. moduleprobe.stp</strong></p><div class="example-contents"><pre class="programlisting">probe module("ext3").function("*") { } | 
| @@ -56,15 +56,15 @@ probe module("ext3").function("*").return { }</pre></div></div><div class="para" | |||
| 56 | The first probe in <a class="xref" href="scripts.html#eventsmodules">Example 3.2, “moduleprobe.stp”</a> points to the entry of <span class="emphasis"><em>all</em></span> functions for the <code class="filename">ext3</code> module. The second probe points to the exits of all functions for that same module; the use of the <code class="command">.return</code> suffix is similar to <code class="command">kernel.function()</code>. Note that the probes in <a class="xref" href="scripts.html#eventsmodules">Example 3.2, “moduleprobe.stp”</a> do not contain statements in the probe handlers, and as such will not print any useful data (as in <a class="xref" href="scripts.html#wildcards">Example 3.1, “wildcards.stp”</a>). | 56 | The first probe in <a class="xref" href="scripts.html#eventsmodules">Example 3.2, “moduleprobe.stp”</a> points to the entry of <span class="emphasis"><em>all</em></span> functions for the <code class="filename">ext3</code> module. The second probe points to the exits of all functions for that same module; the use of the <code class="command">.return</code> suffix is similar to <code class="command">kernel.function()</code>. Note that the probes in <a class="xref" href="scripts.html#eventsmodules">Example 3.2, “moduleprobe.stp”</a> do not contain statements in the probe handlers, and as such will not print any useful data (as in <a class="xref" href="scripts.html#wildcards">Example 3.1, “wildcards.stp”</a>). | 
| 57 | </div><div class="para"> | 57 | </div><div class="para"> | 
| 58 | A system's kernel modules are typically located in <code class="filename">/lib/modules/<em class="replaceable">kernel_version</em></code>, where <em class="replaceable">kernel_version</em> refers to the currently loaded kernel version. Modules use the file name extension <code class="filename">.ko</code>. | 58 | A system's kernel modules are typically located in <code class="filename">/lib/modules/<em class="replaceable">kernel_version</em></code>, where <em class="replaceable">kernel_version</em> refers to the currently loaded kernel version. Modules use the file name extension <code class="filename">.ko</code>. | 
| 59 | </div></dd></dl></div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Asynchronous Events</div><a id="idm47722989044640" class="indexterm"></a><a id="idm47722989046240" class="indexterm"></a> | 59 | </div></dd></dl></div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">Asynchronous Events</div><a id="idm47650149041440" class="indexterm"></a><a id="idm47650149042656" class="indexterm"></a> | 
| 60 | <em class="firstterm">Asynchronous</em> events are not tied to a particular instruction or location in code. This family of probe points consists mainly of counters, timers, and similar constructs. | 60 | <em class="firstterm">Asynchronous</em> events are not tied to a particular instruction or location in code. This family of probe points consists mainly of counters, timers, and similar constructs. | 
| 61 | </div><div class="para"> | 61 | </div><div class="para"> | 
| 62 | Examples of asynchronous events include: | 62 | Examples of asynchronous events include: | 
| 63 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">begin</span></dt><dd><a id="idm47722989050976" class="indexterm"></a><a id="idm47722989053232" class="indexterm"></a><div class="para"> | 63 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">begin</span></dt><dd><a id="idm47650149047760" class="indexterm"></a><a id="idm47650149049056" class="indexterm"></a><div class="para"> | 
| 64 | The startup of a SystemTap session; that is, as soon as the SystemTap script is run. | 64 | The startup of a SystemTap session; that is, as soon as the SystemTap script is run. | 
| 65 | </div></dd><dt><span class="term">end</span></dt><dd><a id="idm47722989054976" class="indexterm"></a><a id="idm47722989056400" class="indexterm"></a><div class="para"> | 65 | </div></dd><dt><span class="term">end</span></dt><dd><a id="idm47650149052256" class="indexterm"></a><a id="idm47650149055616" class="indexterm"></a><div class="para"> | 
| 66 | The end of a SystemTap session. | 66 | The end of a SystemTap session. | 
| 67 | </div></dd><dt><span class="term">timer events</span></dt><dd><a id="idm47722989059344" class="indexterm"></a><a id="idm47722989059984" class="indexterm"></a><div class="para"> | 67 | </div></dd><dt><span class="term">timer events</span></dt><dd><a id="idm47650149056624" class="indexterm"></a><a id="idm47650149057264" class="indexterm"></a><div class="para"> | 
| 68 | An event that specifies a handler to be executed periodically. For example: | 68 | An event that specifies a handler to be executed periodically. For example: | 
| 69 | </div><div class="example"><a id="timer"> | 69 | </div><div class="example"><a id="timer"> | 
| 70 | </a><p class="title"><strong>Example 3.3. timer-s.stp</strong></p><div class="example-contents"><pre class="programlisting">probe timer.s(4) | 70 | </a><p class="title"><strong>Example 3.3. timer-s.stp</strong></p><div class="example-contents"><pre class="programlisting">probe timer.s(4) | 
| diff --git a/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html b/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html index 92c61094..738c1490 100644 --- a/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html +++ b/SystemTap_Beginners_Guide/syscallsbyprocpidsect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.6. Tracking System Call Volume Per Process</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="topsyssect.html" title="5.3.5. Tracking Most Frequently Used System Calls" /><link rel="next" href="futexcontentionsect.html" title="5.4. Identifying Contended User-Space Locks" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="topsyssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="futexcontentionsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="syscallsbyprocpidsect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.6. Tracking System Call Volume Per Process</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="topsyssect.html" title="5.3.5. Tracking Most Frequently Used System Calls" /><link rel="next" href="futexcontentionsect.html" title="5.4. Identifying Contended User-Space Locks" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="topsyssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="futexcontentionsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="syscallsbyprocpidsect"> | 
| 3 | </a>5.3.6. Tracking System Call Volume Per Process</h3></div></div></div><a id="idm47722987893248" class="indexterm"></a><a id="idm47722957254320" class="indexterm"></a><a id="idm47722957252944" class="indexterm"></a><a id="idm47722994433072" class="indexterm"></a><div class="para"> | 3 | </a>5.3.6. Tracking System Call Volume Per Process</h3></div></div></div><a id="idm47650145902736" class="indexterm"></a><a id="idm47650188946400" class="indexterm"></a><a id="idm47650188945024" class="indexterm"></a><a id="idm47650187062336" class="indexterm"></a><div class="para"> | 
| 4 | This section illustrates how to determine which processes are performing the highest volume of system calls. In previous sections, we've described how to monitor the top system calls used by the system over time (<a class="xref" href="topsyssect.html">Section 5.3.5, “Tracking Most Frequently Used System Calls”</a>). We've also described how to identify which applications use a specific set of "polling suspect" system calls the most (<a class="xref" href="timeoutssect.html">Section 5.3.4, “Monitoring Polling Applications”</a>). Monitoring the volume of system calls made by each process provides more data in investigating your system for polling processes and other resource hogs. | 4 | This section illustrates how to determine which processes are performing the highest volume of system calls. In previous sections, we've described how to monitor the top system calls used by the system over time (<a class="xref" href="topsyssect.html">Section 5.3.5, “Tracking Most Frequently Used System Calls”</a>). We've also described how to identify which applications use a specific set of "polling suspect" system calls the most (<a class="xref" href="timeoutssect.html">Section 5.3.4, “Monitoring Polling Applications”</a>). Monitoring the volume of system calls made by each process provides more data in investigating your system for polling processes and other resource hogs. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">syscalls_by_proc.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">syscalls_by_proc.stp</div> | 
| 6 | 6 | ||
| diff --git a/SystemTap_Beginners_Guide/systemtapscript-handler.html b/SystemTap_Beginners_Guide/systemtapscript-handler.html index 248b2278..b47ccfba 100644 --- a/SystemTap_Beginners_Guide/systemtapscript-handler.html +++ b/SystemTap_Beginners_Guide/systemtapscript-handler.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.2.2. SystemTap Handler/Body</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scripts.html" title="3.2. SystemTap Scripts" /><link rel="prev" href="scripts.html" title="3.2. SystemTap Scripts" /><link rel="next" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="scripts.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="scriptconstructions.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="systemtapscript-handler"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.2.2. SystemTap Handler/Body</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scripts.html" title="3.2. SystemTap Scripts" /><link rel="prev" href="scripts.html" title="3.2. SystemTap Scripts" /><link rel="next" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="scripts.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="scriptconstructions.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="systemtapscript-handler"> | 
| 3 | </a>3.2.2. SystemTap Handler/Body</h3></div></div></div><a id="idm47722989081744" class="indexterm"></a><div class="para"> | 3 | </a>3.2.2. SystemTap Handler/Body</h3></div></div></div><a id="idm47650149078944" class="indexterm"></a><div class="para"> | 
| 4 | Consider the following sample script: | 4 | Consider the following sample script: | 
| 5 | </div><div class="example"><a id="helloworld"> | 5 | </div><div class="example"><a id="helloworld"> | 
| 6 | </a><p class="title"><strong>Example 3.4. helloworld.stp</strong></p><div class="example-contents"><pre class="programlisting">probe begin | 6 | </a><p class="title"><strong>Example 3.4. helloworld.stp</strong></p><div class="example-contents"><pre class="programlisting">probe begin | 
| @@ -9,16 +9,16 @@ | |||
| 9 | exit () | 9 | exit () | 
| 10 | }</pre></div></div><div class="para"> | 10 | }</pre></div></div><div class="para"> | 
| 11 | In <a class="xref" href="systemtapscript-handler.html#helloworld">Example 3.4, “helloworld.stp”</a>, the event <code class="command">begin</code> (that is, the start of the session) triggers the handler enclosed in <code class="command">{ }</code>, which simply prints <code class="command">hello world</code> followed by a new-line, then exits. | 11 | In <a class="xref" href="systemtapscript-handler.html#helloworld">Example 3.4, “helloworld.stp”</a>, the event <code class="command">begin</code> (that is, the start of the session) triggers the handler enclosed in <code class="command">{ }</code>, which simply prints <code class="command">hello world</code> followed by a new-line, then exits. | 
| 12 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47723005009584" class="indexterm"></a><a id="idm47723005010832" class="indexterm"></a><div class="para"> | 12 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47650187169312" class="indexterm"></a><a id="idm47650187171008" class="indexterm"></a><div class="para"> | 
| 13 | SystemTap scripts continue to run until the <code class="command">exit()</code> function executes. If the users wants to stop the execution of the script, it can interrupted manually with <span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>C</strong></span>. | 13 | SystemTap scripts continue to run until the <code class="command">exit()</code> function executes. If the users wants to stop the execution of the script, it can interrupted manually with <span class="keycap"><strong>Ctrl</strong></span>+<span class="keycap"><strong>C</strong></span>. | 
| 14 | </div></div></div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">printf ( ) Statements</div><a id="idm47723005015760" class="indexterm"></a> | 14 | </div></div></div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">printf ( ) Statements</div><a id="idm47650187175648" class="indexterm"></a> | 
| 15 | The <code class="command">printf ()</code> statement is one of the simplest functions for printing data. <code class="command">printf ()</code> can also be used to display data using a wide variety of SystemTap functions in the following format: | 15 | The <code class="command">printf ()</code> statement is one of the simplest functions for printing data. <code class="command">printf ()</code> can also be used to display data using a wide variety of SystemTap functions in the following format: | 
| 16 | </div><pre class="programlisting"> printf ("<em class="replaceable">format string</em>\n", <em class="replaceable">arguments</em>) | 16 | </div><pre class="programlisting"> printf ("<em class="replaceable">format string</em>\n", <em class="replaceable">arguments</em>) | 
| 17 | </pre><a id="idm47723005019952" class="indexterm"></a><a id="idm47723005021680" class="indexterm"></a><div class="para"> | 17 | </pre><a id="idm47650187180224" class="indexterm"></a><a id="idm47650187181472" class="indexterm"></a><div class="para"> | 
| 18 | The <em class="replaceable">format string</em> specifies how <em class="replaceable">arguments</em> should be printed. The format string of <a class="xref" href="systemtapscript-handler.html#helloworld">Example 3.4, “helloworld.stp”</a> instructs SystemTap to print <code class="command">hello world</code>, and contains no format specifiers. | 18 | The <em class="replaceable">format string</em> specifies how <em class="replaceable">arguments</em> should be printed. The format string of <a class="xref" href="systemtapscript-handler.html#helloworld">Example 3.4, “helloworld.stp”</a> instructs SystemTap to print <code class="command">hello world</code>, and contains no format specifiers. | 
| 19 | </div><a id="idm47723005025424" class="indexterm"></a><a id="idm47723005027152" class="indexterm"></a><div class="para"> | 19 | </div><a id="idm47650187185696" class="indexterm"></a><a id="idm47650187188832" class="indexterm"></a><div class="para"> | 
| 20 | You can use the format specifiers <code class="command">%s</code> (for strings) and <code class="command">%d</code> (for numbers) in format strings, depending on your list of arguments. Format strings can have multiple format specifiers, each matching a corresponding argument; multiple arguments are delimited by a comma (<code class="command">,</code>). | 20 | You can use the format specifiers <code class="command">%s</code> (for strings) and <code class="command">%d</code> (for numbers) in format strings, depending on your list of arguments. Format strings can have multiple format specifiers, each matching a corresponding argument; multiple arguments are delimited by a comma (<code class="command">,</code>). | 
| 21 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47723005031600" class="indexterm"></a><a id="idm47723005033952" class="indexterm"></a><a id="idm47723005035520" class="indexterm"></a><div class="para"> | 21 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="note"><div class="admonition_header"><p><strong>Note</strong></p></div><div class="admonition"><a id="idm47650187191424" class="indexterm"></a><a id="idm47650187193936" class="indexterm"></a><a id="idm47650187195312" class="indexterm"></a><div class="para"> | 
| 22 | Semantically, the SystemTap <code class="command">printf</code> function is very similar to its C language counterpart. The aforementioned syntax and format for SystemTap's <code class="command">printf</code> function is identical to that of the C-style <code class="command">printf</code>. | 22 | Semantically, the SystemTap <code class="command">printf</code> function is very similar to its C language counterpart. The aforementioned syntax and format for SystemTap's <code class="command">printf</code> function is identical to that of the C-style <code class="command">printf</code>. | 
| 23 | </div></div></div><div class="para"> | 23 | </div></div></div><div class="para"> | 
| 24 | To illustrate this, consider the following probe example: | 24 | To illustrate this, consider the following probe example: | 
| @@ -35,23 +35,23 @@ hald(2360) open | |||
| 35 | df(3433) open | 35 | df(3433) open | 
| 36 | df(3433) open | 36 | df(3433) open | 
| 37 | df(3433) open | 37 | df(3433) open | 
| 38 | hald(2360) open</pre><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">SystemTap Functions</div><a id="idm47723005046240" class="indexterm"></a><a id="idm47723005046576" class="indexterm"></a><a id="idm47723005047696" class="indexterm"></a> | 38 | hald(2360) open</pre><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">SystemTap Functions</div><a id="idm47650187206032" class="indexterm"></a><a id="idm47650187206816" class="indexterm"></a><a id="idm47650187207344" class="indexterm"></a> | 
| 39 | SystemTap supports a wide variety of functions that can be used as <code class="command">printf ()</code> arguments. <a class="xref" href="systemtapscript-handler.html#syscall-open">Example 3.5, “variables-in-printf-statements.stp”</a> uses the SystemTap functions <code class="command">execname()</code> (name of the process that called a kernel function/performed a system call) and <code class="command">pid()</code> (current process ID). | 39 | SystemTap supports a wide variety of functions that can be used as <code class="command">printf ()</code> arguments. <a class="xref" href="systemtapscript-handler.html#syscall-open">Example 3.5, “variables-in-printf-statements.stp”</a> uses the SystemTap functions <code class="command">execname()</code> (name of the process that called a kernel function/performed a system call) and <code class="command">pid()</code> (current process ID). | 
| 40 | </div><div class="para"> | 40 | </div><div class="para"> | 
| 41 | The following is a list of commonly-used SystemTap functions: | 41 | The following is a list of commonly-used SystemTap functions: | 
| 42 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">tid()</span></dt><dd><a id="idm47723005055376" class="indexterm"></a><a id="idm47723005054896" class="indexterm"></a><a id="idm47723005056320" class="indexterm"></a><div class="para"> | 42 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">tid()</span></dt><dd><a id="idm47650187213744" class="indexterm"></a><a id="idm47650187215168" class="indexterm"></a><a id="idm47650187216592" class="indexterm"></a><div class="para"> | 
| 43 | The ID of the current thread. | 43 | The ID of the current thread. | 
| 44 | </div></dd><dt><span class="term">uid()</span></dt><dd><a id="idm47723005059808" class="indexterm"></a><a id="idm47723005061808" class="indexterm"></a><div class="para"> | 44 | </div></dd><dt><span class="term">uid()</span></dt><dd><a id="idm47650187221280" class="indexterm"></a><a id="idm47650187221600" class="indexterm"></a><div class="para"> | 
| 45 | The ID of the current user. | 45 | The ID of the current user. | 
| 46 | </div></dd><dt><span class="term">cpu()</span></dt><dd><a id="idm47723005066288" class="indexterm"></a><a id="idm47723005066944" class="indexterm"></a><div class="para"> | 46 | </div></dd><dt><span class="term">cpu()</span></dt><dd><a id="idm47650187225104" class="indexterm"></a><a id="idm47650187226720" class="indexterm"></a><div class="para"> | 
| 47 | The current CPU number. | 47 | The current CPU number. | 
| 48 | </div></dd><dt><span class="term">gettimeofday_s()</span></dt><dd><a id="idm47723005070720" class="indexterm"></a><a id="idm47723005072480" class="indexterm"></a><div class="para"> | 48 | </div></dd><dt><span class="term">gettimeofday_s()</span></dt><dd><a id="idm47650187230352" class="indexterm"></a><a id="idm47650187232272" class="indexterm"></a><div class="para"> | 
| 49 | The number of seconds since UNIX epoch (January 1, 1970). | 49 | The number of seconds since UNIX epoch (January 1, 1970). | 
| 50 | </div></dd><dt><span class="term">ctime()</span></dt><dd><a id="idm47723005075872" class="indexterm"></a><a id="idm47723005077488" class="indexterm"></a><div class="para"> | 50 | </div></dd><dt><span class="term">ctime()</span></dt><dd><a id="idm47650187235664" class="indexterm"></a><a id="idm47650187237280" class="indexterm"></a><div class="para"> | 
| 51 | Convert number of seconds since UNIX epoch to date. | 51 | Convert number of seconds since UNIX epoch to date. | 
| 52 | </div></dd><dt><span class="term">pp()</span></dt><dd><a id="idm47723005082176" class="indexterm"></a><a id="idm47723005083968" class="indexterm"></a><div class="para"> | 52 | </div></dd><dt><span class="term">pp()</span></dt><dd><a id="idm47650187241952" class="indexterm"></a><a id="idm47650187244384" class="indexterm"></a><div class="para"> | 
| 53 | A string describing the probe point currently being handled. | 53 | A string describing the probe point currently being handled. | 
| 54 | </div></dd><dt><span class="term">thread_indent()</span></dt><dd><a id="idm47723005088400" class="indexterm"></a><a id="idm47723005090352" class="indexterm"></a><div class="para"> | 54 | </div></dd><dt><span class="term">thread_indent()</span></dt><dd><a id="idm47650187249680" class="indexterm"></a><a id="idm47650187250624" class="indexterm"></a><div class="para"> | 
| 55 | This particular function is quite useful in providing you with a way to better organize your print results. The function takes one argument, an indentation delta, which indicates how many spaces to add or remove from a thread's "indentation counter". It then returns a string with some generic trace data along with an appropriate number of indentation spaces. | 55 | This particular function is quite useful in providing you with a way to better organize your print results. The function takes one argument, an indentation delta, which indicates how many spaces to add or remove from a thread's "indentation counter". It then returns a string with some generic trace data along with an appropriate number of indentation spaces. | 
| 56 | </div><div class="para"> | 56 | </div><div class="para"> | 
| 57 | The generic data included in the returned string includes a timestamp (number of microseconds since the first call to <code class="command">thread_indent()</code> by the thread), a process name, and the thread ID. This allows you to identify what functions were called, who called them, and the duration of each function call. | 57 | The generic data included in the returned string includes a timestamp (number of microseconds since the first call to <code class="command">thread_indent()</code> by the thread), a process name, and the thread ID. This allows you to identify what functions were called, who called them, and the duration of each function call. | 
| @@ -94,9 +94,9 @@ probe kernel.function("*@net/socket.c").return | |||
| 94 | An arrow signifying whether the call was an entry (<code class="computeroutput"><-</code>) or an exit (<code class="computeroutput">-></code>); the indentations help you match specific function call entries with their corresponding exits. | 94 | An arrow signifying whether the call was an entry (<code class="computeroutput"><-</code>) or an exit (<code class="computeroutput">-></code>); the indentations help you match specific function call entries with their corresponding exits. | 
| 95 | </div></li><li class="listitem"><div class="para"> | 95 | </div></li><li class="listitem"><div class="para"> | 
| 96 | The name of the function called by the process. | 96 | The name of the function called by the process. | 
| 97 | </div></li></ul></div></dd><dt><span class="term">name</span></dt><dd><a id="idm47722987873392" class="indexterm"></a><a id="idm47722987874368" class="indexterm"></a><a id="idm47722987875744" class="indexterm"></a><div class="para"> | 97 | </div></li></ul></div></dd><dt><span class="term">name</span></dt><dd><a id="idm47650190830992" class="indexterm"></a><a id="idm47650190831968" class="indexterm"></a><a id="idm47650143461104" class="indexterm"></a><div class="para"> | 
| 98 | Identifies the name of a specific system call. This variable can only be used in probes that use the event <code class="command">syscall.<em class="replaceable">system_call</em></code>. | 98 | Identifies the name of a specific system call. This variable can only be used in probes that use the event <code class="command">syscall.<em class="replaceable">system_call</em></code>. | 
| 99 | </div></dd><dt><span class="term">target()</span></dt><dd><a id="idm47722995324592" class="indexterm"></a><a id="idm47722995325888" class="indexterm"></a><div class="para"> | 99 | </div></dd><dt><span class="term">target()</span></dt><dd><a id="idm47650143463376" class="indexterm"></a><a id="idm47650143465152" class="indexterm"></a><div class="para"> | 
| 100 | Used in conjunction with <code class="command">stap <em class="replaceable">script</em> -x <em class="replaceable">process ID</em></code> or <code class="command">stap <em class="replaceable">script</em> -c <em class="replaceable">command</em></code>. If you want to specify a script to take an argument of a process ID or command, use <code class="command">target()</code> as the variable in the script to refer to it. For example: | 100 | Used in conjunction with <code class="command">stap <em class="replaceable">script</em> -x <em class="replaceable">process ID</em></code> or <code class="command">stap <em class="replaceable">script</em> -c <em class="replaceable">command</em></code>. If you want to specify a script to take an argument of a process ID or command, use <code class="command">target()</code> as the variable in the script to refer to it. For example: | 
| 101 | </div><div class="example"><a id="targetexample"> | 101 | </div><div class="example"><a id="targetexample"> | 
| 102 | </a><p class="title"><strong>Example 3.7. targetexample.stp</strong></p><div class="example-contents"><pre class="programlisting">probe syscall.* { | 102 | </a><p class="title"><strong>Example 3.7. targetexample.stp</strong></p><div class="example-contents"><pre class="programlisting">probe syscall.* { | 
| diff --git a/SystemTap_Beginners_Guide/targetavailable.html b/SystemTap_Beginners_Guide/targetavailable.html index 6c40f7b7..01da7f6d 100644 --- a/SystemTap_Beginners_Guide/targetavailable.html +++ b/SystemTap_Beginners_Guide/targetavailable.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.2.3. Checking Target Variable Availability</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="targetvariables.html" title="3.3.2. Target Variables" /><link rel="prev" href="typecasting.html" title="3.3.2.2. Typecasting" /><link rel="next" href="handlerconditionalstatements.html" title="3.3.3. Conditional Statements" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="typecasting.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="handlerconditionalstatements.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="targetavailable"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.2.3. Checking Target Variable Availability</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="targetvariables.html" title="3.3.2. Target Variables" /><link rel="prev" href="typecasting.html" title="3.3.2.2. Typecasting" /><link rel="next" href="handlerconditionalstatements.html" title="3.3.3. Conditional Statements" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="typecasting.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="handlerconditionalstatements.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="targetavailable"> | 
| 3 | </a>3.3.2.3. Checking Target Variable Availability</h4></div></div></div><a id="idm47722990651712" class="indexterm"></a><div class="para"> | 3 | </a>3.3.2.3. Checking Target Variable Availability</h4></div></div></div><a id="idm47650189182448" class="indexterm"></a><div class="para"> | 
| 4 | As code evolves the target variables available may change. The <code class="command">@defined</code> makes it easier to handle those variations in the available target variables. The <code class="command">@defined</code> provides a test to see if a particular target variable is available. The result of this test can be used to select the appropriate expression. | 4 | As code evolves the target variables available may change. The <code class="command">@defined</code> makes it easier to handle those variations in the available target variables. The <code class="command">@defined</code> provides a test to see if a particular target variable is available. The result of this test can be used to select the appropriate expression. | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | The <a class="xref" href="targetavailable.html#available">Example 3.10, “Testing target variable available Example”</a> from the <code class="command">memory.stp</code> tapset provides an probe event alias. Some version of the kernel functions being probed have an argument <code class="command">$flags</code>. When available, the <code class="command">$flags</code> argument is used to generate the local variable <code class="command">write_access</code>. The versions of the probed functions that do not have the <code class="command">$flags</code> argument have a <code class="command">$write</code> argument and that is used instead for the local variable <code class="command">write_access</code>. | 6 | The <a class="xref" href="targetavailable.html#available">Example 3.10, “Testing target variable available Example”</a> from the <code class="command">memory.stp</code> tapset provides an probe event alias. Some version of the kernel functions being probed have an argument <code class="command">$flags</code>. When available, the <code class="command">$flags</code> argument is used to generate the local variable <code class="command">write_access</code>. The versions of the probed functions that do not have the <code class="command">$flags</code> argument have a <code class="command">$write</code> argument and that is used instead for the local variable <code class="command">write_access</code>. | 
| diff --git a/SystemTap_Beginners_Guide/targetvariables.html b/SystemTap_Beginners_Guide/targetvariables.html index 01bd5f94..19583ed4 100644 --- a/SystemTap_Beginners_Guide/targetvariables.html +++ b/SystemTap_Beginners_Guide/targetvariables.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.2. Target Variables</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="prev" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="next" href="typecasting.html" title="3.3.2.2. Typecasting" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="scriptconstructions.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="typecasting.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="targetvariables"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.2. Target Variables</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="prev" href="scriptconstructions.html" title="3.3. Basic SystemTap Handler Constructs" /><link rel="next" href="typecasting.html" title="3.3.2.2. Typecasting" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="scriptconstructions.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="typecasting.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="targetvariables"> | 
| 3 | </a>3.3.2. Target Variables</h3></div></div></div><a id="idm47722997408864" class="indexterm"></a><a id="idm47722997177584" class="indexterm"></a><div class="para"> | 3 | </a>3.3.2. Target Variables</h3></div></div></div><a id="idm47650188965968" class="indexterm"></a><a id="idm47650193397808" class="indexterm"></a><div class="para"> | 
| 4 | The probe events that map to actual locations in the code (for example <code class="command">kernel.function("<em class="replaceable">function</em>")</code> and <code class="command">kernel.statement("<em class="replaceable">statement</em>")</code>) allow the use of <span class="emphasis"><em>target variables</em></span> to obtain the value of variables visible at that location in the code. You can use the <code class="command">-L</code> option to list the target variable available at a probe point. If the debug information is installed for the running kernel, you can run the following command to find out what target variables are available for the <code class="command">vfs_read</code> function: | 4 | The probe events that map to actual locations in the code (for example <code class="command">kernel.function("<em class="replaceable">function</em>")</code> and <code class="command">kernel.statement("<em class="replaceable">statement</em>")</code>) allow the use of <span class="emphasis"><em>target variables</em></span> to obtain the value of variables visible at that location in the code. You can use the <code class="command">-L</code> option to list the target variable available at a probe point. If the debug information is installed for the running kernel, you can run the following command to find out what target variables are available for the <code class="command">vfs_read</code> function: | 
| 5 | </div><pre class="screen">stap -L 'kernel.function("vfs_read")'</pre><div class="para"> | 5 | </div><pre class="screen">stap -L 'kernel.function("vfs_read")'</pre><div class="para"> | 
| 6 | This will yield something similar to the following: | 6 | This will yield something similar to the following: | 
| @@ -36,7 +36,7 @@ current files_stat max_files: 386070 | |||
| 36 | </div></dd><dt><span class="term">kernel_string_n(<em class="replaceable">address</em>, <em class="replaceable">n</em>)</span></dt><dd><div class="para"> | 36 | </div></dd><dt><span class="term">kernel_string_n(<em class="replaceable">address</em>, <em class="replaceable">n</em>)</span></dt><dd><div class="para"> | 
| 37 | Obtain the string at <em class="replaceable">address</em> from the kernel memory and limits the string to <em class="replaceable">n</em> bytes. | 37 | Obtain the string at <em class="replaceable">address</em> from the kernel memory and limits the string to <em class="replaceable">n</em> bytes. | 
| 38 | </div></dd></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="targetprettyprinting"> | 38 | </div></dd></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="targetprettyprinting"> | 
| 39 | </a>3.3.2.1. Pretty Printing Target Variables</h4></div></div></div><a id="idm47722994103248" class="indexterm"></a><div class="para"> | 39 | </a>3.3.2.1. Pretty Printing Target Variables</h4></div></div></div><a id="idm47650199495728" class="indexterm"></a><div class="para"> | 
| 40 | SystemTap scripts are often used to observe what is happening within the code. In many cases just printing the values of the various context variables is sufficient. SystemTap makes a number operations available that can generate printable strings for target variables: | 40 | SystemTap scripts are often used to observe what is happening within the code. In many cases just printing the values of the various context variables is sufficient. SystemTap makes a number operations available that can generate printable strings for target variables: | 
| 41 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">$$vars</span></dt><dd><div class="para"> | 41 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">$$vars</span></dt><dd><div class="para"> | 
| 42 | Expands to a character string that is equivalent to <code class="command">sprintf("parm1=%x ... parmN=%x var1=%x ... varN=%x", parm1, ..., parmN, var1, ..., varN)</code> for each variable in scope at the probe point. Some values may be printed as <span class="quote">“<span class="quote"><code class="command">=?</code></span>”</span> if their run-time location cannot be found. | 42 | Expands to a character string that is equivalent to <code class="command">sprintf("parm1=%x ... parmN=%x var1=%x ... varN=%x", parm1, ..., parmN, var1, ..., varN)</code> for each variable in scope at the probe point. Some values may be printed as <span class="quote">“<span class="quote"><code class="command">=?</code></span>”</span> if their run-time location cannot be found. | 
| diff --git a/SystemTap_Beginners_Guide/threadtimessect.html b/SystemTap_Beginners_Guide/threadtimessect.html index 3b269312..270456d2 100644 --- a/SystemTap_Beginners_Guide/threadtimessect.html +++ b/SystemTap_Beginners_Guide/threadtimessect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.3. Determining Time Spent in Kernel and User Space</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="paracallgraph.html" title="5.3.2. Call Graph Tracing" /><link rel="next" href="timeoutssect.html" title="5.3.4. Monitoring Polling Applications" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="paracallgraph.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="timeoutssect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="threadtimessect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.3. Determining Time Spent in Kernel and User Space</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="paracallgraph.html" title="5.3.2. Call Graph Tracing" /><link rel="next" href="timeoutssect.html" title="5.3.4. Monitoring Polling Applications" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="paracallgraph.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="timeoutssect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="threadtimessect"> | 
| 3 | </a>5.3.3. Determining Time Spent in Kernel and User Space</h3></div></div></div><a id="idm47722990877808" class="indexterm"></a><a id="idm47723005446736" class="indexterm"></a><a id="idm47722988712144" class="indexterm"></a><a id="idm47723001297200" class="indexterm"></a><a id="idm47722990800416" class="indexterm"></a><a id="idm47722999144112" class="indexterm"></a><div class="para"> | 3 | </a>5.3.3. Determining Time Spent in Kernel and User Space</h3></div></div></div><a id="idm47650191053984" class="indexterm"></a><a id="idm47650187922336" class="indexterm"></a><a id="idm47650191275936" class="indexterm"></a><a id="idm47650183483104" class="indexterm"></a><a id="idm47650191378336" class="indexterm"></a><a id="idm47650145370832" class="indexterm"></a><div class="para"> | 
| 4 | This section illustrates how to determine the amount of time any given thread is spending in either kernel or user-space. | 4 | This section illustrates how to determine the amount of time any given thread is spending in either kernel or user-space. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">thread-times.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">thread-times.stp</div> | 
| 6 | 6 | ||
| @@ -40,7 +40,7 @@ probe timer.s(5), end { | |||
| 40 | delete tids | 40 | delete tids | 
| 41 | } | 41 | } | 
| 42 | </pre> | 42 | </pre> | 
| 43 | </div><a id="idm47723009119936" class="indexterm"></a><a id="idm47722995213632" class="indexterm"></a><a id="idm47722951181136" class="indexterm"></a><div class="para"> | 43 | </div><a id="idm47650180862528" class="indexterm"></a><a id="idm47650183346960" class="indexterm"></a><a id="idm47650154336912" class="indexterm"></a><div class="para"> | 
| 44 | <a class="xref" href="threadtimessect.html#threadtimes">thread-times.stp</a> lists the top 20 processes currently taking up CPU time within a 5-second sample, along with the total number of CPU ticks made during the sample. The output of this script also notes the percentage of CPU time each process used, as well as whether that time was spent in kernel space or user space. | 44 | <a class="xref" href="threadtimessect.html#threadtimes">thread-times.stp</a> lists the top 20 processes currently taking up CPU time within a 5-second sample, along with the total number of CPU ticks made during the sample. The output of this script also notes the percentage of CPU time each process used, as well as whether that time was spent in kernel space or user space. | 
| 45 | </div><div class="para"> | 45 | </div><div class="para"> | 
| 46 | <a class="xref" href="threadtimessect.html#threadtimesoutput">Example 5.15, “thread-times.stp Sample Output”</a> contains a 5-second sample of the output for <a class="xref" href="threadtimessect.html#threadtimes">thread-times.stp</a>: | 46 | <a class="xref" href="threadtimessect.html#threadtimesoutput">Example 5.15, “thread-times.stp Sample Output”</a> contains a 5-second sample of the output for <a class="xref" href="threadtimessect.html#threadtimes">thread-times.stp</a>: | 
| diff --git a/SystemTap_Beginners_Guide/timeoutssect.html b/SystemTap_Beginners_Guide/timeoutssect.html index 913a61c2..2a9ecf38 100644 --- a/SystemTap_Beginners_Guide/timeoutssect.html +++ b/SystemTap_Beginners_Guide/timeoutssect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.4. Monitoring Polling Applications</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="threadtimessect.html" title="5.3.3. Determining Time Spent in Kernel and User Space" /><link rel="next" href="topsyssect.html" title="5.3.5. Tracking Most Frequently Used System Calls" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="threadtimessect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="topsyssect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="timeoutssect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.4. Monitoring Polling Applications</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="threadtimessect.html" title="5.3.3. Determining Time Spent in Kernel and User Space" /><link rel="next" href="topsyssect.html" title="5.3.5. Tracking Most Frequently Used System Calls" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="threadtimessect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="topsyssect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="timeoutssect"> | 
| 3 | </a>5.3.4. Monitoring Polling Applications</h3></div></div></div><a id="idm47723003516912" class="indexterm"></a><a id="idm47722993219552" class="indexterm"></a><a id="idm47723002024848" class="indexterm"></a><a id="idm47722988840688" class="indexterm"></a><div class="para"> | 3 | </a>5.3.4. Monitoring Polling Applications</h3></div></div></div><a id="idm47650193327776" class="indexterm"></a><a id="idm47650197460960" class="indexterm"></a><a id="idm47650183513440" class="indexterm"></a><a id="idm47650197216288" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to identify and monitor which applications are polling. Doing so allows you to track unnecessary or excessive polling, which can help you pinpoint areas for improvement in terms of CPU usage and power savings. | 4 | This section describes how to identify and monitor which applications are polling. Doing so allows you to track unnecessary or excessive polling, which can help you pinpoint areas for improvement in terms of CPU usage and power savings. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">timeout.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">timeout.stp</div> | 
| 6 | 6 | ||
| @@ -123,7 +123,7 @@ probe timer.s(1) { | |||
| 123 | <code class="command">nanosleep</code> | 123 | <code class="command">nanosleep</code> | 
| 124 | </div></li><li class="listitem"><div class="para"> | 124 | </div></li><li class="listitem"><div class="para"> | 
| 125 | <code class="command">signal</code> | 125 | <code class="command">signal</code> | 
| 126 | </div></li></ul></div><a id="idm47722989102048" class="indexterm"></a><a id="idm47722955184752" class="indexterm"></a><a id="idm47722988887776" class="indexterm"></a><div class="example"><a id="timeoutsoutput"> | 126 | </div></li></ul></div><a id="idm47650183896752" class="indexterm"></a><a id="idm47650151041696" class="indexterm"></a><a id="idm47650183174080" class="indexterm"></a><div class="example"><a id="timeoutsoutput"> | 
| 127 | </a><p class="title"><strong>Example 5.16. <a class="xref" href="timeoutssect.html#timeouts">timeout.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen"> uid | poll select epoll itimer futex nanosle signal| process | 127 | </a><p class="title"><strong>Example 5.16. <a class="xref" href="timeoutssect.html#timeouts">timeout.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen"> uid | poll select epoll itimer futex nanosle signal| process | 
| 128 | 28937 | 148793 0 0 4727 37288 0 0| firefox | 128 | 28937 | 148793 0 0 4727 37288 0 0| firefox | 
| 129 | 22945 | 0 56949 0 1 0 0 0| scim-bridge | 129 | 22945 | 0 56949 0 1 0 0 0| scim-bridge | 
| diff --git a/SystemTap_Beginners_Guide/topsyssect.html b/SystemTap_Beginners_Guide/topsyssect.html index e8a2247d..4d433db0 100644 --- a/SystemTap_Beginners_Guide/topsyssect.html +++ b/SystemTap_Beginners_Guide/topsyssect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.5. Tracking Most Frequently Used System Calls</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="timeoutssect.html" title="5.3.4. Monitoring Polling Applications" /><link rel="next" href="syscallsbyprocpidsect.html" title="5.3.6. Tracking System Call Volume Per Process" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="timeoutssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="syscallsbyprocpidsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="topsyssect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.3.5. Tracking Most Frequently Used System Calls</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-profiling.html" title="5.3. Profiling" /><link rel="prev" href="timeoutssect.html" title="5.3.4. Monitoring Polling Applications" /><link rel="next" href="syscallsbyprocpidsect.html" title="5.3.6. Tracking System Call Volume Per Process" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="timeoutssect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="syscallsbyprocpidsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="topsyssect"> | 
| 3 | </a>5.3.5. Tracking Most Frequently Used System Calls</h3></div></div></div><a id="idm47723001763888" class="indexterm"></a><a id="idm47722999756032" class="indexterm"></a><a id="idm47722991006944" class="indexterm"></a><a id="idm47722999772400" class="indexterm"></a><div class="para"> | 3 | </a>5.3.5. Tracking Most Frequently Used System Calls</h3></div></div></div><a id="idm47650186638528" class="indexterm"></a><a id="idm47650192688528" class="indexterm"></a><a id="idm47650188823216" class="indexterm"></a><a id="idm47650190862512" class="indexterm"></a><div class="para"> | 
| 4 | <a class="xref" href="timeoutssect.html#timeouts">timeout.stp</a> from <a class="xref" href="timeoutssect.html">Section 5.3.4, “Monitoring Polling Applications”</a> helps you identify which applications are polling by examining a small subset of system calls ( <code class="command">poll</code>, <code class="command">select</code>, <code class="command">epoll</code>, <code class="command">itimer</code>, <code class="command">futex</code>, <code class="command">nanosleep</code>, and <code class="command">signal</code>). However, in some systems, an excessive number of system calls outside that small subset might be responsible for time spent in the kernel. If you suspect that an application is using system calls excessively, you need to identify the most frequently used system calls on the system. To do this, use <a class="xref" href="topsyssect.html#topsys">topsys.stp</a>. | 4 | <a class="xref" href="timeoutssect.html#timeouts">timeout.stp</a> from <a class="xref" href="timeoutssect.html">Section 5.3.4, “Monitoring Polling Applications”</a> helps you identify which applications are polling by examining a small subset of system calls ( <code class="command">poll</code>, <code class="command">select</code>, <code class="command">epoll</code>, <code class="command">itimer</code>, <code class="command">futex</code>, <code class="command">nanosleep</code>, and <code class="command">signal</code>). However, in some systems, an excessive number of system calls outside that small subset might be responsible for time spent in the kernel. If you suspect that an application is using system calls excessively, you need to identify the most frequently used system calls on the system. To do this, use <a class="xref" href="topsyssect.html#topsys">topsys.stp</a>. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">topsys.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">topsys.stp</div> | 
| 6 | 6 | ||
| @@ -31,7 +31,7 @@ probe timer.s(5) { | |||
| 31 | </pre> | 31 | </pre> | 
| 32 | </div><div class="para"> | 32 | </div><div class="para"> | 
| 33 | <a class="xref" href="topsyssect.html#topsys">topsys.stp</a> lists the top 20 system calls used by the system per 5-second interval. It also lists how many times each system call was used during that period. Refer to <a class="xref" href="topsyssect.html#topsysoutput">Example 5.17, “topsys.stp Sample Output”</a> for a sample output. | 33 | <a class="xref" href="topsyssect.html#topsys">topsys.stp</a> lists the top 20 system calls used by the system per 5-second interval. It also lists how many times each system call was used during that period. Refer to <a class="xref" href="topsyssect.html#topsysoutput">Example 5.17, “topsys.stp Sample Output”</a> for a sample output. | 
| 34 | </div><a id="idm47722995626832" class="indexterm"></a><a id="idm47722987953536" class="indexterm"></a><a id="idm47723003734896" class="indexterm"></a><div class="example"><a id="topsysoutput"> | 34 | </div><a id="idm47650193535152" class="indexterm"></a><a id="idm47650189294160" class="indexterm"></a><a id="idm47650190856640" class="indexterm"></a><div class="example"><a id="topsysoutput"> | 
| 35 | </a><p class="title"><strong>Example 5.17. <a class="xref" href="topsyssect.html#topsys">topsys.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">-------------------------------------------------------------- | 35 | </a><p class="title"><strong>Example 5.17. <a class="xref" href="topsyssect.html#topsys">topsys.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">-------------------------------------------------------------- | 
| 36 | SYSCALL COUNT | 36 | SYSCALL COUNT | 
| 37 | gettimeofday 1857 | 37 | gettimeofday 1857 | 
| diff --git a/SystemTap_Beginners_Guide/traceio2sect.html b/SystemTap_Beginners_Guide/traceio2sect.html index cf69592c..7f85db3c 100644 --- a/SystemTap_Beginners_Guide/traceio2sect.html +++ b/SystemTap_Beginners_Guide/traceio2sect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.4. I/O Monitoring (By Device)</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="traceiosect.html" title="5.2.3. Track Cumulative IO" /><link rel="next" href="inodewatchsect.html" title="5.2.5. Monitoring Reads and Writes to a File" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="traceiosect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="inodewatchsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="traceio2sect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.4. I/O Monitoring (By Device)</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="traceiosect.html" title="5.2.3. Track Cumulative IO" /><link rel="next" href="inodewatchsect.html" title="5.2.5. Monitoring Reads and Writes to a File" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="traceiosect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="inodewatchsect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="traceio2sect"> | 
| 3 | </a>5.2.4. I/O Monitoring (By Device)</h3></div></div></div><a id="idm47722952843008" class="indexterm"></a><a id="idm47722949157568" class="indexterm"></a><a id="idm47722988782144" class="indexterm"></a><a id="idm47722997356320" class="indexterm"></a><a id="idm47723005445584" class="indexterm"></a><div class="para"> | 3 | </a>5.2.4. I/O Monitoring (By Device)</h3></div></div></div><a id="idm47650169018336" class="indexterm"></a><a id="idm47650193303728" class="indexterm"></a><a id="idm47650193622400" class="indexterm"></a><a id="idm47650195661008" class="indexterm"></a><a id="idm47650199522576" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to monitor I/O activity on a specific device. | 4 | This section describes how to monitor I/O activity on a specific device. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">traceio2.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">traceio2.stp</div> | 
| 6 | 6 | ||
| @@ -24,9 +24,9 @@ probe vfs.write, vfs.read | |||
| 24 | execname(), pid(), ppfunc(), dev) | 24 | execname(), pid(), ppfunc(), dev) | 
| 25 | } | 25 | } | 
| 26 | </pre> | 26 | </pre> | 
| 27 | </div><a id="idm47722994683296" class="indexterm"></a><a id="idm47722957095264" class="indexterm"></a><a id="idm47722954335152" class="indexterm"></a><a id="idm47722997572880" class="indexterm"></a><a id="idm47723005201008" class="indexterm"></a><a id="idm47722953178288" class="indexterm"></a><div class="para"> | 27 | </div><a id="idm47650154978528" class="indexterm"></a><a id="idm47650190470240" class="indexterm"></a><a id="idm47650187266576" class="indexterm"></a><a id="idm47650185728624" class="indexterm"></a><a id="idm47650144741056" class="indexterm"></a><a id="idm47650190921008" class="indexterm"></a><div class="para"> | 
| 28 | <a class="xref" href="traceio2sect.html#traceio2">traceio2.stp</a> takes 1 argument: the whole device number. To get this number, use <code class="command">stat -c "0x%D" <em class="replaceable">directory</em></code>, where <code class="command"><em class="replaceable">directory</em></code> is located in the device to be monitored. | 28 | <a class="xref" href="traceio2sect.html#traceio2">traceio2.stp</a> takes 1 argument: the whole device number. To get this number, use <code class="command">stat -c "0x%D" <em class="replaceable">directory</em></code>, where <code class="command"><em class="replaceable">directory</em></code> is located in the device to be monitored. | 
| 29 | </div><a id="idm47723005821744" class="indexterm"></a><a id="idm47722998046544" class="indexterm"></a><a id="idm47722986255120" class="indexterm"></a><div class="para"> | 29 | </div><a id="idm47650188680000" class="indexterm"></a><a id="idm47650200005936" class="indexterm"></a><a id="idm47650190347696" class="indexterm"></a><div class="para"> | 
| 30 | The <code class="command">usrdev2kerndev()</code> function converts the whole device number into the format understood by the kernel. The output produced by <code class="command">usrdev2kerndev()</code> is used in conjunction with the <code class="command">MKDEV()</code>, <code class="command">MINOR()</code>, and <code class="command">MAJOR()</code> functions to determine the major and minor numbers of a specific device. | 30 | The <code class="command">usrdev2kerndev()</code> function converts the whole device number into the format understood by the kernel. The output produced by <code class="command">usrdev2kerndev()</code> is used in conjunction with the <code class="command">MKDEV()</code>, <code class="command">MINOR()</code>, and <code class="command">MAJOR()</code> functions to determine the major and minor numbers of a specific device. | 
| 31 | </div><div class="para"> | 31 | </div><div class="para"> | 
| 32 | The output of <a class="xref" href="traceio2sect.html#traceio2">traceio2.stp</a> includes the name and ID of any process performing a read/write, the function it is performing (that is, <code class="command">vfs_read</code> or <code class="command">vfs_write</code>), and the kernel device number. | 32 | The output of <a class="xref" href="traceio2sect.html#traceio2">traceio2.stp</a> includes the name and ID of any process performing a read/write, the function it is performing (that is, <code class="command">vfs_read</code> or <code class="command">vfs_write</code>), and the kernel device number. | 
| diff --git a/SystemTap_Beginners_Guide/traceiosect.html b/SystemTap_Beginners_Guide/traceiosect.html index 37054e35..d8b316df 100644 --- a/SystemTap_Beginners_Guide/traceiosect.html +++ b/SystemTap_Beginners_Guide/traceiosect.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.3. Track Cumulative IO</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="iotimesect.html" title="5.2.2. Tracking I/O Time For Each File Read or Write" /><link rel="next" href="traceio2sect.html" title="5.2.4. I/O Monitoring (By Device)" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="iotimesect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="traceio2sect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="traceiosect"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">5.2.3. Track Cumulative IO</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="mainsect-disk.html" title="5.2. Disk" /><link rel="prev" href="iotimesect.html" title="5.2.2. Tracking I/O Time For Each File Read or Write" /><link rel="next" href="traceio2sect.html" title="5.2.4. I/O Monitoring (By Device)" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="iotimesect.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="traceio2sect.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="traceiosect"> | 
| 3 | </a>5.2.3. Track Cumulative IO</h3></div></div></div><a id="idm47723004464752" class="indexterm"></a><a id="idm47722990995088" class="indexterm"></a><a id="idm47722949179520" class="indexterm"></a><a id="idm47723009167904" class="indexterm"></a><a id="idm47722951203216" class="indexterm"></a><a id="idm47722997995520" class="indexterm"></a><div class="para"> | 3 | </a>5.2.3. Track Cumulative IO</h3></div></div></div><a id="idm47650186606304" class="indexterm"></a><a id="idm47650185813488" class="indexterm"></a><a id="idm47650193228528" class="indexterm"></a><a id="idm47650193009664" class="indexterm"></a><a id="idm47650193555712" class="indexterm"></a><a id="idm47650155655808" class="indexterm"></a><div class="para"> | 
| 4 | This section describes how to track the cumulative amount of I/O to the system. | 4 | This section describes how to track the cumulative amount of I/O to the system. | 
| 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">traceio.stp</div> | 5 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">traceio.stp</div> | 
| 6 | 6 | ||
| @@ -56,7 +56,7 @@ probe timer.s(1) { | |||
| 56 | </pre> | 56 | </pre> | 
| 57 | </div><div class="para"> | 57 | </div><div class="para"> | 
| 58 | <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> prints the top ten executables generating I/O traffic over time. In addition, it also tracks the cumulative amount of I/O reads and writes done by those ten executables. This information is tracked and printed out in 1-second intervals, and in descending order. | 58 | <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> prints the top ten executables generating I/O traffic over time. In addition, it also tracks the cumulative amount of I/O reads and writes done by those ten executables. This information is tracked and printed out in 1-second intervals, and in descending order. | 
| 59 | </div><a id="idm47722999692544" class="indexterm"></a><a id="idm47722998171952" class="indexterm"></a><a id="idm47722995799600" class="indexterm"></a><div class="para"> | 59 | </div><a id="idm47650192555152" class="indexterm"></a><a id="idm47650191401200" class="indexterm"></a><a id="idm47650180891792" class="indexterm"></a><div class="para"> | 
| 60 | Note that <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> also uses the local variable <code class="command">$return</code>, which is also used by <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> from <a class="xref" href="mainsect-disk.html#disktop">Section 5.2.1, “Summarizing Disk Read/Write Traffic”</a>. | 60 | Note that <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> also uses the local variable <code class="command">$return</code>, which is also used by <a class="xref" href="mainsect-disk.html#scriptdisktop">disktop.stp</a> from <a class="xref" href="mainsect-disk.html#disktop">Section 5.2.1, “Summarizing Disk Read/Write Traffic”</a>. | 
| 61 | </div><div class="example"><a id="traceiooutput"> | 61 | </div><div class="example"><a id="traceiooutput"> | 
| 62 | </a><p class="title"><strong>Example 5.8. <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 62 | </a><p class="title"><strong>Example 5.8. <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">[...] | 
| diff --git a/SystemTap_Beginners_Guide/typecasting.html b/SystemTap_Beginners_Guide/typecasting.html index c2873771..4bdc9326 100644 --- a/SystemTap_Beginners_Guide/typecasting.html +++ b/SystemTap_Beginners_Guide/typecasting.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.2.2. Typecasting</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="targetvariables.html" title="3.3.2. Target Variables" /><link rel="prev" href="targetvariables.html" title="3.3.2. Target Variables" /><link rel="next" href="targetavailable.html" title="3.3.2.3. Checking Target Variable Availability" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="targetvariables.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="targetavailable.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="typecasting"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.3.2.2. Typecasting</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="targetvariables.html" title="3.3.2. Target Variables" /><link rel="prev" href="targetvariables.html" title="3.3.2. Target Variables" /><link rel="next" href="targetavailable.html" title="3.3.2.3. Checking Target Variable Availability" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="targetvariables.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="targetavailable.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="typecasting"> | 
| 3 | </a>3.3.2.2. Typecasting</h4></div></div></div><a id="idm47723005408528" class="indexterm"></a><div class="para"> | 3 | </a>3.3.2.2. Typecasting</h4></div></div></div><a id="idm47650185675472" class="indexterm"></a><div class="para"> | 
| 4 | In most cases SystemTap can determine a variable's type from the debug information. However, code may use void pointers for variables (for example memory allocation routines) and typing information is not available. Also the typing information available within a probe handler is not available within a function; SystemTap functions arguments use a long in place of a typed pointer. SystemTap's <code class="command">@cast</code> operator (first available in SystemTap 0.9) can be used to indicate the correct type of the object. | 4 | In most cases SystemTap can determine a variable's type from the debug information. However, code may use void pointers for variables (for example memory allocation routines) and typing information is not available. Also the typing information available within a probe handler is not available within a function; SystemTap functions arguments use a long in place of a typed pointer. SystemTap's <code class="command">@cast</code> operator (first available in SystemTap 0.9) can be used to indicate the correct type of the object. | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | The <a class="xref" href="typecasting.html#casting">Example 3.9, “Casting Example”</a> is from the <code class="command">task.stp</code> tapset. The function returns the value of the <code class="command">state</code> field from a <code class="command">task_struct</code> pointed to by the long <code class="command">task</code>. The first argument of the <code class="command">@cast</code> operator, <code class="command">task</code>, is the pointer to the object. The second argument is the type to cast the object to, <code class="command">task_struct</code>. The third argument lists what file that the type definition information comes from and is optional. With the <code class="command">@cast</code> operator the various fields of this particular <code class="command">task_struct</code> <code class="command">task</code> can be accessed; in this example the <code class="command">state</code> field is obtained. | 6 | The <a class="xref" href="typecasting.html#casting">Example 3.9, “Casting Example”</a> is from the <code class="command">task.stp</code> tapset. The function returns the value of the <code class="command">state</code> field from a <code class="command">task_struct</code> pointed to by the long <code class="command">task</code>. The first argument of the <code class="command">@cast</code> operator, <code class="command">task</code>, is the pointer to the object. The second argument is the type to cast the object to, <code class="command">task_struct</code>. The third argument lists what file that the type definition information comes from and is optional. With the <code class="command">@cast</code> operator the various fields of this particular <code class="command">task_struct</code> <code class="command">task</code> can be accessed; in this example the <code class="command">state</code> field is obtained. | 
| diff --git a/SystemTap_Beginners_Guide/understanding-how-systemtap-works.html b/SystemTap_Beginners_Guide/understanding-how-systemtap-works.html index 8dd491ef..0e5adfde 100644 --- a/SystemTap_Beginners_Guide/understanding-how-systemtap-works.html +++ b/SystemTap_Beginners_Guide/understanding-how-systemtap-works.html | |||
| @@ -1,16 +1,16 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 3. Understanding How SystemTap Works</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="using-usage.html" title="2.3. Running SystemTap Scripts" /><link rel="next" href="scripts.html" title="3.2. SystemTap Scripts" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="using-usage.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="scripts.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="understanding-how-systemtap-works"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 3. Understanding How SystemTap Works</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="using-usage.html" title="2.3. Running SystemTap Scripts" /><link rel="next" href="scripts.html" title="3.2. SystemTap Scripts" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="using-usage.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="scripts.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="understanding-how-systemtap-works"> | 
| 3 | </a>Chapter 3. Understanding How SystemTap Works</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="understanding-how-systemtap-works.html#understanding-architecture-tools">3.1. Architecture</a></span></dt><dt><span class="section"><a href="scripts.html">3.2. SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="scripts.html#systemtapscript-events">3.2.1. Event</a></span></dt><dt><span class="section"><a href="systemtapscript-handler.html">3.2.2. SystemTap Handler/Body</a></span></dt></dl></dd><dt><span class="section"><a href="scriptconstructions.html">3.3. Basic SystemTap Handler Constructs</a></span></dt><dd><dl><dt><span class="section"><a href="scriptconstructions.html#variablesconstructs">3.3.1. Variables</a></span></dt><dt><span class="section"><a href="targetvariables.html">3.3.2. Target Variables</a></span></dt><dt><span class="section"><a href="handlerconditionalstatements.html">3.3.3. Conditional Statements</a></span></dt><dt><span class="section"><a href="commandlineargssect.html">3.3.4. Command-Line Arguments</a></span></dt></dl></dd><dt><span class="section"><a href="associativearrays.html">3.4. Associative Arrays</a></span></dt><dt><span class="section"><a href="arrayoperators.html">3.5. Array Operations in SystemTap</a></span></dt><dd><dl><dt><span class="section"><a href="arrayoperators.html#arrayops-assignvalue">3.5.1. Assigning an Associated Value</a></span></dt><dt><span class="section"><a href="arrayops-readvalues.html">3.5.2. Reading Values From Arrays</a></span></dt><dt><span class="section"><a href="arrayops-increment.html">3.5.3. Incrementing Associated Values</a></span></dt><dt><span class="section"><a href="arrayops-foreach.html">3.5.4. Processing Multiple Elements in an Array</a></span></dt><dt><span class="section"><a href="arrayops-deleting.html">3.5.5. Clearing/Deleting Arrays and Array Elements</a></span></dt><dt><span class="section"><a href="arrayops-conditionals.html">3.5.6. Using Arrays in Conditional Statements</a></span></dt><dt><span class="section"><a href="arrayops-aggregates.html">3.5.7. Computing for Statistical Aggregates</a></span></dt></dl></dd><dt><span class="section"><a href="understanding-tapsets.html">3.6. Tapsets</a></span></dt></dl></div><a id="idm47722995088960" class="indexterm"></a><div class="para"> | 3 | </a>Chapter 3. Understanding How SystemTap Works</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="understanding-how-systemtap-works.html#understanding-architecture-tools">3.1. Architecture</a></span></dt><dt><span class="section"><a href="scripts.html">3.2. SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="scripts.html#systemtapscript-events">3.2.1. Event</a></span></dt><dt><span class="section"><a href="systemtapscript-handler.html">3.2.2. SystemTap Handler/Body</a></span></dt></dl></dd><dt><span class="section"><a href="scriptconstructions.html">3.3. Basic SystemTap Handler Constructs</a></span></dt><dd><dl><dt><span class="section"><a href="scriptconstructions.html#variablesconstructs">3.3.1. Variables</a></span></dt><dt><span class="section"><a href="targetvariables.html">3.3.2. Target Variables</a></span></dt><dt><span class="section"><a href="handlerconditionalstatements.html">3.3.3. Conditional Statements</a></span></dt><dt><span class="section"><a href="commandlineargssect.html">3.3.4. Command-Line Arguments</a></span></dt></dl></dd><dt><span class="section"><a href="associativearrays.html">3.4. Associative Arrays</a></span></dt><dt><span class="section"><a href="arrayoperators.html">3.5. Array Operations in SystemTap</a></span></dt><dd><dl><dt><span class="section"><a href="arrayoperators.html#arrayops-assignvalue">3.5.1. Assigning an Associated Value</a></span></dt><dt><span class="section"><a href="arrayops-readvalues.html">3.5.2. Reading Values From Arrays</a></span></dt><dt><span class="section"><a href="arrayops-increment.html">3.5.3. Incrementing Associated Values</a></span></dt><dt><span class="section"><a href="arrayops-foreach.html">3.5.4. Processing Multiple Elements in an Array</a></span></dt><dt><span class="section"><a href="arrayops-deleting.html">3.5.5. Clearing/Deleting Arrays and Array Elements</a></span></dt><dt><span class="section"><a href="arrayops-conditionals.html">3.5.6. Using Arrays in Conditional Statements</a></span></dt><dt><span class="section"><a href="arrayops-aggregates.html">3.5.7. Computing for Statistical Aggregates</a></span></dt></dl></dd><dt><span class="section"><a href="understanding-tapsets.html">3.6. Tapsets</a></span></dt></dl></div><a id="idm47650188571408" class="indexterm"></a><div class="para"> | 
| 4 | 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. | 4 | 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. | 
| 5 | </div><a id="idm47722995090304" class="indexterm"></a><a id="idm47722995092208" class="indexterm"></a><a id="idm47722995095200" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650188572816" class="indexterm"></a><a id="idm47650188574512" class="indexterm"></a><a id="idm47650188578272" class="indexterm"></a><div class="para"> | 
| 6 | The essential idea behind a SystemTap script is to name <span class="emphasis"><em>events</em></span>, and to give them <span class="emphasis"><em>handlers</em></span>. When SystemTap runs the script, SystemTap monitors for the event; once the event occurs, the Linux kernel then runs the handler as a quick sub-routine, then resumes. | 6 | The essential idea behind a SystemTap script is to name <span class="emphasis"><em>events</em></span>, and to give them <span class="emphasis"><em>handlers</em></span>. When SystemTap runs the script, SystemTap monitors for the event; once the event occurs, the Linux kernel then runs the handler as a quick sub-routine, then resumes. | 
| 7 | </div><a id="idm47722995096992" class="indexterm"></a><a id="idm47722995098192" class="indexterm"></a><div class="para"> | 7 | </div><a id="idm47650188579504" class="indexterm"></a><a id="idm47650154625664" class="indexterm"></a><div class="para"> | 
| 8 | There are several kind of events; entering/exiting a function, timer expiration, session termination, etc. A handler is a series of script language statements that specify the work to be done whenever the event occurs. This work normally includes extracting data from the event context, storing them into internal variables, and printing results. | 8 | There are several kind of events; entering/exiting a function, timer expiration, session termination, etc. A handler is a series of script language statements that specify the work to be done whenever the event occurs. This work normally includes extracting data from the event context, storing them into internal variables, and printing results. | 
| 9 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="understanding-architecture-tools"> | 9 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="understanding-architecture-tools"> | 
| 10 | </a>3.1. Architecture</h2></div></div></div><a id="idm47722995102320" class="indexterm"></a><a id="idm47722995104208" class="indexterm"></a><a id="idm47722995105248" class="indexterm"></a><div class="para"> | 10 | </a>3.1. Architecture</h2></div></div></div><a id="idm47650154629120" class="indexterm"></a><a id="idm47650154630528" class="indexterm"></a><a id="idm47650154631488" class="indexterm"></a><div class="para"> | 
| 11 | A SystemTap session begins when you run a SystemTap script. This session occurs in the following fashion: | 11 | A SystemTap session begins when you run a SystemTap script. This session occurs in the following fashion: | 
| 12 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="procedure"><a id="systemtapsession"> | 12 | </div><div xmlns:d="http://docbook.org/ns/docbook" class="procedure"><a id="systemtapsession"> | 
| 13 | </a><p class="title"><strong>Procedure 3.1. SystemTap Session</strong></p><a id="idm47722995107712" class="indexterm"></a><a id="idm47722995108864" class="indexterm"></a><a id="idm47722995109856" class="indexterm"></a><ol class="1"><li class="step"><div class="para"> | 13 | </a><p class="title"><strong>Procedure 3.1. SystemTap Session</strong></p><a id="idm47650154633856" class="indexterm"></a><a id="idm47650154635664" class="indexterm"></a><a id="idm47650154636656" class="indexterm"></a><ol class="1"><li class="step"><div class="para"> | 
| 14 | First, SystemTap checks the script against the existing tapset library (normally in <code class="filename">/usr/share/systemtap/tapset/</code> for any tapsets used. SystemTap will then substitute any located tapsets with their corresponding definitions in the tapset library. | 14 | First, SystemTap checks the script against the existing tapset library (normally in <code class="filename">/usr/share/systemtap/tapset/</code> for any tapsets used. SystemTap will then substitute any located tapsets with their corresponding definitions in the tapset library. | 
| 15 | </div></li><li class="step"><div class="para"> | 15 | </div></li><li class="step"><div class="para"> | 
| 16 | SystemTap then translates the script to C, running the system C compiler to create a kernel module from it. The tools that perform this step are contained in the <code class="filename">systemtap</code> package (refer to <a class="xref" href="using-systemtap.html#installproper">Section 2.1.1, “Installing SystemTap”</a> for more information). | 16 | SystemTap then translates the script to C, running the system C compiler to create a kernel module from it. The tools that perform this step are contained in the <code class="filename">systemtap</code> package (refer to <a class="xref" href="using-systemtap.html#installproper">Section 2.1.1, “Installing SystemTap”</a> for more information). | 
| diff --git a/SystemTap_Beginners_Guide/understanding-tapsets.html b/SystemTap_Beginners_Guide/understanding-tapsets.html index a8f34b59..95f1ee52 100644 --- a/SystemTap_Beginners_Guide/understanding-tapsets.html +++ b/SystemTap_Beginners_Guide/understanding-tapsets.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.6. Tapsets</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="arrayops-aggregates.html" title="3.5.7. Computing for Statistical Aggregates" /><link rel="next" href="userspace-probing.html" title="Chapter 4. User-space Probing" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-aggregates.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="userspace-probing.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="understanding-tapsets"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">3.6. Tapsets</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /><link rel="prev" href="arrayops-aggregates.html" title="3.5.7. Computing for Statistical Aggregates" /><link rel="next" href="userspace-probing.html" title="Chapter 4. User-space Probing" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="arrayops-aggregates.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="userspace-probing.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="understanding-tapsets"> | 
| 3 | </a>3.6. Tapsets</h2></div></div></div><a id="idm47722990780720" class="indexterm"></a><div class="para"> | 3 | </a>3.6. Tapsets</h2></div></div></div><a id="idm47650196242992" class="indexterm"></a><div class="para"> | 
| 4 | <em class="firstterm">Tapsets</em> are scripts that form a library of pre-written probes and functions to be used in SystemTap scripts. When a user runs a SystemTap script, SystemTap checks the script's probe events and handlers against the tapset library; SystemTap then loads the corresponding probes and functions before translating the script to C (refer to <a class="xref" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Section 3.1, “Architecture”</a> for information on what transpires in a SystemTap session). | 4 | <em class="firstterm">Tapsets</em> are scripts that form a library of pre-written probes and functions to be used in SystemTap scripts. When a user runs a SystemTap script, SystemTap checks the script's probe events and handlers against the tapset library; SystemTap then loads the corresponding probes and functions before translating the script to C (refer to <a class="xref" href="understanding-how-systemtap-works.html#understanding-architecture-tools">Section 3.1, “Architecture”</a> for information on what transpires in a SystemTap session). | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | Like SystemTap scripts, tapsets use the file name extension <code class="filename">.stp</code>. The standard library of tapsets is located in <code class="filename">/usr/share/systemtap/tapset/</code> by default. However, unlike SystemTap scripts, tapsets are not meant for direct execution; rather, they constitute the library from which other scripts can pull definitions. | 6 | Like SystemTap scripts, tapsets use the file name extension <code class="filename">.stp</code>. The standard library of tapsets is located in <code class="filename">/usr/share/systemtap/tapset/</code> by default. However, unlike SystemTap scripts, tapsets are not meant for direct execution; rather, they constitute the library from which other scripts can pull definitions. | 
| diff --git a/SystemTap_Beginners_Guide/useful-systemtap-scripts.html b/SystemTap_Beginners_Guide/useful-systemtap-scripts.html index 6dfa04ff..75043c7e 100644 --- a/SystemTap_Beginners_Guide/useful-systemtap-scripts.html +++ b/SystemTap_Beginners_Guide/useful-systemtap-scripts.html | |||
| @@ -1,12 +1,12 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 5. Useful SystemTap Scripts</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="ustack.html" title="4.3. User-Space Stack Backtraces" /><link rel="next" href="mainsect-disk.html" title="5.2. Disk" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="ustack.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="mainsect-disk.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="useful-systemtap-scripts"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 5. Useful SystemTap Scripts</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="ustack.html" title="4.3. User-Space Stack Backtraces" /><link rel="next" href="mainsect-disk.html" title="5.2. Disk" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="ustack.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="mainsect-disk.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="useful-systemtap-scripts"> | 
| 3 | </a>Chapter 5. Useful SystemTap Scripts</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="useful-systemtap-scripts.html#mainsect-network">5.1. Network</a></span></dt><dd><dl><dt><span class="section"><a href="useful-systemtap-scripts.html#nettopsect">5.1.1. Network Profiling</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#sockettracesect">5.1.2. Tracing Functions Called in Network Socket Code</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpconnectionssect">5.1.3. Monitoring Incoming TCP Connections</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpdumplikesect">5.1.4. Monitoring TCP Packets</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#dropwatchsect">5.1.5. Monitoring Network Packets Drops in Kernel</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-disk.html">5.2. Disk</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-disk.html#disktop">5.2.1. Summarizing Disk Read/Write Traffic</a></span></dt><dt><span class="section"><a href="iotimesect.html">5.2.2. Tracking I/O Time For Each File Read or Write</a></span></dt><dt><span class="section"><a href="traceiosect.html">5.2.3. Track Cumulative IO</a></span></dt><dt><span class="section"><a href="traceio2sect.html">5.2.4. I/O Monitoring (By Device)</a></span></dt><dt><span class="section"><a href="inodewatchsect.html">5.2.5. Monitoring Reads and Writes to a File</a></span></dt><dt><span class="section"><a href="inodewatch2sect.html">5.2.6. Monitoring Changes to File Attributes</a></span></dt><dt><span class="section"><a href="ioblktimesect.html">5.2.7. Periodically Print I/O Block Time</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-profiling.html">5.3. Profiling</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-profiling.html#countcallssect">5.3.1. Counting Function Calls Made</a></span></dt><dt><span class="section"><a href="paracallgraph.html">5.3.2. Call Graph Tracing</a></span></dt><dt><span class="section"><a href="threadtimessect.html">5.3.3. Determining Time Spent in Kernel and User Space</a></span></dt><dt><span class="section"><a href="timeoutssect.html">5.3.4. Monitoring Polling Applications</a></span></dt><dt><span class="section"><a href="topsyssect.html">5.3.5. Tracking Most Frequently Used System Calls</a></span></dt><dt><span class="section"><a href="syscallsbyprocpidsect.html">5.3.6. Tracking System Call Volume Per Process</a></span></dt></dl></dd><dt><span class="section"><a href="futexcontentionsect.html">5.4. Identifying Contended User-Space Locks</a></span></dt></dl></div><a id="idm47722994623920" class="indexterm"></a><a id="idm47722994625328" class="indexterm"></a><a id="idm47722994626256" class="indexterm"></a><a id="idm47722994627184" class="indexterm"></a><div class="para"> | 3 | </a>Chapter 5. Useful SystemTap Scripts</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="useful-systemtap-scripts.html#mainsect-network">5.1. Network</a></span></dt><dd><dl><dt><span class="section"><a href="useful-systemtap-scripts.html#nettopsect">5.1.1. Network Profiling</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#sockettracesect">5.1.2. Tracing Functions Called in Network Socket Code</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpconnectionssect">5.1.3. Monitoring Incoming TCP Connections</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#tcpdumplikesect">5.1.4. Monitoring TCP Packets</a></span></dt><dt><span class="section"><a href="useful-systemtap-scripts.html#dropwatchsect">5.1.5. Monitoring Network Packets Drops in Kernel</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-disk.html">5.2. Disk</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-disk.html#disktop">5.2.1. Summarizing Disk Read/Write Traffic</a></span></dt><dt><span class="section"><a href="iotimesect.html">5.2.2. Tracking I/O Time For Each File Read or Write</a></span></dt><dt><span class="section"><a href="traceiosect.html">5.2.3. Track Cumulative IO</a></span></dt><dt><span class="section"><a href="traceio2sect.html">5.2.4. I/O Monitoring (By Device)</a></span></dt><dt><span class="section"><a href="inodewatchsect.html">5.2.5. Monitoring Reads and Writes to a File</a></span></dt><dt><span class="section"><a href="inodewatch2sect.html">5.2.6. Monitoring Changes to File Attributes</a></span></dt><dt><span class="section"><a href="ioblktimesect.html">5.2.7. Periodically Print I/O Block Time</a></span></dt></dl></dd><dt><span class="section"><a href="mainsect-profiling.html">5.3. Profiling</a></span></dt><dd><dl><dt><span class="section"><a href="mainsect-profiling.html#countcallssect">5.3.1. Counting Function Calls Made</a></span></dt><dt><span class="section"><a href="paracallgraph.html">5.3.2. Call Graph Tracing</a></span></dt><dt><span class="section"><a href="threadtimessect.html">5.3.3. Determining Time Spent in Kernel and User Space</a></span></dt><dt><span class="section"><a href="timeoutssect.html">5.3.4. Monitoring Polling Applications</a></span></dt><dt><span class="section"><a href="topsyssect.html">5.3.5. Tracking Most Frequently Used System Calls</a></span></dt><dt><span class="section"><a href="syscallsbyprocpidsect.html">5.3.6. Tracking System Call Volume Per Process</a></span></dt></dl></dd><dt><span class="section"><a href="futexcontentionsect.html">5.4. Identifying Contended User-Space Locks</a></span></dt></dl></div><a id="idm47650147747024" class="indexterm"></a><a id="idm47650147748880" class="indexterm"></a><a id="idm47650147749808" class="indexterm"></a><a id="idm47650147750736" class="indexterm"></a><div class="para"> | 
| 4 | This chapter enumerates several SystemTap scripts you can use to monitor and investigate different subsystems. All of these scripts are available at <code class="filename">/usr/share/systemtap/testsuite/systemtap.examples/</code> once you install the <code class="filename">systemtap-testsuite</code> RPM. | 4 | This chapter enumerates several SystemTap scripts you can use to monitor and investigate different subsystems. All of these scripts are available at <code class="filename">/usr/share/systemtap/testsuite/systemtap.examples/</code> once you install the <code class="filename">systemtap-testsuite</code> RPM. | 
| 5 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="mainsect-network"> | 5 | </div><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="mainsect-network"> | 
| 6 | </a>5.1. Network</h2></div></div></div><div class="para"> | 6 | </a>5.1. Network</h2></div></div></div><div class="para"> | 
| 7 | The following sections showcase scripts that trace network-related functions and build a profile of network activity. | 7 | The following sections showcase scripts that trace network-related functions and build a profile of network activity. | 
| 8 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="nettopsect"> | 8 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="nettopsect"> | 
| 9 | </a>5.1.1. Network Profiling</h3></div></div></div><a id="idm47722994045808" class="indexterm"></a><a id="idm47722994047264" class="indexterm"></a><a id="idm47722994048704" class="indexterm"></a><a id="idm47723004351808" class="indexterm"></a><a id="idm47723004353280" class="indexterm"></a><div class="para"> | 9 | </a>5.1.1. Network Profiling</h3></div></div></div><a id="idm47650144404048" class="indexterm"></a><a id="idm47650144405488" class="indexterm"></a><a id="idm47650144405776" class="indexterm"></a><a id="idm47650169076368" class="indexterm"></a><a id="idm47650169077840" class="indexterm"></a><div class="para"> | 
| 10 | This section describes how to profile network activity. <a class="xref" href="useful-systemtap-scripts.html#nettop">nettop.stp</a> provides a glimpse into how much network traffic each process is generating on a machine. | 10 | This section describes how to profile network activity. <a class="xref" href="useful-systemtap-scripts.html#nettop">nettop.stp</a> provides a glimpse into how much network traffic each process is generating on a machine. | 
| 11 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">nettop.stp</div> | 11 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">nettop.stp</div> | 
| 12 | 12 | ||
| @@ -59,7 +59,7 @@ probe timer.ms(5000), end, error | |||
| 59 | print_activity() | 59 | print_activity() | 
| 60 | } | 60 | } | 
| 61 | </pre> | 61 | </pre> | 
| 62 | </div><a id="idm47723009371904" class="indexterm"></a><a id="idm47722988598352" class="indexterm"></a><a id="idm47723005353072" class="indexterm"></a><div class="para"> | 62 | </div><a id="idm47650184985408" class="indexterm"></a><a id="idm47650197474112" class="indexterm"></a><a id="idm47650184995264" class="indexterm"></a><div class="para"> | 
| 63 | Note that <code class="command">function print_activity()</code> uses the following expressions: | 63 | Note that <code class="command">function print_activity()</code> uses the following expressions: | 
| 64 | </div><pre class="screen">n_xmit ? @sum(ifxmit[pid, dev, exec, uid])/1024 : 0 | 64 | </div><pre class="screen">n_xmit ? @sum(ifxmit[pid, dev, exec, uid])/1024 : 0 | 
| 65 | n_recv ? @sum(ifrecv[pid, dev, exec, uid])/1024 : 0</pre><div class="para"> | 65 | n_recv ? @sum(ifrecv[pid, dev, exec, uid])/1024 : 0</pre><div class="para"> | 
| @@ -110,7 +110,7 @@ else | |||
| 110 | 11362 0 eth0 0 7 0 0 firefox | 110 | 11362 0 eth0 0 7 0 0 firefox | 
| 111 | 3897 0 eth0 0 1 0 0 multiload-apple | 111 | 3897 0 eth0 0 1 0 0 multiload-apple | 
| 112 | [...]</pre></div></div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="sockettracesect"> | 112 | [...]</pre></div></div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="sockettracesect"> | 
| 113 | </a>5.1.2. Tracing Functions Called in Network Socket Code</h3></div></div></div><a id="idm47722987701520" class="indexterm"></a><a id="idm47723001513968" class="indexterm"></a><a id="idm47722954958784" class="indexterm"></a><a id="idm47722990541600" class="indexterm"></a><a id="idm47722995464416" class="indexterm"></a><a id="idm47722994042528" class="indexterm"></a><a id="idm47723004460096" class="indexterm"></a><a id="idm47723003847504" class="indexterm"></a><div class="para"> | 113 | </a>5.1.2. Tracing Functions Called in Network Socket Code</h3></div></div></div><a id="idm47650144257488" class="indexterm"></a><a id="idm47650150928688" class="indexterm"></a><a id="idm47650185668240" class="indexterm"></a><a id="idm47650143696224" class="indexterm"></a><a id="idm47650193498080" class="indexterm"></a><a id="idm47650154439360" class="indexterm"></a><a id="idm47650146434656" class="indexterm"></a><a id="idm47650184836800" class="indexterm"></a><div class="para"> | 
| 114 | This section describes how to trace functions called from the kernel's <code class="filename">net/socket.c</code> file. This task helps you identify, in finer detail, how each process interacts with the network at the kernel level. | 114 | This section describes how to trace functions called from the kernel's <code class="filename">net/socket.c</code> file. This task helps you identify, in finer detail, how each process interacts with the network at the kernel level. | 
| 115 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">socket-trace.stp</div> | 115 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">socket-trace.stp</div> | 
| 116 | 116 | ||
| @@ -148,7 +148,7 @@ probe kernel.function("*@net/socket.c").return { | |||
| 148 | [...]</pre></div></div><div class="para"> | 148 | [...]</pre></div></div><div class="para"> | 
| 149 | <a class="xref" href="useful-systemtap-scripts.html#sockettraceoutput">Example 5.2, “socket-trace.stp Sample Output”</a> contains a 3-second excerpt of the output for <a class="xref" href="useful-systemtap-scripts.html#sockettrace">socket-trace.stp</a>. For more information about the output of this script as provided by <code class="command">thread_indent()</code>, refer to <a class="xref" href="systemtapscript-handler.html#systemtapscript-functions">SystemTap Functions</a> <a class="xref" href="systemtapscript-handler.html#thread_indent">Example 3.6, “thread_indent.stp”</a>. | 149 | <a class="xref" href="useful-systemtap-scripts.html#sockettraceoutput">Example 5.2, “socket-trace.stp Sample Output”</a> contains a 3-second excerpt of the output for <a class="xref" href="useful-systemtap-scripts.html#sockettrace">socket-trace.stp</a>. For more information about the output of this script as provided by <code class="command">thread_indent()</code>, refer to <a class="xref" href="systemtapscript-handler.html#systemtapscript-functions">SystemTap Functions</a> <a class="xref" href="systemtapscript-handler.html#thread_indent">Example 3.6, “thread_indent.stp”</a>. | 
| 150 | </div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="tcpconnectionssect"> | 150 | </div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="tcpconnectionssect"> | 
| 151 | </a>5.1.3. Monitoring Incoming TCP Connections</h3></div></div></div><a id="idm47722997599296" class="indexterm"></a><a id="idm47722960498400" class="indexterm"></a><a id="idm47723005007504" class="indexterm"></a><a id="idm47722957257248" class="indexterm"></a><a id="idm47722995371152" class="indexterm"></a><div class="para"> | 151 | </a>5.1.3. Monitoring Incoming TCP Connections</h3></div></div></div><a id="idm47650193145008" class="indexterm"></a><a id="idm47650144690064" class="indexterm"></a><a id="idm47650187016512" class="indexterm"></a><a id="idm47650147600432" class="indexterm"></a><a id="idm47650196268144" class="indexterm"></a><div class="para"> | 
| 152 | This section illustrates how to monitor incoming TCP connections. This task is useful in identifying any unauthorized, suspicious, or otherwise unwanted network access requests in real time. | 152 | This section illustrates how to monitor incoming TCP connections. This task is useful in identifying any unauthorized, suspicious, or otherwise unwanted network access requests in real time. | 
| 153 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">tcp_connections.stp</div> | 153 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">tcp_connections.stp</div> | 
| 154 | 154 | ||
| @@ -183,7 +183,7 @@ probe kernel.function("tcp_accept").return?, | |||
| 183 | </a><p class="title"><strong>Example 5.3. <a class="xref" href="useful-systemtap-scripts.html#tcpconnections">tcp_connections.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">UID CMD PID PORT IP_SOURCE | 183 | </a><p class="title"><strong>Example 5.3. <a class="xref" href="useful-systemtap-scripts.html#tcpconnections">tcp_connections.stp</a> Sample Output</strong></p><div class="example-contents"><pre class="screen">UID CMD PID PORT IP_SOURCE | 
| 184 | 0 sshd 3165 22 10.64.0.227 | 184 | 0 sshd 3165 22 10.64.0.227 | 
| 185 | 0 sshd 3165 22 10.64.0.227</pre></div></div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="tcpdumplikesect"> | 185 | 0 sshd 3165 22 10.64.0.227</pre></div></div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="tcpdumplikesect"> | 
| 186 | </a>5.1.4. Monitoring TCP Packets</h3></div></div></div><a id="idm47723004525712" class="indexterm"></a><a id="idm47722999951600" class="indexterm"></a><a id="idm47722999611664" class="indexterm"></a><a id="idm47722987962128" class="indexterm"></a><a id="idm47723004350832" class="indexterm"></a><div class="para"> | 186 | </a>5.1.4. Monitoring TCP Packets</h3></div></div></div><a id="idm47650188765376" class="indexterm"></a><a id="idm47650196094576" class="indexterm"></a><a id="idm47650182902208" class="indexterm"></a><a id="idm47650180892384" class="indexterm"></a><a id="idm47650183780016" class="indexterm"></a><div class="para"> | 
| 187 | This section illustrates how to monitor TCP packets received by the system. This is useful in analyzing network traffic generated by applications running on the system. | 187 | This section illustrates how to monitor TCP packets received by the system. This is useful in analyzing network traffic generated by applications running on the system. | 
| 188 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">tcpdumplike.stp</div> | 188 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">tcpdumplike.stp</div> | 
| 189 | 189 | ||
| @@ -247,8 +247,8 @@ probe tcp.receive { | |||
| 247 | 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 | 247 | 209.85.229.147 10.0.2.15 80 21141 0 1 1 0 0 0 | 
| 248 | 209.85.229.118 10.0.2.15 80 63433 0 1 1 0 0 0 | 248 | 209.85.229.118 10.0.2.15 80 63433 0 1 1 0 0 0 | 
| 249 | [...]</pre></div></div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="dropwatchsect"> | 249 | [...]</pre></div></div></div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h3 class="title"><a id="dropwatchsect"> | 
| 250 | </a>5.1.5. Monitoring Network Packets Drops in Kernel</h3></div></div></div><a id="idm47723001884560" class="indexterm"></a><a id="idm47722959399696" class="indexterm"></a><a id="idm47722957318496" class="indexterm"></a><a id="idm47722960379840" class="indexterm"></a><a id="idm47722988875760" class="indexterm"></a><div class="para"> | 250 | </a>5.1.5. Monitoring Network Packets Drops in Kernel</h3></div></div></div><a id="idm47650151382448" class="indexterm"></a><a id="idm47650150763200" class="indexterm"></a><a id="idm47650182839616" class="indexterm"></a><a id="idm47650150610992" class="indexterm"></a><a id="idm47650180829552" class="indexterm"></a><div class="para"> | 
| 251 | <a id="idm47722998003424" class="indexterm"></a> The network stack in Linux can discard packets for various reasons. Some Linux kernels include a tracepoint, <code class="command">kernel.trace("kfree_skb")</code>, which easily tracks where packets are discarded. <a class="xref" href="useful-systemtap-scripts.html#dropwatch">dropwatch.stp</a> uses <code class="command">kernel.trace("kfree_skb")</code> to trace packet discards; the script summarizes which locations discard packets every five-second interval. | 251 | <a id="idm47650196207360" class="indexterm"></a> The network stack in Linux can discard packets for various reasons. Some Linux kernels include a tracepoint, <code class="command">kernel.trace("kfree_skb")</code>, which easily tracks where packets are discarded. <a class="xref" href="useful-systemtap-scripts.html#dropwatch">dropwatch.stp</a> uses <code class="command">kernel.trace("kfree_skb")</code> to trace packet discards; the script summarizes which locations discard packets every five-second interval. | 
| 252 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">dropwatch.stp</div> | 252 | </div><div class="para"><div xmlns:d="http://docbook.org/ns/docbook" class="title">dropwatch.stp</div> | 
| 253 | 253 | ||
| 254 | <pre class="programlisting">#! /usr/bin/env stap | 254 | <pre class="programlisting">#! /usr/bin/env stap | 
| diff --git a/SystemTap_Beginners_Guide/userspace-probing.html b/SystemTap_Beginners_Guide/userspace-probing.html index 375b9ff1..4a4ac228 100644 --- a/SystemTap_Beginners_Guide/userspace-probing.html +++ b/SystemTap_Beginners_Guide/userspace-probing.html | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | </div><pre class="screen"><code class="command">grep CONFIG_UTRACE /boot/config-`uname -r`</code></pre><div class="para"> | 11 | </div><pre class="screen"><code class="command">grep CONFIG_UTRACE /boot/config-`uname -r`</code></pre><div class="para"> | 
| 12 | If the Linux kernel supports user-space probing, the command produces the following output: | 12 | If the Linux kernel supports user-space probing, the command produces the following output: | 
| 13 | </div><pre class="screen">CONFIG_UTRACE=y</pre><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="uevents"> | 13 | </div><pre class="screen">CONFIG_UTRACE=y</pre><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="uevents"> | 
| 14 | </a>4.1. User-Space Events</h2></div></div></div><a id="idm47722997948480" class="indexterm"></a><div class="para"> | 14 | </a>4.1. User-Space Events</h2></div></div></div><a id="idm47650190962384" class="indexterm"></a><div class="para"> | 
| 15 | All user-space event probes begin with <span class="emphasis"><em>process</em></span>. You can limit the process events to a specific running process by specifying the process ID. You can also limit the process events to monitor a particular executable by specifying the path to the executable (PATH). SystemTap makes use of the <code class="envar">PATH</code> environment variable, which allows you to use both the name used on the command-line to start the executable and the absolute path to the executable. | 15 | All user-space event probes begin with <span class="emphasis"><em>process</em></span>. You can limit the process events to a specific running process by specifying the process ID. You can also limit the process events to monitor a particular executable by specifying the path to the executable (PATH). SystemTap makes use of the <code class="envar">PATH</code> environment variable, which allows you to use both the name used on the command-line to start the executable and the absolute path to the executable. | 
| 16 | </div><div class="para"> | 16 | </div><div class="para"> | 
| 17 | Several of the user-space probe events limit their scope to a particular executable name (PATH), because SystemTap must use debug information to statically analyze where to place the probes. But for many user-space probe events, the process ID and executable name are optional. Any <code class="command">process</code> event in the list below that include process ID or the path to the executable must include those arguments. The process ID and path to the executable are optional for the <code class="command">process</code> events that do not list them: | 17 | Several of the user-space probe events limit their scope to a particular executable name (PATH), because SystemTap must use debug information to statically analyze where to place the probes. But for many user-space probe events, the process ID and executable name are optional. Any <code class="command">process</code> event in the list below that include process ID or the path to the executable must include those arguments. The process ID and path to the executable are optional for the <code class="command">process</code> events that do not list them: | 
| diff --git a/SystemTap_Beginners_Guide/using-systemtap.html b/SystemTap_Beginners_Guide/using-systemtap.html index 975b3385..eae77f0c 100644 --- a/SystemTap_Beginners_Guide/using-systemtap.html +++ b/SystemTap_Beginners_Guide/using-systemtap.html | |||
| @@ -1,9 +1,9 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 2. Using SystemTap</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="intro-systemtap-limitations.html" title="1.3. Limitations of SystemTap" /><link rel="next" href="cross-compiling.html" title="2.2. Generating Instrumentation for Other Computers" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="intro-systemtap-limitations.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="cross-compiling.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="using-systemtap"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">Chapter 2. Using SystemTap</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="index.html" title="SystemTap Beginners Guide" /><link rel="prev" href="intro-systemtap-limitations.html" title="1.3. Limitations of SystemTap" /><link rel="next" href="cross-compiling.html" title="2.2. Generating Instrumentation for Other Computers" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="intro-systemtap-limitations.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="cross-compiling.html"><strong>Next</strong></a></li></ul><div xml:lang="en-US" class="chapter" lang="en-US"><div class="titlepage"><div><div><h1 class="title"><a id="using-systemtap"> | 
| 3 | </a>Chapter 2. Using SystemTap</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="using-systemtap.html#using-setup">2.1. Installation and Setup</a></span></dt><dd><dl><dt><span class="section"><a href="using-systemtap.html#installproper">2.1.1. Installing SystemTap</a></span></dt><dt><span class="section"><a href="using-systemtap.html#install-kinfo">2.1.2. Installing Required Kernel Information Packages Manually</a></span></dt><dt><span class="section"><a href="using-systemtap.html#testing">2.1.3. Initial Testing</a></span></dt></dl></dd><dt><span class="section"><a href="cross-compiling.html">2.2. Generating Instrumentation for Other Computers</a></span></dt><dt><span class="section"><a href="using-usage.html">2.3. Running SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="using-usage.html#flight-recorder">2.3.1. SystemTap Flight Recorder Mode</a></span></dt></dl></dd></dl></div><a id="idm47722952742112" class="indexterm"></a><div class="para"> | 3 | </a>Chapter 2. Using SystemTap</h1></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="using-systemtap.html#using-setup">2.1. Installation and Setup</a></span></dt><dd><dl><dt><span class="section"><a href="using-systemtap.html#installproper">2.1.1. Installing SystemTap</a></span></dt><dt><span class="section"><a href="using-systemtap.html#install-kinfo">2.1.2. Installing Required Kernel Information Packages Manually</a></span></dt><dt><span class="section"><a href="using-systemtap.html#testing">2.1.3. Initial Testing</a></span></dt></dl></dd><dt><span class="section"><a href="cross-compiling.html">2.2. Generating Instrumentation for Other Computers</a></span></dt><dt><span class="section"><a href="using-usage.html">2.3. Running SystemTap Scripts</a></span></dt><dd><dl><dt><span class="section"><a href="using-usage.html#flight-recorder">2.3.1. SystemTap Flight Recorder Mode</a></span></dt></dl></dd></dl></div><a id="idm47650181106160" class="indexterm"></a><div class="para"> | 
| 4 | This chapter documents how to install SystemTap in the system and explains how to use the <code class="command">stap</code> utility to run SystemTap scripts. | 4 | This chapter documents how to install SystemTap in the system and explains how to use the <code class="command">stap</code> utility to run SystemTap scripts. | 
| 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="using-setup"> | 5 | </div><div xml:lang="en-US" class="section" lang="en-US"><div class="titlepage"><div><div><h2 class="title"><a id="using-setup"> | 
| 6 | </a>2.1. Installation and Setup</h2></div></div></div><a id="idm47722952747344" class="indexterm"></a><a id="idm47722952748576" class="indexterm"></a><div class="para"> | 6 | </a>2.1. Installation and Setup</h2></div></div></div><a id="idm47650181110944" class="indexterm"></a><a id="idm47650181112656" class="indexterm"></a><div class="para"> | 
| 7 | To deploy SystemTap, install the SystemTap packages along with the corresponding set of <span class="package">-devel</span>, <span class="package">-debuginfo</span>, and <span class="package">-debuginfo-common</span> packages for your kernel. If your system has multiple kernels installed and you intend to use SystemTap on more than one of them, also install the <span class="package">-devel</span> and <span class="package">-debuginfo</span> packages for <span class="emphasis"><em>each</em></span> of those kernel versions. | 7 | To deploy SystemTap, install the SystemTap packages along with the corresponding set of <span class="package">-devel</span>, <span class="package">-debuginfo</span>, and <span class="package">-debuginfo-common</span> packages for your kernel. If your system has multiple kernels installed and you intend to use SystemTap on more than one of them, also install the <span class="package">-devel</span> and <span class="package">-debuginfo</span> packages for <span class="emphasis"><em>each</em></span> of those kernel versions. | 
| 8 | </div><div class="para"> | 8 | </div><div class="para"> | 
| 9 | The following sections discuss the installation procedures in greater detail. | 9 | The following sections discuss the installation procedures in greater detail. | 
| @@ -12,7 +12,7 @@ | |||
| 12 | </div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="installproper"> | 12 | </div></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="installproper"> | 
| 13 | </a>2.1.1. Installing SystemTap</h3></div></div></div><div class="para"> | 13 | </a>2.1.1. Installing SystemTap</h3></div></div></div><div class="para"> | 
| 14 | To deploy SystemTap, install the following RPM packages: | 14 | To deploy SystemTap, install the following RPM packages: | 
| 15 | </div><a id="idm47722952758512" class="indexterm"></a><a id="idm47722952759968" class="indexterm"></a><a id="idm47722952761072" class="indexterm"></a><a id="idm47722952763968" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 15 | </div><a id="idm47650181125968" class="indexterm"></a><a id="idm47650181123568" class="indexterm"></a><a id="idm47650181125152" class="indexterm"></a><a id="idm47650181126448" class="indexterm"></a><div xmlns:d="http://docbook.org/ns/docbook" class="itemizedlist"><ul><li class="listitem"><div class="para"> | 
| 16 | <span class="package">systemtap</span> | 16 | <span class="package">systemtap</span> | 
| 17 | </div></li><li class="listitem"><div class="para"> | 17 | </div></li><li class="listitem"><div class="para"> | 
| 18 | <span class="package">systemtap-runtime</span> | 18 | <span class="package">systemtap-runtime</span> | 
| @@ -23,7 +23,7 @@ | |||
| 23 | </div><pre class="screen"><code class="command">stap-prep</code></pre><div class="para"> | 23 | </div><pre class="screen"><code class="command">stap-prep</code></pre><div class="para"> | 
| 24 | If this command does not work, try manual installation as described below. | 24 | If this command does not work, try manual installation as described below. | 
| 25 | </div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="install-kinfo"> | 25 | </div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="install-kinfo"> | 
| 26 | </a>2.1.2. Installing Required Kernel Information Packages Manually</h3></div></div></div><a id="idm47722952770640" class="indexterm"></a><a id="idm47722952772064" class="indexterm"></a><a id="idm47722952773376" class="indexterm"></a><a id="idm47722952774304" class="indexterm"></a><a id="idm47722952775280" class="indexterm"></a><a id="idm47722952776752" class="indexterm"></a><div class="para"> | 26 | </a>2.1.2. Installing Required Kernel Information Packages Manually</h3></div></div></div><a id="idm47650181134240" class="indexterm"></a><a id="idm47650181136144" class="indexterm"></a><a id="idm47650181136832" class="indexterm"></a><a id="idm47650181137904" class="indexterm"></a><a id="idm47650181138880" class="indexterm"></a><a id="idm47650181140352" class="indexterm"></a><div class="para"> | 
| 27 | SystemTap needs information about the kernel in order to place instrumentation in it (in other words, probe it). This information also allows SystemTap to generate the code for the instrumentation. | 27 | SystemTap needs information about the kernel in order to place instrumentation in it (in other words, probe it). This information also allows SystemTap to generate the code for the instrumentation. | 
| 28 | </div><div class="para"> | 28 | </div><div class="para"> | 
| 29 | The required information is contained in the matching <span class="package">-devel</span>, <span class="package">-debuginfo</span>, and <span class="package">-debuginfo-common</span> packages for your kernel. The necessary <span class="package">-devel</span> and <span class="package">-debuginfo</span> packages for the ordinary "vanilla" kernel are as follows: | 29 | The required information is contained in the matching <span class="package">-devel</span>, <span class="package">-debuginfo</span>, and <span class="package">-debuginfo-common</span> packages for your kernel. The necessary <span class="package">-devel</span> and <span class="package">-debuginfo</span> packages for the ordinary "vanilla" kernel are as follows: | 
| @@ -35,7 +35,7 @@ | |||
| 35 | <span class="package">kernel-devel</span> | 35 | <span class="package">kernel-devel</span> | 
| 36 | </div></li></ul></div><div class="para"> | 36 | </div></li></ul></div><div class="para"> | 
| 37 | Likewise, the necessary packages for the PAE kernel are <span class="package">kernel-PAE-debuginfo</span>, <span class="package">kernel-PAE-debuginfo-common</span>, and <span class="package">kernel-PAE-devel</span>. | 37 | Likewise, the necessary packages for the PAE kernel are <span class="package">kernel-PAE-debuginfo</span>, <span class="package">kernel-PAE-debuginfo-common</span>, and <span class="package">kernel-PAE-devel</span>. | 
| 38 | </div><a id="idm47722989138656" class="indexterm"></a><a id="idm47722989139936" class="indexterm"></a><a id="idm47722989140896" class="indexterm"></a><a id="idm47722989145312" class="indexterm"></a><div class="para"> | 38 | </div><a id="idm47650183654928" class="indexterm"></a><a id="idm47650183652432" class="indexterm"></a><a id="idm47650183653392" class="indexterm"></a><a id="idm47650183654512" class="indexterm"></a><div class="para"> | 
| 39 | To determine what kernel your system is currently using, use: | 39 | To determine what kernel your system is currently using, use: | 
| 40 | </div><pre class="screen">uname -r</pre><div class="para"> | 40 | </div><pre class="screen">uname -r</pre><div class="para"> | 
| 41 | For example, if you intend to use SystemTap on kernel version <span class="emphasis"><em>2.6.18-53.el5</em></span> on an <span class="emphasis"><em>i686</em></span> machine, download and install the following RPM packages: | 41 | For example, if you intend to use SystemTap on kernel version <span class="emphasis"><em>2.6.18-53.el5</em></span> on an <span class="emphasis"><em>i686</em></span> machine, download and install the following RPM packages: | 
| @@ -58,7 +58,7 @@ | |||
| 58 | <code class="command">debuginfo-install kernel-PAE-2.6.18-53.1.13.el5</code></pre><div class="para"> | 58 | <code class="command">debuginfo-install kernel-PAE-2.6.18-53.1.13.el5</code></pre><div class="para"> | 
| 59 | Once you have manually downloaded the required packages to the machine, run the following command as root to install them: | 59 | Once you have manually downloaded the required packages to the machine, run the following command as root to install them: | 
| 60 | </div><pre class="screen"><code class="command">rpm --force -ivh <em class="replaceable">package_names</em></code></pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="testing"> | 60 | </div><pre class="screen"><code class="command">rpm --force -ivh <em class="replaceable">package_names</em></code></pre></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="testing"> | 
| 61 | </a>2.1.3. Initial Testing</h3></div></div></div><a id="idm47722987369712" class="indexterm"></a><a id="idm47722987370160" class="indexterm"></a><a id="idm47722987371088" class="indexterm"></a><div class="para"> | 61 | </a>2.1.3. Initial Testing</h3></div></div></div><a id="idm47650187092160" class="indexterm"></a><a id="idm47650188091024" class="indexterm"></a><a id="idm47650188091952" class="indexterm"></a><div class="para"> | 
| 62 | If you are currently using the kernel you intend to probe with SystemTap, you can immediately test whether the deployment was successful. If not, you restart the system and load the appropriate kernel. | 62 | If you are currently using the kernel you intend to probe with SystemTap, you can immediately test whether the deployment was successful. If not, you restart the system and load the appropriate kernel. | 
| 63 | </div><div class="para"> | 63 | </div><div class="para"> | 
| 64 | To start the test, run the following command: | 64 | To start the test, run the following command: | 
| diff --git a/SystemTap_Beginners_Guide/using-usage.html b/SystemTap_Beginners_Guide/using-usage.html index 5b7e769f..f86cd020 100644 --- a/SystemTap_Beginners_Guide/using-usage.html +++ b/SystemTap_Beginners_Guide/using-usage.html | |||
| @@ -1,22 +1,22 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2.3. Running SystemTap Scripts</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="prev" href="cross-compiling.html" title="2.2. Generating Instrumentation for Other Computers" /><link rel="next" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="cross-compiling.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="understanding-how-systemtap-works.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="using-usage"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">2.3. Running SystemTap Scripts</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="using-systemtap.html" title="Chapter 2. Using SystemTap" /><link rel="prev" href="cross-compiling.html" title="2.2. Generating Instrumentation for Other Computers" /><link rel="next" href="understanding-how-systemtap-works.html" title="Chapter 3. Understanding How SystemTap Works" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="cross-compiling.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="understanding-how-systemtap-works.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="using-usage"> | 
| 3 | </a>2.3. Running SystemTap Scripts</h2></div></div></div><a id="idm47722994281296" class="indexterm"></a><a id="idm47722991070672" class="indexterm"></a><a id="idm47722991069264" class="indexterm"></a><a id="idm47722991067824" class="indexterm"></a><a id="idm47723005330624" class="indexterm"></a><a id="idm47723005329184" class="indexterm"></a><div class="para"> | 3 | </a>2.3. Running SystemTap Scripts</h2></div></div></div><a id="idm47650183681376" class="indexterm"></a><a id="idm47650199427408" class="indexterm"></a><a id="idm47650199426000" class="indexterm"></a><a id="idm47650154346512" class="indexterm"></a><a id="idm47650151205968" class="indexterm"></a><a id="idm47650151204528" class="indexterm"></a><div class="para"> | 
| 4 | SystemTap is distributed with a number of command line tools that allow you to monitor the activities of the system. The <code class="command">stap</code> command reads probing instructions from a SystemTap script, translates these instructions into C code, builds a kernel module, and loads it into the running Linux kernel. The <code class="command">staprun</code> command runs SystemTap instrumentation, that is, a kernel module built from SystemTap scripts during a cross-instrumentation. | 4 | SystemTap is distributed with a number of command line tools that allow you to monitor the activities of the system. The <code class="command">stap</code> command reads probing instructions from a SystemTap script, translates these instructions into C code, builds a kernel module, and loads it into the running Linux kernel. The <code class="command">staprun</code> command runs SystemTap instrumentation, that is, a kernel module built from SystemTap scripts during a cross-instrumentation. | 
| 5 | </div><a id="idm47723003893008" class="indexterm"></a><div class="para"> | 5 | </div><a id="idm47650151217280" class="indexterm"></a><div class="para"> | 
| 6 | Running <code class="command">stap</code> and <code class="command">staprun</code> requires elevated privileges to the system. Because not all users can be granted root access just to run SystemTap, you can allow a non-privileged user to run SystemTap instrumentation on their machine by adding them to one of the following user groups: | 6 | Running <code class="command">stap</code> and <code class="command">staprun</code> requires elevated privileges to the system. Because not all users can be granted root access just to run SystemTap, you can allow a non-privileged user to run SystemTap instrumentation on their machine by adding them to one of the following user groups: | 
| 7 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">stapdev</span></dt><dd><a id="idm47723005300368" class="indexterm"></a><a id="idm47723005299408" class="indexterm"></a><div class="para"> | 7 | </div><div class="variablelist"><dl class="variablelist"><dt><span class="term">stapdev</span></dt><dd><a id="idm47650191474048" class="indexterm"></a><a id="idm47650197246528" class="indexterm"></a><div class="para"> | 
| 8 | Members of this group can use the <code class="command">stap</code> command to run SystemTap scripts, or <code class="command">staprun</code> to run SystemTap instrumentation modules. | 8 | Members of this group can use the <code class="command">stap</code> command to run SystemTap scripts, or <code class="command">staprun</code> to run SystemTap instrumentation modules. | 
| 9 | </div><div class="para"> | 9 | </div><div class="para"> | 
| 10 | Running the <code class="command">stap</code> command involves compiling SystemTap scripts into kernel modules and loading them into the kernel. This operation requires elevated privileges to the system, which are granted to <code class="systemitem">stapdev</code> members. Unfortunately, such privileges also grant effective root access to <code class="systemitem">stapdev</code> members. As a consequence, only grant <code class="systemitem">stapdev</code> group membership to users whom you can trust with root access. | 10 | Running the <code class="command">stap</code> command involves compiling SystemTap scripts into kernel modules and loading them into the kernel. This operation requires elevated privileges to the system, which are granted to <code class="systemitem">stapdev</code> members. Unfortunately, such privileges also grant effective root access to <code class="systemitem">stapdev</code> members. As a consequence, only grant <code class="systemitem">stapdev</code> group membership to users whom you can trust with root access. | 
| 11 | </div></dd><dt><span class="term">stapusr</span></dt><dd><a id="idm47722995649952" class="indexterm"></a><a id="idm47722995648992" class="indexterm"></a><div class="para"> | 11 | </div></dd><dt><span class="term">stapusr</span></dt><dd><a id="idm47650191423376" class="indexterm"></a><a id="idm47650191422416" class="indexterm"></a><div class="para"> | 
| 12 | Members of this group can only use the <code class="command">staprun</code> command to run SystemTap instrumentation modules. In addition, they can only run modules from the <code class="filename">/lib/modules/<em class="replaceable">kernel_version</em>/systemtap/</code> directory. Note that this directory must be owned only by the root user, and must only be writable by the root user. | 12 | Members of this group can only use the <code class="command">staprun</code> command to run SystemTap instrumentation modules. In addition, they can only run modules from the <code class="filename">/lib/modules/<em class="replaceable">kernel_version</em>/systemtap/</code> directory. Note that this directory must be owned only by the root user, and must only be writable by the root user. | 
| 13 | </div></dd></dl></div><div class="para"> | 13 | </div></dd></dl></div><div class="para"> | 
| 14 | The <code class="command">stap</code> command reads a SystemTap script either from a file, or from standard input. To tell <code class="command">stap</code> to read a SystemTap script from a file, specify the file name on the command line: | 14 | The <code class="command">stap</code> command reads a SystemTap script either from a file, or from standard input. To tell <code class="command">stap</code> to read a SystemTap script from a file, specify the file name on the command line: | 
| 15 | </div><pre class="screen"><code class="command">stap <em class="replaceable">file_name</em></code></pre><a id="idm47722990493312" class="indexterm"></a><a id="idm47722990491904" class="indexterm"></a><a id="idm47722990490496" class="indexterm"></a><div class="para"> | 15 | </div><pre class="screen"><code class="command">stap <em class="replaceable">file_name</em></code></pre><a id="idm47650150699952" class="indexterm"></a><a id="idm47650150698544" class="indexterm"></a><a id="idm47650187363424" class="indexterm"></a><div class="para"> | 
| 16 | To instruct <code class="command">stap</code> to read a SystemTap script from standard input, use the <code class="option">-</code> switch instead of the file name. Note that any command-line options you wish to use must be inserted before the <code class="option">-</code> switch. For example, to make the output of the <code class="command">stap</code> command more verbose, type: | 16 | To instruct <code class="command">stap</code> to read a SystemTap script from standard input, use the <code class="option">-</code> switch instead of the file name. Note that any command-line options you wish to use must be inserted before the <code class="option">-</code> switch. For example, to make the output of the <code class="command">stap</code> command more verbose, type: | 
| 17 | </div><pre class="screen"><code class="command">echo "probe timer.s(1) {exit()}" | stap -v -</code></pre><div class="para"> | 17 | </div><pre class="screen"><code class="command">echo "probe timer.s(1) {exit()}" | stap -v -</code></pre><div class="para"> | 
| 18 | Below is a list of commonly used <code class="command">stap</code> options: | 18 | Below is a list of commonly used <code class="command">stap</code> options: | 
| 19 | </div><a id="idm47722990927744" class="indexterm"></a><a id="idm47722990926304" class="indexterm"></a><div class="variablelist"><a id="idm47722990924544" class="indexterm"></a><dl class="variablelist"><dt><span class="term">-v</span></dt><dd><div class="para"> | 19 | </div><a id="idm47650193599296" class="indexterm"></a><a id="idm47650190268320" class="indexterm"></a><div class="variablelist"><a id="idm47650190266560" class="indexterm"></a><dl class="variablelist"><dt><span class="term">-v</span></dt><dd><div class="para"> | 
| 20 | Makes the output of the SystemTap session more verbose. You can repeat this option multiple times to provide more details on the script's execution, for example: | 20 | Makes the output of the SystemTap session more verbose. You can repeat this option multiple times to provide more details on the script's execution, for example: | 
| 21 | </div><pre class="screen"><code class="command">stap -vvv script.stp</code></pre><div class="para"> | 21 | </div><pre class="screen"><code class="command">stap -vvv script.stp</code></pre><div class="para"> | 
| 22 | This option is particularly useful if you encounter any errors in running the script. For more information about common SystemTap script errors, refer to <a class="xref" href="errors.html">Chapter 6, <em>Understanding SystemTap Errors</em></a>. | 22 | This option is particularly useful if you encounter any errors in running the script. For more information about common SystemTap script errors, refer to <a class="xref" href="errors.html">Chapter 6, <em>Understanding SystemTap Errors</em></a>. | 
| @@ -35,12 +35,12 @@ | |||
| 35 | </div></dd></dl></div><div class="para"> | 35 | </div></dd></dl></div><div class="para"> | 
| 36 | For more information about the <code class="command">stap</code> command, refer to the <span class="citerefentry"><span class="refentrytitle">stap</span>(1)</span> man page. For more information about the <code class="command">staprun</code> command and cross-instrumentation, refer to <a class="xref" href="cross-compiling.html">Section 2.2, “Generating Instrumentation for Other Computers”</a> or the <span class="citerefentry"><span class="refentrytitle">staprun</span>(8)</span> man page. | 36 | For more information about the <code class="command">stap</code> command, refer to the <span class="citerefentry"><span class="refentrytitle">stap</span>(1)</span> man page. For more information about the <code class="command">staprun</code> command and cross-instrumentation, refer to <a class="xref" href="cross-compiling.html">Section 2.2, “Generating Instrumentation for Other Computers”</a> or the <span class="citerefentry"><span class="refentrytitle">staprun</span>(8)</span> man page. | 
| 37 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="flight-recorder"> | 37 | </div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="flight-recorder"> | 
| 38 | </a>2.3.1. SystemTap Flight Recorder Mode</h3></div></div></div><a id="idm47722990923280" class="indexterm"></a><div class="para"> | 38 | </a>2.3.1. SystemTap Flight Recorder Mode</h3></div></div></div><a id="idm47650196017024" class="indexterm"></a><div class="para"> | 
| 39 | SystemTap's flight recorder mode allows you to run a SystemTap script for long periods of time and just focus on recent output. The flight recorder mode limits the amount of output generated. | 39 | SystemTap's flight recorder mode allows you to run a SystemTap script for long periods of time and just focus on recent output. The flight recorder mode limits the amount of output generated. | 
| 40 | </div><div class="para"> | 40 | </div><div class="para"> | 
| 41 | There are two variations of the flight recorder mode: <em class="firstterm">in-memory</em> and <em class="firstterm">file</em> mode. In both cases, the SystemTap script runs as a background process. | 41 | There are two variations of the flight recorder mode: <em class="firstterm">in-memory</em> and <em class="firstterm">file</em> mode. In both cases, the SystemTap script runs as a background process. | 
| 42 | </div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="memory-flight-recorder"> | 42 | </div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="memory-flight-recorder"> | 
| 43 | </a>2.3.1.1. In-memory Flight Recorder</h4></div></div></div><a id="idm47722995723392" class="indexterm"></a><div class="para"> | 43 | </a>2.3.1.1. In-memory Flight Recorder</h4></div></div></div><a id="idm47650197177456" class="indexterm"></a><div class="para"> | 
| 44 | When flight recorder mode is used without a file name, SystemTap uses a buffer in kernel memory to store the output of the script. Once the SystemTap instrumentation module is loaded and the probes start running, the instrumentation detaches and is put in the background. When the interesting event occurs, you can reattach to the instrumentation to see the recent output in the memory buffer and any continuing output. | 44 | When flight recorder mode is used without a file name, SystemTap uses a buffer in kernel memory to store the output of the script. Once the SystemTap instrumentation module is loaded and the probes start running, the instrumentation detaches and is put in the background. When the interesting event occurs, you can reattach to the instrumentation to see the recent output in the memory buffer and any continuing output. | 
| 45 | </div><div class="para"> | 45 | </div><div class="para"> | 
| 46 | To run a SystemTap script by using the flight recorder in-memory mode, run the <code class="command">stap</code> command with the <code class="option">-F</code> command line option: | 46 | To run a SystemTap script by using the flight recorder in-memory mode, run the <code class="command">stap</code> command with the <code class="option">-F</code> command line option: | 
| @@ -52,7 +52,7 @@ To reconnect, type "staprun -A stap_5dd0073edcb1f13f7565d8c343063e68_19556"</pre | |||
| 52 | </div><pre class="screen"><code class="command">staprun -A stap_5dd0073edcb1f13f7565d8c343063e68_19556</code></pre><div class="para"> | 52 | </div><pre class="screen"><code class="command">staprun -A stap_5dd0073edcb1f13f7565d8c343063e68_19556</code></pre><div class="para"> | 
| 53 | By default, the kernel buffer is 1MB in size. You can increase this value by using the <code class="option">-s</code> option with the size in megabytes (rounded up to the next power over 2) for the buffer. For example, <code class="option">-s2</code> on the SystemTap command line would specify 2MB for the buffer. | 53 | By default, the kernel buffer is 1MB in size. You can increase this value by using the <code class="option">-s</code> option with the size in megabytes (rounded up to the next power over 2) for the buffer. For example, <code class="option">-s2</code> on the SystemTap command line would specify 2MB for the buffer. | 
| 54 | </div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="file-flight-recorder"> | 54 | </div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a id="file-flight-recorder"> | 
| 55 | </a>2.3.1.2. File Flight Recorder</h4></div></div></div><a id="idm47722954311344" class="indexterm"></a><div class="para"> | 55 | </a>2.3.1.2. File Flight Recorder</h4></div></div></div><a id="idm47650183027184" class="indexterm"></a><div class="para"> | 
| 56 | The flight recorder mode can also store data to files. You can control the number and size of the files kept by using the <code class="option">-S</code> option followed by two numerical arguments separated by a comma: the first argument is the maximum size in megabytes for the each output file, the second argument is the number of recent files to keep. To specify the file name, use the <code class="option">-o</code> option followed by the name. SystemTap automatically adds a number suffix to the file name to indicate the order of the files. | 56 | The flight recorder mode can also store data to files. You can control the number and size of the files kept by using the <code class="option">-S</code> option followed by two numerical arguments separated by a comma: the first argument is the maximum size in megabytes for the each output file, the second argument is the number of recent files to keep. To specify the file name, use the <code class="option">-o</code> option followed by the name. SystemTap automatically adds a number suffix to the file name to indicate the order of the files. | 
| 57 | </div><div class="para"> | 57 | </div><div class="para"> | 
| 58 | The following command starts SystemTap in file flight recorder mode with the output going to files named <code class="filename">/tmp/iotime.log.<em class="replaceable">[0-9]+</em></code>, each file 1MB or smaller, and keeping latest two files: | 58 | The following command starts SystemTap in file flight recorder mode with the output going to files named <code class="filename">/tmp/iotime.log.<em class="replaceable">[0-9]+</em></code>, each file 1MB or smaller, and keeping latest two files: | 
| diff --git a/SystemTap_Beginners_Guide/ustack.html b/SystemTap_Beginners_Guide/ustack.html index 8a881961..aa310784 100644 --- a/SystemTap_Beginners_Guide/ustack.html +++ b/SystemTap_Beginners_Guide/ustack.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">4.3. User-Space Stack Backtraces</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="userspace-probing.html" title="Chapter 4. User-space Probing" /><link rel="prev" href="utargetvariable.html" title="4.2. Accessing User-Space Target Variables" /><link rel="next" href="useful-systemtap-scripts.html" title="Chapter 5. Useful SystemTap Scripts" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="utargetvariable.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="useful-systemtap-scripts.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="ustack"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">4.3. User-Space Stack Backtraces</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="userspace-probing.html" title="Chapter 4. User-space Probing" /><link rel="prev" href="utargetvariable.html" title="4.2. Accessing User-Space Target Variables" /><link rel="next" href="useful-systemtap-scripts.html" title="Chapter 5. Useful SystemTap Scripts" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="utargetvariable.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="useful-systemtap-scripts.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="ustack"> | 
| 3 | </a>4.3. User-Space Stack Backtraces</h2></div></div></div><a id="idm47722988616720" class="indexterm"></a><div class="para"> | 3 | </a>4.3. User-Space Stack Backtraces</h2></div></div></div><a id="idm47650193588544" class="indexterm"></a><div class="para"> | 
| 4 | The probe point (<code class="function">pp</code>) function indicates which particular event triggered the SystemTap event handler. A probe on the entry into a function would list the function name. However, in many cases the same probe point event may be triggered by many different modules in the program; this is particularly true for functions in shared libraries. A SystemTap backtrace of the user-space stack can provide additional context on how the probe point event is triggered. | 4 | The probe point (<code class="function">pp</code>) function indicates which particular event triggered the SystemTap event handler. A probe on the entry into a function would list the function name. However, in many cases the same probe point event may be triggered by many different modules in the program; this is particularly true for functions in shared libraries. A SystemTap backtrace of the user-space stack can provide additional context on how the probe point event is triggered. | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | The user-space stack backtrace generation is complicated by the compiler producing code optimized to eliminate stack frame pointers. However, the compiler also includes information in the debug information section to allow debugging tools to produce stack backtraces. SystemTap user-space stack backtrace mechanism makes use of that debug information to walk the stack to generate stack traces for 32-bit and 64-bit x86 processors; other processor architectures do not yet support the use of debug information to unwind the user-space stack. To ensure that the needed debug information is used to produce the user-space stack backtraces, use the <code class="option">-d <em class="replaceable">executable</em></code> option for executables and <code class="option">-ldd</code> for shared libraries. | 6 | The user-space stack backtrace generation is complicated by the compiler producing code optimized to eliminate stack frame pointers. However, the compiler also includes information in the debug information section to allow debugging tools to produce stack backtraces. SystemTap user-space stack backtrace mechanism makes use of that debug information to walk the stack to generate stack traces for 32-bit and 64-bit x86 processors; other processor architectures do not yet support the use of debug information to unwind the user-space stack. To ensure that the needed debug information is used to produce the user-space stack backtraces, use the <code class="option">-d <em class="replaceable">executable</em></code> option for executables and <code class="option">-ldd</code> for shared libraries. | 
| diff --git a/SystemTap_Beginners_Guide/utargetvariable.html b/SystemTap_Beginners_Guide/utargetvariable.html index 1a62e2b5..f34ac494 100644 --- a/SystemTap_Beginners_Guide/utargetvariable.html +++ b/SystemTap_Beginners_Guide/utargetvariable.html | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">4.2. Accessing User-Space Target Variables</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="userspace-probing.html" title="Chapter 4. User-space Probing" /><link rel="prev" href="userspace-probing.html" title="Chapter 4. User-space Probing" /><link rel="next" href="ustack.html" title="4.3. User-Space Stack Backtraces" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="userspace-probing.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="ustack.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="utargetvariable"> | 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title xmlns:d="http://docbook.org/ns/docbook">4.2. Accessing User-Space Target Variables</title><link rel="stylesheet" type="text/css" href="Common_Content/css/default.css" /><link rel="stylesheet" media="print" href="Common_Content/css/print.css" type="text/css" /><meta xmlns:d="http://docbook.org/ns/docbook" name="generator" content="publican v4.1.3" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="SystemTap-SystemTap_Beginners_Guide-2.7-en-US-2.0-1" /><link rel="home" href="index.html" title="SystemTap Beginners Guide" /><link rel="up" href="userspace-probing.html" title="Chapter 4. User-space Probing" /><link rel="prev" href="userspace-probing.html" title="Chapter 4. User-space Probing" /><link rel="next" href="ustack.html" title="4.3. User-Space Stack Backtraces" /></head><body><p id="title"><a class="left" href="https://fedorahosted.org/publican"><img alt="Product Site" src="Common_Content/images//image_left.png" /></a><a class="right" href="https://fedorahosted.org/publican"><img alt="Documentation Site" src="Common_Content/images//image_right.png" /></a></p><ul class="docnav top"><li class="previous"><a accesskey="p" href="userspace-probing.html"><strong>Prev</strong></a></li><li class="home">SystemTap Beginners Guide</li><li class="next"><a accesskey="n" href="ustack.html"><strong>Next</strong></a></li></ul><div class="section"><div class="titlepage"><div><div><h2 class="title"><a id="utargetvariable"> | 
| 3 | </a>4.2. Accessing User-Space Target Variables</h2></div></div></div><a id="idm47722950498848" class="indexterm"></a><div class="para"> | 3 | </a>4.2. Accessing User-Space Target Variables</h2></div></div></div><a id="idm47650190433200" class="indexterm"></a><div class="para"> | 
| 4 | You can access user-space target variables in the same manner as described in <a class="xref" href="targetvariables.html">Section 3.3.2, “Target Variables”</a>. In Linux, however, there are separate address spaces for the user and kernel code. When using the <code class="literal">-></code> operator, SystemTap accesses the appropriate address space. | 4 | You can access user-space target variables in the same manner as described in <a class="xref" href="targetvariables.html">Section 3.3.2, “Target Variables”</a>. In Linux, however, there are separate address spaces for the user and kernel code. When using the <code class="literal">-></code> operator, SystemTap accesses the appropriate address space. | 
| 5 | </div><div class="para"> | 5 | </div><div class="para"> | 
| 6 | For pointers to base types such as integers and strings, there are a number of functions listed below to access user-space data. The first argument for each functions is the pointer to the data item. | 6 | For pointers to base types such as integers and strings, there are a number of functions listed below to access user-space data. The first argument for each functions is the pointer to the data item. | 
