| 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>db_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="utilities.html" title="Appendix A. Berkeley DB Command Line Utilities" /> |
| 11 | <link rel="prev" href="dbsql.html" title="dbsql" /> |
| 12 | <link rel="next" href="db_tuner.html" title="db_tuner" /> |
| 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">db_stat</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="dbsql.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Appendix A. |
| 26 | Berkeley DB Command Line Utilities |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="db_tuner.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="db_stat"></a>db_stat</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <pre class="programlisting">db_stat -d file [-fN] [-h home] [-P password] [-s database] |
| 42 | |
| 43 | db_stat [-cEelmNrtVxZ] [-C Aclop] [-h home] [-L A] [-M Ah] [-R A] |
| 44 | [-P password] </pre> |
| 45 | <p> |
| 46 | The <span class="command"><strong>db_stat</strong></span> utility displays statistics for Berkeley DB environments. |
| 47 | </p> |
| 48 | <p> |
| 49 | The options are as follows: |
| 50 | </p> |
| 51 | <div class="itemizedlist"> |
| 52 | <ul type="disc"> |
| 53 | <li> |
| 54 | <p> |
| 55 | <span class="bold"><strong>-C</strong></span> |
| 56 | </p> |
| 57 | <p> |
| 58 | Display detailed information about the locking subsystem. |
| 59 | </p> |
| 60 | <div class="itemizedlist"> |
| 61 | <ul type="circle"> |
| 62 | <li> |
| 63 | <p> |
| 64 | <span class="bold"><strong>A</strong></span> |
| 65 | </p> |
| 66 | <p> |
| 67 | Display all information. |
| 68 | </p> |
| 69 | </li> |
| 70 | <li> |
| 71 | <p> |
| 72 | <span class="bold"><strong>c</strong></span> |
| 73 | </p> |
| 74 | <p> |
| 75 | Display lock conflict matrix. |
| 76 | </p> |
| 77 | </li> |
| 78 | <li> |
| 79 | <p> |
| 80 | <span class="bold"><strong>l</strong></span> |
| 81 | </p> |
| 82 | <p> |
| 83 | Display lockers within hash chains. |
| 84 | </p> |
| 85 | </li> |
| 86 | <li> |
| 87 | <p> |
| 88 | <span class="bold"><strong>o</strong></span> |
| 89 | </p> |
| 90 | <p> |
| 91 | Display lock objects within hash chains. |
| 92 | </p> |
| 93 | </li> |
| 94 | <li> |
| 95 | <p> |
| 96 | <span class="bold"><strong>p</strong></span> |
| 97 | </p> |
| 98 | <p> |
| 99 | Display locking subsystem parameters. |
| 100 | </p> |
| 101 | </li> |
| 102 | </ul> |
| 103 | </div> |
| 104 | </li> |
| 105 | <li> |
| 106 | <p> |
| 107 | <span class="bold"><strong>-c</strong></span> |
| 108 | </p> |
| 109 | <p> |
| 110 | Display locking subsystem statistics, as described in the |
| 111 | <a class="xref" href="lockstat.html" title="DB_ENV->lock_stat()">DB_ENV->lock_stat()</a> method. |
| 112 | </p> |
| 113 | </li> |
| 114 | <li> |
| 115 | <p> |
| 116 | <span class="bold"><strong>-d</strong></span> |
| 117 | </p> |
| 118 | <p> |
| 119 | Display database statistics for the specified file, as described in the |
| 120 | <a class="xref" href="dbstat.html" title="DB->stat()">DB->stat()</a> method. |
| 121 | </p> |
| 122 | <p> |
| 123 | If the database contains multiple databases and the <span class="bold"><strong>-s</strong></span> flag is not specified, the statistics are |
| 124 | for the internal database that describes the other databases the file |
| 125 | contains, and not for the file as a whole. |
| 126 | </p> |
| 127 | </li> |
| 128 | <li> |
| 129 | <p> |
| 130 | <span class="bold"><strong>-E</strong></span> |
| 131 | </p> |
| 132 | <p> |
| 133 | Display detailed information about the database environment. |
| 134 | </p> |
| 135 | </li> |
| 136 | <li> |
| 137 | <p> |
| 138 | <span class="bold"><strong>-e</strong></span> |
| 139 | </p> |
| 140 | <p> |
| 141 | Display information about the database environment, including all |
| 142 | configured subsystems of the database environment. |
| 143 | </p> |
| 144 | </li> |
| 145 | <li> |
| 146 | <p> |
| 147 | <span class="bold"><strong>-f</strong></span> |
| 148 | </p> |
| 149 | <p> |
| 150 | Display only those database statistics that can be acquired without |
| 151 | traversing the database. |
| 152 | </p> |
| 153 | </li> |
| 154 | <li> |
| 155 | <p> |
| 156 | <span class="bold"><strong>-h</strong></span> |
| 157 | </p> |
| 158 | <p> |
| 159 | Specify a home directory for the database environment; by default, the |
| 160 | current working directory is used. |
| 161 | </p> |
| 162 | </li> |
| 163 | <li> |
| 164 | <p> |
| 165 | <span class="bold"><strong>-l</strong></span> |
| 166 | </p> |
| 167 | <p> |
| 168 | Display logging subsystem statistics, as described in the |
| 169 | <a class="xref" href="logstat.html" title="DB_ENV->log_stat()">DB_ENV->log_stat()</a> |
| 170 | method. |
| 171 | </p> |
| 172 | </li> |
| 173 | <li> |
| 174 | <p> |
| 175 | <span class="bold"><strong>-L</strong></span> |
| 176 | </p> |
| 177 | <p> |
| 178 | Display all logging subsystem statistics. |
| 179 | </p> |
| 180 | <div class="itemizedlist"> |
| 181 | <ul type="circle"> |
| 182 | <li> |
| 183 | <p> |
| 184 | <span class="bold"><strong>A</strong></span> |
| 185 | </p> |
| 186 | <p> |
| 187 | Display all information. |
| 188 | </p> |
| 189 | </li> |
| 190 | </ul> |
| 191 | </div> |
| 192 | </li> |
| 193 | <li> |
| 194 | <p> |
| 195 | <span class="bold"><strong>-M</strong></span> |
| 196 | </p> |
| 197 | <p> |
| 198 | Display detailed information about the cache. |
| 199 | </p> |
| 200 | <div class="itemizedlist"> |
| 201 | <ul type="circle"> |
| 202 | <li> |
| 203 | <p> |
| 204 | <span class="bold"><strong>A</strong></span> |
| 205 | </p> |
| 206 | <p> |
| 207 | Display all information. |
| 208 | </p> |
| 209 | </li> |
| 210 | <li> |
| 211 | <p> |
| 212 | <span class="bold"><strong>h</strong></span> |
| 213 | </p> |
| 214 | <p> |
| 215 | Display buffers within hash chains. |
| 216 | </p> |
| 217 | </li> |
| 218 | </ul> |
| 219 | </div> |
| 220 | </li> |
| 221 | <li> |
| 222 | <p> |
| 223 | <span class="bold"><strong>-m</strong></span> |
| 224 | </p> |
| 225 | <p> |
| 226 | Display cache statistics, as described in the |
| 227 | <a class="xref" href="mempstat.html" title="DB_ENV->memp_stat()">DB_ENV->memp_stat()</a> |
| 228 | method. |
| 229 | </p> |
| 230 | </li> |
| 231 | <li> |
| 232 | <p> |
| 233 | <span class="bold"><strong>-N</strong></span> |
| 234 | </p> |
| 235 | <p> |
| 236 | Do not acquire shared region mutexes while running. Other problems, |
| 237 | such as potentially fatal errors in Berkeley DB, will be ignored as |
| 238 | well. This option is intended only for debugging errors, and should |
| 239 | not be used under any other circumstances. |
| 240 | </p> |
| 241 | </li> |
| 242 | <li> |
| 243 | <p> |
| 244 | <span class="bold"><strong>-P</strong></span> |
| 245 | </p> |
| 246 | <p> |
| 247 | Specify an environment password. Although Berkeley DB utilities |
| 248 | overwrite password strings as soon as possible, be aware there may be |
| 249 | a window of vulnerability on systems where unprivileged users can see |
| 250 | command-line arguments or where utilities are not able to overwrite |
| 251 | the memory containing the command-line arguments. |
| 252 | </p> |
| 253 | </li> |
| 254 | <li> |
| 255 | <p> |
| 256 | <span class="bold"><strong>-R</strong></span> |
| 257 | </p> |
| 258 | <p> |
| 259 | Display detailed information about the replication subsystem. |
| 260 | </p> |
| 261 | <div class="itemizedlist"> |
| 262 | <ul type="circle"> |
| 263 | <li> |
| 264 | <p> |
| 265 | <span class="bold"><strong>A</strong></span> |
| 266 | </p> |
| 267 | <p> |
| 268 | Display all information. |
| 269 | </p> |
| 270 | </li> |
| 271 | </ul> |
| 272 | </div> |
| 273 | </li> |
| 274 | <li> |
| 275 | <p> |
| 276 | <span class="bold"><strong>-r</strong></span> |
| 277 | </p> |
| 278 | <p> |
| 279 | Display replication statistics, as described in |
| 280 | in the <a class="xref" href="repstat.html" title="DB_ENV->rep_stat()">DB_ENV->rep_stat()</a> |
| 281 | method. |
| 282 | </p> |
| 283 | </li> |
| 284 | <li> |
| 285 | <p> |
| 286 | <span class="bold"><strong>-s</strong></span> |
| 287 | </p> |
| 288 | <p> |
| 289 | Display statistics for the specified database contained in the file |
| 290 | specified with the <span class="bold"><strong>-d</strong></span> flag. |
| 291 | </p> |
| 292 | </li> |
| 293 | <li> |
| 294 | <p> |
| 295 | <span class="bold"><strong>-t</strong></span> |
| 296 | </p> |
| 297 | <p> |
| 298 | Display transaction subsystem statistics, as described in the |
| 299 | <a class="xref" href="txnstat.html" title="DB_ENV->txn_stat()">DB_ENV->txn_stat()</a> |
| 300 | method. |
| 301 | </p> |
| 302 | </li> |
| 303 | <li> |
| 304 | <p> |
| 305 | <span class="bold"><strong>-V</strong></span> |
| 306 | </p> |
| 307 | <p> |
| 308 | Write the library version number to the standard output, and exit. |
| 309 | </p> |
| 310 | </li> |
| 311 | <li> |
| 312 | <p> |
| 313 | <span class="bold"><strong>-x</strong></span> |
| 314 | </p> |
| 315 | <p> |
| 316 | Display mutex subsystem statistics, as described in the |
| 317 | <a class="xref" href="mutexstat.html" title="DB_ENV->mutex_stat()">DB_ENV->mutex_stat()</a> |
| 318 | method. |
| 319 | </p> |
| 320 | </li> |
| 321 | <li> |
| 322 | <p> |
| 323 | <span class="bold"><strong>-Z</strong></span> |
| 324 | </p> |
| 325 | <p> |
| 326 | Reset the statistics after reporting them; valid only with the |
| 327 | <span class="bold"><strong>-C</strong></span>, <span class="bold"><strong>-c</strong></span>, <span class="bold"><strong>-E</strong></span>, |
| 328 | <span class="bold"><strong>-e</strong></span>, <span class="bold"><strong>-L</strong></span>, <span class="bold"><strong>-l</strong></span>, |
| 329 | <span class="bold"><strong>-M</strong></span>, <span class="bold"><strong>-m</strong></span>, <span class="bold"><strong>-R</strong></span>, |
| 330 | <span class="bold"><strong>-r</strong></span>, and <span class="bold"><strong>-t</strong></span> options. |
| 331 | </p> |
| 332 | </li> |
| 333 | </ul> |
| 334 | </div> |
| 335 | <p> |
| 336 | Values normally displayed in quantities of bytes are displayed as a |
| 337 | combination of gigabytes (GB), megabytes (MB), kilobytes (KB), and |
| 338 | bytes (B). Otherwise, values smaller than 10 million are displayed |
| 339 | without any special notation, and values larger than 10 million are |
| 340 | displayed as a number followed by "M". |
| 341 | </p> |
| 342 | <p> |
| 343 | The <span class="command"><strong>db_stat</strong></span> utility may be used with a Berkeley DB environment (as |
| 344 | described for the <span class="bold"><strong>-h</strong></span> option, the |
| 345 | environment variable <span class="bold"><strong>DB_HOME</strong></span>, or |
| 346 | because the utility was run in a directory containing a Berkeley DB |
| 347 | environment). In order to avoid environment corruption when using a |
| 348 | Berkeley DB environment, <span class="command"><strong>db_stat</strong></span> should always be given the chance to |
| 349 | detach from the environment and exit gracefully. To cause <span class="command"><strong>db_stat</strong></span> to |
| 350 | release all environment resources and exit cleanly, send it an |
| 351 | interrupt signal (SIGINT). |
| 352 | </p> |
| 353 | <p> |
| 354 | The <span class="command"><strong>db_stat</strong></span> utility exits 0 on success, and >0 if an error occurs. |
| 355 | </p> |
| 356 | <p>For information on the statistics feature for Berkeley DB SQL interface, see <a class="xref" href="dbsql.html#dbsql_command_feature" title="Command Line Features Unique to dbsql">Command Line Features Unique to dbsql</a>.</p> |
| 357 | <div class="sect2" lang="en" xml:lang="en"> |
| 358 | <div class="titlepage"> |
| 359 | <div> |
| 360 | <div> |
| 361 | <h3 class="title"><a id="idp55427040"></a>Environment Variables</h3> |
| 362 | </div> |
| 363 | </div> |
| 364 | </div> |
| 365 | <div class="sect3" lang="en" xml:lang="en"> |
| 366 | <div class="titlepage"> |
| 367 | <div> |
| 368 | <div> |
| 369 | <h4 class="title"><a id="idp55437256"></a>DB_HOME</h4> |
| 370 | </div> |
| 371 | </div> |
| 372 | </div> |
| 373 | <p> |
| 374 | If the <span class="bold"><strong>-h</strong></span> option is not specified and |
| 375 | the environment variable DB_HOME is set, it is used as the path of the |
| 376 | database home, as described in the |
| 377 | <a class="xref" href="envopen.html" title="DB_ENV->open()">DB_ENV->open()</a> |
| 378 | method. |
| 379 | </p> |
| 380 | </div> |
| 381 | </div> |
| 382 | </div> |
| 383 | <div class="navfooter"> |
| 384 | <hr /> |
| 385 | <table width="100%" summary="Navigation footer"> |
| 386 | <tr> |
| 387 | <td width="40%" align="left"><a accesskey="p" href="dbsql.html">Prev</a> </td> |
| 388 | <td width="20%" align="center"> |
| 389 | <a accesskey="u" href="utilities.html">Up</a> |
| 390 | </td> |
| 391 | <td width="40%" align="right"> <a accesskey="n" href="db_tuner.html">Next</a></td> |
| 392 | </tr> |
| 393 | <tr> |
| 394 | <td width="40%" align="left" valign="top">dbsql </td> |
| 395 | <td width="20%" align="center"> |
| 396 | <a accesskey="h" href="index.html">Home</a> |
| 397 | </td> |
| 398 | <td width="40%" align="right" valign="top"> db_tuner</td> |
| 399 | </tr> |
| 400 | </table> |
| 401 | </div> |
| 402 | </body> |
| 403 | </html> |