summaryrefslogtreecommitdiffstats
path: root/doc/SystemTap_Tapset_Reference/tapsets.tmpl
blob: 4310f39a5d18e24e8524ad250deb51c3f2ff3969 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
	"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []>

<book id="TapsetRef">
 <bookinfo>
  <title>SystemTap Tapset Reference Manual</title>
  
  <authorgroup>
   <author>
    <firstname>William</firstname>
    <surname>Cohen</surname>
    <affiliation>
     <address>
      <email>wcohen@redhat.com</email>
     </address>
    </affiliation>
   </author>
  </authorgroup>

  <copyright>
   <year>2008, 2009</year>
   <holder>Red Hat, Inc.</holder>
  </copyright>

  <legalnotice>
   <para>
     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.
   </para>
      
   <para>
     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.
   </para>
      
   <para>
     You should have received a copy of the GNU General Public
     License along with this program; if not, write to the Free
     Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
     MA 02111-1307 USA
   </para>
      
   <para>
     For more details see the file COPYING in the source
     distribution of Linux.
   </para>
  </legalnotice>
 </bookinfo>

<toc></toc>

<chapter id="introduction">
  <title>Introduction</title>
  <para>
    SystemTap provides free software (GPL) infrastructure to simplify the
    gathering of information about the running Linux system. This assists
    diagnosis of a performance or functional problem. SystemTap eliminates the
    need for the developer to go through the tedious and disruptive instrument,
    recompile, install, and reboot sequence that may be otherwise required to
    collect data.
  </para>

  <para>
    SystemTap provides a simple command line interface and scripting language
    for writing instrumentation for a live running kernel. The instrumentation
    makes extensive use of the probe points and functions provided in the
    <firstterm>tapset</firstterm> library. This document describes the various
    probe points and functions.
  </para>
  
    <section id="format">
      <title>Tapset Name Format</title>
	
      <para>In this guide, tapset definitions appear in the following format:</para>

      <screen>
	name:return (parameters)
	definition
      </screen>
	
      <para>
	The <replaceable>return</replaceable> field specifies what data type the
	tapset extracts and returns from the kernel during a probe (and thus,
	returns).  Tapsets use 2 data types for
	<replaceable>return</replaceable>: <literal>long</literal> (tapset
	extracts and returns an integer) and <literal>string</literal> (tapset
	extracts and returns a string).
      </para>

      <para>
	In some cases, tapsets do not have a <replaceable>return</replaceable>
	value. This simply means that the tapset does not extract anything from
	the kernel.  This is common among asynchronous events such as timers,
	exit functions, and print functions.
      </para>

<!--
<varlistentry>
<term></term>
<listitem>
	<para></para>
</listitem>
</varlistentry>
-->

    </section>
  
  </chapter>

  <chapter id="context_stp">
    <title>Context Functions</title>
    <para>
      The context functions provide additional information about the where
      the event occurred.
      These functions can provide information such as a backtrace
      where the event occured
      and the current register values for the processor.
    </para>
!Itapset/context.stp
!Itapset/context-symbols.stp
!Itapset/context-unwind.stp
  </chapter>

  <chapter id="timestamp_stp">
    <title>Timestamp Functions</title>
    <para>
      Each timestamp function returns a value to indicate when
      the function is executed.
      Thus, these returned values can be used to indicate
      when an event occurs, provide an ordering for events, or compute
      the amount of time elapsed between to time stamps.
    </para>
!Itapset/timestamp.stp
  </chapter>

  <chapter id="memory_stp">
    <title>Memory Tapset</title>
!Itapset/memory.stp
  </chapter>

  <chapter id="iosched.stp">
    <title>IO Scheduler Tapset</title>
    <para>
      This family of probe points is used to probe the IO scheduler activities.
      It contains the following probe points:
    </para>
!Itapset/ioscheduler.stp
  </chapter>

  <chapter id="scsi.stp">
    <title>SCSI Tapset</title>
    <para>
      This family of probe points is used to probe the SCSI activities.  
      It contains the following probe points:
    </para>
!Itapset/scsi.stp
  </chapter>

  <chapter id="networking.stp">
    <title>Networking Tapset</title>
    <para>
      This family of probe points is used to probe the activities of
      network device. 
    </para>
!Itapset/networking.stp
  </chapter>

  <chapter id="socket.stp">
    <title>Socket Tapset</title>
    <para>
      This family of probe points is used to probe socket activities.
      It contains the following probe points:
   </para>
!Itapset/socket.stp
  </chapter>

  <chapter id="tcp.stp">
    <title>TCP Tapset</title>
    <para>
      This family of probe points is used to probe TCP layer activities.
      It contains the following probe points:
    </para>
!Itapset/tcp.stp
  </chapter>

  <chapter id="upd.stp">
    <title>UDP Tapset</title>
    <para>
      This family of probe points is used to probe UDP layer activities.
      It contains the following probe points:
    </para>
!Itapset/udp.stp
  </chapter>

  <chapter id="process.stp">
    <title>Process Tapset</title>
    <para>
      This family of probe points is used to probe the process activities.
      It contains the following probe points:
    </para>
!Itapset/process.stp
  </chapter>
  <chapter id="signal.stp">
    <title>Signal Tapset</title>
    <para>
      This family of probe points is used to probe signal activities.
      It contains the following probe points:
    </para>
!Itapset/signal.stp
  </chapter>

</book>