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