-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathstatistics.html
106 lines (106 loc) · 6.92 KB
/
statistics.html
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>WiredTiger: Statistics</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="wiredtiger.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><a href="http://wiredtiger.com/"><img alt="Logo" src="LogoFinal-header.png" alt="WiredTiger" /></a></td>
<td style="padding-left: 0.5em;">
<div id="projectname">
 <span id="projectnumber">Version 1.5.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="banner">
<a href="https://github.com/wiredtiger/wiredtiger">Fork me on GitHub</a>
<a class="last" href="http://groups.google.com/group/wiredtiger-users">Join my user group</a>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3.1 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li><a href="community.html"><span>Community</span></a></li>
<li><a href="license.html"><span>License</span></a></li>
</ul>
</div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('statistics.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="headertitle">
<div class="title">Statistics </div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>WiredTiger can be configured to maintain a variety of run-time statistics.</p>
<p>The <code>statistics</code> configuration boolean must be set for statistics to be maintained; see <a class="el" href="data_sources.html#data_statistics">Statistics Data</a> for information about accessing the statistics. The following example configures WiredTiger to maintain statistics:</p>
<div class="fragment"><div class="line"> ret = <a class="code" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database.">wiredtiger_open</a>(home, NULL, <span class="stringliteral">"create,statistics=true"</span>, &conn);</div>
</div><!-- fragment --><p> Note that maintaining statistics involves updating shared-memory data structures and may decrease application performance.</p>
<h1><a class="anchor" id="statistics_log"></a>
Statistics logging</h1>
<p>WiredTiger will optionally log the current database statistics into a file when configured the <code>statistics_log.log</code> configuration string of the <a class="el" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database.">wiredtiger_open</a> function is set.</p>
<p>The following example logs statistics every 30 seconds:</p>
<div class="fragment"><div class="line"> ret = <a class="code" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database.">wiredtiger_open</a>(</div>
<div class="line"> home, NULL, <span class="stringliteral">"create,statistics_log=(wait=30)"</span>, &conn);</div>
</div><!-- fragment --><p> Each statistics record is formatted as a space-separated timestamp, unsigned 64-bit value and a variable length string which describes the statistic. For example:</p>
<div class="fragment"><div class="line">Mar 08 11:38:23 463 pthread mutex condition wait calls</div>
<div class="line">Mar 08 11:38:23 0 files currently open</div>
<div class="line">Mar 08 11:38:23 1855437 total heap memory allocations</div>
<div class="line">Mar 08 11:38:23 1856622 total heap memory frees</div>
<div class="line">Mar 08 11:38:23 1 total heap memory re-allocations</div>
<div class="line">Mar 08 11:38:23 472 total read I/Os</div>
</div><!-- fragment --><p>The timestamp format may be changed with the <code>statistics_log.timestamp</code> configuration string. The <code>timestamp</code> value may contain ISO C90 standard strftime conversion specifications.</p>
<p>The location of the log files may be changed with the <code>statistics_log.path</code> configuration string. The <code>path</code> value value may contain ISO C90 standard strftime conversion specifications. WiredTiger will not create non-existent directories in the path, they must exist before <a class="el" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database.">wiredtiger_open</a> is called.</p>
<p>The following example logs statistics into files named with the month, day and year:</p>
<div class="fragment"><div class="line"> ret = <a class="code" href="group__wt.html#ga9e6adae3fc6964ef837a62795c7840ed" title="Open a connection to a database.">wiredtiger_open</a>(home, NULL,</div>
<div class="line"> <span class="stringliteral">"create,"</span></div>
<div class="line"> <span class="stringliteral">"statistics_log=(wait=120,path=\"/log/log.%m.%d.%y\")"</span>, &conn);</div>
</div><!-- fragment --><p> A Python script that parses the default logging output and uses the <a href="http://www.gnuplot.info/">gnuplot</a>, utility to generate Portable Network Graphics (PNG) format graphs is included in the WiredTiger distribution in the file <code>tools/statlog.py</code>. </p>
</div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="index.html">Reference Guide</a></li><li class="navelem"><a class="el" href="programming.html">Writing WiredTiger applications</a></li>
<li class="footer">Copyright (c) 2008-2013 WiredTiger, Inc. All rights reserved. Contact <a href="mailto:[email protected]">[email protected]</a> for more information.</li>
</ul>
</div>
</body>
</html>