summaryrefslogtreecommitdiffstats
path: root/doc/SystemTap_Tapset_Reference/tapsets.tmpl
blob: c8c5ed72b295aa011ff5c7fb40aec91412d7b9b7 (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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
<?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>
<!--starthere-->
  <copyright>
   <year>2008-2009</year>
   <holder>Red Hat, Inc. and others</holder>
  </copyright>

  <authorgroup>
   <author>
    <othername>SystemTap</othername>
    <contrib>Hackers</contrib>
   </author>
  </authorgroup>


  <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>
<!-- pls dont remove marker comments, as they are used in publican conversion-->
<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>
<!--endhere-->
<!--markerforxi-->
<!-- pls dont remove marker comments, as they are used in publican conversion-->
  <chapter id="context_stp">
    <title>Context Functions</title>
    <para>
      The context functions provide additional information about where
      an event occurred.
      These functions can provide information such as a backtrace to 
      where the event occurred
      and the current register values for the processor.
    </para>
!Itapset/context.stp
!Itapset/context-symbols.stp
!Itapset/ucontext-symbols.stp
!Itapset/context-unwind.stp
!Itapset/ucontext-unwind.stp
  </chapter>

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

  <chapter id="memory_stp">
    <title>Memory Tapset</title>
 <para>
      This family of probe points is used to probe memory-related events
      or query the memory usage of the current process.
      It contains the following probe points:
    </para>
!Itapset/memory.stp
!Itapset/proc_mem.stp
  </chapter>

  <chapter id="task_time_stp">
    <title>Task Time Tapset</title>
    <para>
      This tapset defines utility functions to query time related
      properties of the current tasks, translate those in miliseconds
      and human readable strings.
    </para>
!Itapset/task_time.stp
  </chapter>

  <chapter id="iosched.stp">
    <title>IO Scheduler Tapset</title>
    <para>
      This family of probe points is used to probe 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 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
      the network device and protocol layers.
    </para>
!Itapset/networking.stp
!Itapset/tcp.stp
!Itapset/udp.stp
!Itapset/ip.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="kprocess.stp">
    <title>Kernel Process Tapset</title>
    <para>
      This family of probe points is used to probe process-related activities.
      It contains the following probe points:
    </para>
!Itapset/kprocess.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>
  <chapter id="dentry.stp">
    <title>Directory-entry (dentry) Tapset</title>
    <para>
      This family of functions is used to map kernel VFS
      directory entry pointers to file or full path names.
    </para>
!Itapset/dentry.stp
    </chapter>
  <chapter id="logging.stp">
    <title>Logging Tapset</title>
    <para>
      This family of functions is used to send simple
      message strings to various destinations.
    </para>
!Itapset/logging.stp
    </chapter>
  <chapter id="random.stp">
    <title>Random functions Tapset</title>
    <para>
      These functions deal with random number generation.
    </para>
!Itapset/random.stp
    </chapter>
</book>