diff options
author | ddomingo <ddomingo@redhat.com> | 2008-11-28 08:53:34 +1000 |
---|---|---|
committer | ddomingo <ddomingo@redhat.com> | 2008-11-28 08:53:34 +1000 |
commit | 021dcea6a8cf44ca4a2e7a3d6f76fc1b8a9c88da (patch) | |
tree | 009bee62277801dc72b56c642b29457920689bd3 /doc/SystemTap_Beginners_Guide/en-US | |
parent | e4f531a369df3fb680fa4c31c7b4127fa889cf34 (diff) | |
download | systemtap-steved-021dcea6a8cf44ca4a2e7a3d6f76fc1b8a9c88da.tar.gz systemtap-steved-021dcea6a8cf44ca4a2e7a3d6f76fc1b8a9c88da.tar.xz systemtap-steved-021dcea6a8cf44ca4a2e7a3d6f76fc1b8a9c88da.zip |
more indexes
Diffstat (limited to 'doc/SystemTap_Beginners_Guide/en-US')
5 files changed, 271 insertions, 8 deletions
diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-disktop.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-disktop.xml index 028ab530..b57486d9 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-disktop.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-disktop.xml @@ -5,14 +5,60 @@ <section id="disktop"> <title>Summarizing Disk Read/Write Traffic</title> - +<indexterm> +<primary>script examples</primary> +<secondary>summarizing disk I/O traffic</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>summarizing disk I/O traffic</secondary> +</indexterm> + +<indexterm> +<primary>summarizing disk I/O traffic</primary> +<secondary>script examples</secondary> +</indexterm> <remark> NO ENTRY IN WAR STORIES: Summarize Disk Read/Write Traffic http://sourceware.org/systemtap/examples/io/disktop.stp </remark> - - + +<indexterm> +<primary>disk I/O traffic, summarizing</primary> +<secondary>script examples</secondary> +</indexterm> +<!-- next 2 indexterms for I/O traffic, summarizing --> + +<indexterm> +<primary>I/O traffic, summarizing</primary> +<secondary>script examples</secondary> +</indexterm> + +<!-- next 2 indexterms for heaviest disk reads/writes, identifying --> + +<indexterm> +<primary>heaviest disk reads/writes, identifying</primary> +<secondary>script examples</secondary> +</indexterm> + + +<!-- next 2 indexterms for summarizing disk I/O traffic --> + +<indexterm> +<primary>summarizing disk I/O traffic</primary> +<secondary>script examples</secondary> +</indexterm> + + +<!-- next 2 indexterms for identifying heaviest disk reads/writes --> + +<indexterm> +<primary>identifying heaviest disk reads/writes</primary> +<secondary>script examples</secondary> +</indexterm> + <para>This section describes how to identify which processes are performing the heaviest disk reads/writes to the system.</para> <formalpara id="scriptdisktop"> @@ -41,6 +87,24 @@ <listitem><para><computeroutput>BYTES</computeroutput> — the amount of data read to or written from disk.</para></listitem> </itemizedlist> +<!-- next 2 indexterms for ctime(), example of usage --> + +<indexterm> +<primary>script examples</primary> +<secondary>ctime(), example of usage</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>ctime(), example of usage</secondary> +</indexterm> + +<indexterm> +<primary>ctime(), example of usage</primary> +<secondary>script examples</secondary> +</indexterm> + + <para>The time and date in the output of <xref linkend="scriptdisktop"/> is returned by the functions <command>ctime()</command> and <command>gettimeofday_s()</command>. <command>ctime()</command> derives calendar time in terms of seconds passed since the Unix epoch (January 1, 1970). <command>gettimeofday_s()</command> counts the <emphasis>actual</emphasis> number of seconds since Unix epoch, which gives a fairly accurate human-readable timestamp for the output.</para> diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-iotop.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-iotop.xml index 6742740f..8ec2af90 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-iotop.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-iotop.xml @@ -4,6 +4,30 @@ <section id="iotopsect"> <title>Periodically Print I/O Activity</title> +<indexterm> +<primary>script examples</primary> +<secondary>monitoring I/O activity</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>monitoring I/O activity</secondary> +</indexterm> + +<indexterm> +<primary>monitoring I/O activity</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>I/O activity, monitoring</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>printing I/O activity (periodically)</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> <para>This section describes how to monitor I/O activity on the system.</para> @@ -50,7 +74,7 @@ </screen> </example> -<para><xref linkend="iotopoutput"/> displays top I/O writes and reads within a random 10-second interval. Note that <xref linkend="iotop"/> also detects I/O resulting from SystemTap activity — <xref linkend="iotopoutput"/> also displays reads done by <command>staprun</command>.</para> +<para><xref linkend="iotopoutput"/> displays top I/O writes and reads within a random 10-second interval. Note that <xref linkend="iotop"/> also detects I/O resulting from SystemTap activity — <xref linkend="iotopoutput"/> displays reads done by <command>staprun</command>.</para> <!-- global reads, writes, total_io diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-paracallgraph.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-paracallgraph.xml index 8063cbee..e05e2bcf 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-paracallgraph.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-paracallgraph.xml @@ -6,7 +6,38 @@ <section id="paracallgraph"> <title>Call Graph Tracing</title> - +<indexterm> +<primary>script examples</primary> +<secondary>call graph tracing</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>call graph tracing</secondary> +</indexterm> + +<indexterm> +<primary>call graph tracing</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>incoming/outgoing function calls, tracing</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +<indexterm> +<primary>function calls (incoming/outgoing), tracing</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +<indexterm> +<primary>tracing incoming/outgoing function calls</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +<indexterm> +<primary>tracing call graph</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + <remark> WAR STORY: Call graph tracing http://sourceware.org/systemtap/wiki/WSCallGraph?highlight=((WarStories)) </remark> @@ -26,15 +57,60 @@ </programlisting> </para> </formalpara> +<indexterm> +<primary>script examples</primary> +<secondary>multiple command-line arguments, example of</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>multiple command-line arguments, example of</secondary> +</indexterm> + +<indexterm> +<primary>multiple command-line arguments, example of</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> +<indexterm> +<primary>example of multiple command-line arguments</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> <para><xref linkend="scriptcallgraph"/> takes two command-line arguments:</para> +<indexterm> +<primary>script examples</primary> +<secondary>trigger function</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>trigger function</secondary> +</indexterm> +<indexterm> +<primary>trigger function</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> <itemizedlist> <listitem><para>A <firstterm>trigger function</firstterm> (<command>@1</command>), which enables or disables tracing on a per-thread basis.</para></listitem> <listitem><para>The kernel function whose entry/exit call you'd like to trace (<command>@2</command>).</para></listitem> </itemizedlist> <remark> please verify previous if correct; i'm particularly interested in finding out how to better describe "trigger function"</remark> +<indexterm> +<primary>script examples</primary> +<secondary>thread_indent(), sample usage</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>thread_indent(), sample usage</secondary> +</indexterm> + +<indexterm> +<primary>thread_indent(), sample usage</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> <para><xref linkend="scriptcallgraph"/> uses <command>thread_indent()</command>; as such, its output contains the timestamp, process name, and thread ID of <command>@2</command> (i.e. the probe function you are tracing). For more information about <command>thread_indent()</command>, refer to its entry in <xref linkend="systemtapscript-functions"/>.</para> diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio.xml index 14dc754c..0f914447 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio.xml @@ -4,6 +4,36 @@ <section id="traceiosect"> <title>Track Cumulative IO</title> +<indexterm> +<primary>script examples</primary> +<secondary>tracking cumulative I/O</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>tracking cumulative I/O</secondary> +</indexterm> + +<indexterm> +<primary>tracking cumulative I/O</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>cumulative I/O, tracking</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>monitoring cumulative I/O</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>printing I/O activity (cumulative)</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + <para> This section describes how to track the cumulative amount of I/O to the system. </para> diff --git a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml index 1c3bb7c7..4422b764 100644 --- a/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml +++ b/doc/SystemTap_Beginners_Guide/en-US/Useful_Scripts-traceio2.xml @@ -4,8 +4,36 @@ <section id="traceio2sect"> <title>I/O Monitoring (By Device)</title> +<indexterm> +<primary>script examples</primary> +<secondary>monitoring device I/O</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>monitoring device I/O</secondary> +</indexterm> + +<indexterm> +<primary>monitoring device I/O</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>I/O monitoring (by device)</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> - <remark> +<indexterm> +<primary>device I/O, monitoring</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + + + + + +<remark> example from http://sourceware.org/systemtap/examples/io/traceio2.stp, but error </remark> @@ -51,9 +79,50 @@ semantic error: field 'f_dentry' not found dev_nr = $file->f_path->dentry->d_inode->i_sb->s_dev inode_nr = $file->f_path->dentry->d_inode->i_ino </programlisting>--> - +<indexterm> +<primary>script examples</primary> +<secondary>stat -c</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>stat -c</secondary> +</indexterm> + +<indexterm> +<primary>stat -c</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> + +<indexterm> +<primary>script examples</primary> +<secondary>whole device number (usage as a command-line argument)</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>whole device number (usage as a command-line argument)</secondary> +</indexterm> + +<indexterm> +<primary>whole device number (usage as a command-line argument)</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> <para><xref linkend="traceio2"/> takes 1 argument: the whole device number. To get this number, use <command>stat -c "0x%D" <replaceable>directory</replaceable></command>, where <command><replaceable>directory</replaceable></command> is located in the device you wish to monitor.</para> - +<indexterm> +<primary>script examples</primary> +<secondary>usrdev2kerndev()</secondary> +</indexterm> + +<indexterm> +<primary>examples of SystemTap scripts</primary> +<secondary>usrdev2kerndev()</secondary> +</indexterm> + +<indexterm> +<primary>usrdev2kerndev()</primary> +<secondary>examples of SystemTap scripts</secondary> +</indexterm> <para>The <command>usrdev2kerndev()</command> function converts the whole device number into the format understood by the kernel. The output produced by <command>usrdev2kerndev()</command> is used in conjunction with the <command>MKDEV()</command>, <command>MINOR()</command>, and <command>MAJOR()</command> functions to determine the major and minor numbers of a specific device.</para> <para>The output of <xref linkend="traceio2"/> includes the name and ID of any process performing a read/write, the function it is performing (i.e. <command>vfs_read</command> or <command>vfs_write</command>), and the device number (in hex format).</para> |