summaryrefslogtreecommitdiffstats
path: root/SystemTap_Beginners_Guide/traceiosect.html
diff options
Diffstat (limited to 'SystemTap_Beginners_Guide/traceiosect.html')
-rw-r--r--SystemTap_Beginners_Guide/traceiosect.html23
1 files changed, 13 insertions, 10 deletions
diff --git a/SystemTap_Beginners_Guide/traceiosect.html b/SystemTap_Beginners_Guide/traceiosect.html
index afa0cbd3..acfde8ea 100644
--- a/SystemTap_Beginners_Guide/traceiosect.html
+++ b/SystemTap_Beginners_Guide/traceiosect.html
@@ -1,9 +1,8 @@
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="not publican" /><meta xmlns:d="http://docbook.org/ns/docbook" name="package" content="" /><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"></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 class="section"><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="idm47748220185904" class="indexterm"></a><a id="idm47748175080768" class="indexterm"></a><a id="idm47748183091184" class="indexterm"></a><a id="idm47748183056160" class="indexterm"></a><a id="idm47748180437728" class="indexterm"></a><a id="idm47748230864960" class="indexterm"></a><div class="para"> 3 ⁠</a>5.2.3. Track Cumulative IO</h3></div></div></div><a id="idm140174741723040" class="indexterm"></a><a id="idm140174741938240" class="indexterm"></a><a id="idm140174736492576" class="indexterm"></a><a id="idm140174741722688" class="indexterm"></a><a id="idm140174741605488" class="indexterm"></a><a id="idm140174740479248" 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
7<pre class="programlisting">#! /usr/bin/env stap 6<pre class="programlisting">#! /usr/bin/env stap
8# traceio.stp 7# traceio.stp
9# Copyright (C) 2007 Red Hat, Inc., Eugene Teo &lt;eteo@redhat.com&gt; 8# Copyright (C) 2007 Red Hat, Inc., Eugene Teo &lt;eteo@redhat.com&gt;
@@ -54,11 +53,15 @@ probe timer.s(1) {
54 # so the values are cumulative since the script started. 53 # so the values are cumulative since the script started.
55} 54}
56</pre> 55</pre>
57 </div><div class="para"> 56</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. 57 <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> prints the top ten executables generating I/O traffic over time. In
59 </div><a id="idm47748220256464" class="indexterm"></a><a id="idm47748226105888" class="indexterm"></a><a id="idm47748226191072" class="indexterm"></a><div class="para"> 58 addition, it also tracks the cumulative amount of I/O reads and writes done by those ten
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>. 59 executables. This information is tracked and printed out in 1-second intervals, and in
61 </div><div class="example"><a id="traceiooutput"> 60 descending order.
61</div><a id="idm140174742490864" class="indexterm"></a><a id="idm140174732834160" class="indexterm"></a><a id="idm140174733356160" class="indexterm"></a><div class="para">
62 Note that <a class="xref" href="traceiosect.html#traceio">traceio.stp</a> also uses the local variable <code class="command">$return</code>,
63 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>.
64</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">[...] 65 ⁠</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">[...]
63 Xorg r: 583401 KiB w: 0 KiB 66 Xorg r: 583401 KiB w: 0 KiB
64 floaters r: 96 KiB w: 7130 KiB 67 floaters r: 96 KiB w: 7130 KiB