summaryrefslogtreecommitdiffstats
path: root/runtime/docs/html/dir_000003.html
blob: b9e20e19c77663f3da01839dfb7c81418d129f09 (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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>SystemTap: probes/test4/ Directory Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">probes</a>&nbsp;/&nbsp;<a class="el" href="dir_000003.html">test4</a></div>
<h1>test4 Directory Reference</h1>This example probe tracks file opens, reads and writes.  
<a href="#_details">More...</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Files</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><b>dtr.c</b> <a href="test4_2dtr_8c-source.html">[code]</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><b>dtr.mod.c</b> <a href="dtr_8mod_8c-source.html">[code]</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><b>nrec.c</b> <a href="nrec_8c-source.html">[code]</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">file &nbsp;</td><td class="memItemRight" valign="bottom"><b>README</b> <a href="probes_2test4_2README-source.html">[code]</a></td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This example probe tracks file opens, reads and writes. 
<p>
It demonstrates maps, stats, and iterators.<p>
This is a translation of on an old dtr probe. Original source is <div class="fragment"><pre class="fragment">
global {
  long @opens[string];
  sum @reads[string], @writes[string];
}

probe sys_open:entry {
  @opens[current-&gt;comm]++;
}

probe sys_read:entry {
  @reads[current-&gt;comm] &lt;&lt; count;
}

probe sys_write:entry {
  @writes[current-&gt;comm] &lt;&lt; count;
}
</pre></div> </body></html>