Debian Codegraph @

docs/api_reference/CXX/repmgrstat.html

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <title>DbEnv::repmgr_stat()</title>
7 <link rel="stylesheet" href="apiReference.css" type="text/css" />
8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
9 <link rel="start" href="index.html" title="Berkeley DB C++ API Reference" />
10 <link rel="up" href="rep.html" title="Chapter 11.  Replication Methods" />
11 <link rel="prev" href="repmgrstart.html" title="DbEnv::repmgr_start()" />
12 <link rel="next" href="repmgrstat_print.html" title="DbEnv::repmgr_stat_print()" />
13 </head>
14 <body>
15 <div xmlns="" class="navheader">
16 <div class="libver">
17 <p>Library Version 11.2.5.3</p>
18 </div>
19 <table width="100%" summary="Navigation header">
20 <tr>
21 <th colspan="3" align="center">DbEnv::repmgr_stat()</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="repmgrstart.html">Prev</a> </td>
25 <th width="60%" align="center">Chapter 11. 
26 Replication Methods
27 </th>
28 <td width="20%" align="right"> <a accesskey="n" href="repmgrstat_print.html">Next</a></td>
29 </tr>
30 </table>
31 <hr />
32 </div>
33 <div class="sect1" lang="en" xml:lang="en">
34 <div class="titlepage">
35 <div>
36 <div>
37 <h2 class="title" style="clear: both"><a id="repmgrstat"></a>DbEnv::repmgr_stat()</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">#include &lt;db_cxx.h&gt;
42
43 int
44 DbEnv::repmgr_stat(DB_REPMGR_STAT **statp, u_int32_t flags); </pre>
45 <p>
46 The <code class="methodname">DbEnv::repmgr_stat()</code> method returns the Replication Manager
47 statistics.
48 </p>
49 <p>
50 The <code class="methodname">DbEnv::repmgr_stat()</code> method creates a statistical structure of
51 type <code class="literal">DB_REPMGR_STAT</code> and copies a pointer to it into a user-specified
52 memory location.
53 </p>
54 <p>
55 Statistical structures are stored in allocated memory. If application-specific allocation
56 routines have been declared (see <a class="xref" href="envset_alloc.html" title="DbEnv::set_alloc()">DbEnv::set_alloc()</a>
57 for more information), they are used to allocate the memory; otherwise, the standard
58 C library <span class="bold"><strong>malloc</strong></span>(3) is used. The caller is responsible
59 for deallocating the memory. To deallocate the memory, free the memory reference;
60 references inside the returned memory need not be individually freed.
61 </p>
62 <p>
63 The following <code class="literal">DB_REPMGR_STAT</code> fields will be filled in:
64 </p>
65 <div class="itemizedlist">
66 <ul type="disc">
67 <li>
68 <p>
69 <span class="bold"><strong>uintmax_t st_connect_fail;</strong></span>
70 </p>
71 <p>
72 The number of times an attempt to open a new TCP/IP connection failed.
73 </p>
74 </li>
75 <li>
76 <p>
77 <span class="bold"><strong>uintmax_t st_connection_drop;</strong></span>
78 </p>
79 <p>
80 The number of times an existing TCP/IP connection
81 failed.
82 </p>
83 </li>
84 <li>
85 <p>
86 <span class="bold"><strong>uintmax_t st_msgs_dropped;</strong></span>
87 </p>
88 <p>
89 The number of outgoing messages that were completely dropped, because
90 the outgoing message queue was full. (Berkeley DB replication is
91 tolerant of dropped messages, and will automatically request
92 retransmission of any missing messages as needed.)
93 </p>
94 </li>
95 <li>
96 <p>
97 <span class="bold"><strong>uintmax_t st_msgs_queued;</strong></span>
98 </p>
99 <p>
100 The number of outgoing messages which could not be transmitted
101 immediately, due to a full network buffer, and had to be queued for
102 later delivery.
103 </p>
104 </li>
105 <li>
106 <p>
107 <span class="bold"><strong>uintmax_t st_perm_failed;</strong></span>
108 </p>
109 <p>
110 The number of times a message critical for maintaining database
111 integrity (for example, a transaction commit), originating at this
112 site, did not receive sufficient acknowledgement from clients,
113 according to the configured acknowledgement policy and acknowledgement
114 timeout.
115 </p>
116 </li>
117 <li>
118 <p>
119 <span class="bold"><strong>uintmax_t st_elect_threads;</strong></span>
120 </p>
121 <p>
122 The number of currently active election threads.
123 </p>
124 </li>
125 <li>
126 <p>
127 <span class="bold"><strong>uintmax_t st_max_elect_threads;</strong></span>
128 </p>
129 <p>
130 The number of election threads for which space is reserved.
131 </p>
132 </li>
133 </ul>
134 </div>
135 <p>
136 The <code class="methodname">DbEnv::repmgr_stat()</code> method may not be called before the
137 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a> method is called.
138 </p>
139 <p>
140 The <code class="methodname">DbEnv::repmgr_stat()</code> <span>
141
142 <span>
143 method either returns a non-zero error value or throws an
144 exception that encapsulates a non-zero error value on
145 failure, and returns 0 on success.
146 </span>
147 </span>
148 </p>
149 <div class="sect2" lang="en" xml:lang="en">
150 <div class="titlepage">
151 <div>
152 <div>
153 <h3 class="title"><a id="idp9992152"></a>Parameters</h3>
154 </div>
155 </div>
156 </div>
157 <div class="sect3" lang="en" xml:lang="en">
158 <div class="titlepage">
159 <div>
160 <div>
161 <h4 class="title"><a id="idp9991248"></a>statp</h4>
162 </div>
163 </div>
164 </div>
165 <p>
166 The <span class="bold"><strong>statp</strong></span> parameter references memory
167 into which a pointer to the allocated statistics structure is copied.
168 </p>
169 </div>
170 <div class="sect3" lang="en" xml:lang="en">
171 <div class="titlepage">
172 <div>
173 <div>
174 <h4 class="title"><a id="idp9945752"></a>flags</h4>
175 </div>
176 </div>
177 </div>
178 <p>
179 The <span class="bold"><strong>flags</strong></span> parameter must be set to 0
180 or the following value:
181 </p>
182 <div class="itemizedlist">
183 <ul type="disc">
184 <li>
185 <p>
186 <code class="literal">DB_STAT_CLEAR</code>
187 </p>
188 <p>
189 Reset statistics after returning their values.
190 </p>
191 </li>
192 </ul>
193 </div>
194 </div>
195 </div>
196 <div class="sect2" lang="en" xml:lang="en">
197 <div class="titlepage">
198 <div>
199 <div>
200 <h3 class="title"><a id="idp10001464"></a>Errors</h3>
201 </div>
202 </div>
203 </div>
204 <p>
205 The <code class="methodname">DbEnv::repmgr_stat()</code> <span>
206
207 <span>
208 method may fail and throw a <a class="link" href="dbexception.html" title="Chapter 6. The DbException Class">DbException</a>
209 exception, encapsulating one of the following non-zero errors, or return one
210 of the following non-zero errors:
211 </span>
212 </span>
213 </p>
214 <div class="sect3" lang="en" xml:lang="en">
215 <div class="titlepage">
216 <div>
217 <div>
218 <h4 class="title"><a id="idp10009304"></a>EINVAL</h4>
219 </div>
220 </div>
221 </div>
222 <p>
223 If the method was called before <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a>
224 was called; or if an invalid flag value or parameter was specified.
225 </p>
226 </div>
227 </div>
228 <div class="sect2" lang="en" xml:lang="en">
229 <div class="titlepage">
230 <div>
231 <div>
232 <h3 class="title"><a id="idp10005936"></a>Class</h3>
233 </div>
234 </div>
235 </div>
236 <p>
237 <a class="link" href="env.html" title="Chapter 5.  The DbEnv Handle">DbEnv</a>
238 </p>
239 </div>
240 <div class="sect2" lang="en" xml:lang="en">
241 <div class="titlepage">
242 <div>
243 <div>
244 <h3 class="title"><a id="idp10003992"></a>See Also</h3>
245 </div>
246 </div>
247 </div>
248 <p>
249 <a class="xref" href="rep.html#replist" title="Replication and Related Methods">Replication and Related Methods</a>
250 </p>
251 </div>
252 </div>
253 <div class="navfooter">
254 <hr />
255 <table width="100%" summary="Navigation footer">
256 <tr>
257 <td width="40%" align="left"><a accesskey="p" href="repmgrstart.html">Prev</a> </td>
258 <td width="20%" align="center">
259 <a accesskey="u" href="rep.html">Up</a>
260 </td>
261 <td width="40%" align="right"> <a accesskey="n" href="repmgrstat_print.html">Next</a></td>
262 </tr>
263 <tr>
264 <td width="40%" align="left" valign="top">DbEnv::repmgr_start() </td>
265 <td width="20%" align="center">
266 <a accesskey="h" href="index.html">Home</a>
267 </td>
268 <td width="40%" align="right" valign="top"> DbEnv::repmgr_stat_print()</td>
269 </tr>
270 </table>
271 </div>
272 </body>
273 </html>