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_printlog</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_load.html" title="db_load" /> 12 <link rel="next" href="db_recover.html" title="db_recover" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center">db_printlog</th> 19 </tr> 20 <tr> 21 <td width="20%" align="left"><a accesskey="p" href="db_load.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_recover.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_printlog"></a>db_printlog</h2> 35 </div> 36 </div> 37 </div> 38 <pre class="programlisting">db_printlog [-NrV] [-b start-LSN] [-e stop-LSN] [-h home] [-P password] </pre> 39 <p> 40 The <span class="command"><strong>db_printlog</strong></span> utility is a debugging utility that dumps Berkeley DB 41 log files in a human-readable format. 42 </p> 43 <p> 44 The options are as follows: 45 </p> 46 <div class="itemizedlist"> 47 <ul type="disc"> 48 <li> 49 <p> 50 <span class="bold"><strong>-b</strong></span> 51 </p> 52 <p> 53 Display log records starting at log sequence number (LSN) <span class="bold"><strong>start-LSN</strong></span>; <span class="bold"><strong>start-LSN</strong></span> is specified as a file number, 54 followed by a slash (/) character, followed by an offset number, with 55 no intervening whitespace. 56 </p> 57 </li> 58 <li> 59 <p> 60 <span class="bold"><strong>-e</strong></span> 61 </p> 62 <p> 63 Stop displaying log records at log sequence number (LSN) <span class="bold"><strong>stop-LSN</strong></span>; <span class="bold"><strong>stop-LSN</strong></span> is specified as a file number, 64 followed by a slash (/) character, followed by an offset number, with 65 no intervening whitespace. 66 </p> 67 </li> 68 <li> 69 <p> 70 <span class="bold"><strong>-h</strong></span> 71 </p> 72 <p> 73 Specify a home directory for the database environment; by default, the 74 current working directory is used. 75 </p> 76 </li> 77 <li> 78 <p> 79 <span class="bold"><strong>-N</strong></span> 80 </p> 81 <p> 82 Do not acquire shared region mutexes while running. Other problems, 83 such as potentially fatal errors in Berkeley DB, will be ignored as 84 well. This option is intended only for debugging errors, and should 85 not be used under any other circumstances. 86 </p> 87 </li> 88 <li> 89 <p> 90 <span class="bold"><strong>-P</strong></span> 91 </p> 92 <p> 93 Specify an environment password. Although Berkeley DB utilities 94 overwrite password strings as soon as possible, be aware there may be 95 a window of vulnerability on systems where unprivileged users can see 96 command-line arguments or where utilities are not able to overwrite 97 the memory containing the command-line arguments. 98 </p> 99 </li> 100 <li> 101 <p> 102 <span class="bold"><strong>-r</strong></span> 103 </p> 104 <p> 105 Read the log files in reverse order. 106 </p> 107 </li> 108 <li> 109 <p> 110 <span class="bold"><strong>-V</strong></span> 111 </p> 112 <p> 113 Write the library version number to the standard output, and exit. 114 </p> 115 </li> 116 </ul> 117 </div> 118 <p> 119 For more information on the <span class="command"><strong>db_printlog</strong></span> output and using it to debug 120 applications, see <a href="../../programmer_reference/debug_printlog.html" class="olink">Reviewing Berkeley DB log files</a>. 121 </p> 122 <p> 123 The <span class="command"><strong>db_printlog</strong></span> utility uses a Berkeley DB environment (as described 124 for the <span class="bold"><strong>-h</strong></span> option, the environment 125 variable <span class="bold"><strong>DB_HOME</strong></span>, or because the 126 utility was run in a directory containing a Berkeley DB environment). 127 In order to avoid environment corruption when using a Berkeley DB 128 environment, <span class="command"><strong>db_printlog</strong></span> should always be given the chance to detach 129 from the environment and exit gracefully. To cause <span class="command"><strong>db_printlog</strong></span> to 130 release all environment resources and exit cleanly, send it an 131 interrupt signal (SIGINT). 132 </p> 133 <p> 134 The <span class="command"><strong>db_printlog</strong></span> utility exits 0 on success, and >0 if an error 135 occurs. 136 </p> 137 <div class="sect2" lang="en" xml:lang="en"> 138 <div class="titlepage"> 139 <div> 140 <div> 141 <h3 class="title"><a id="id1714968"></a>Environment Variables</h3> 142 </div> 143 </div> 144 </div> 145 <div class="sect3" lang="en" xml:lang="en"> 146 <div class="titlepage"> 147 <div> 148 <div> 149 <h4 class="title"><a id="id1715100"></a>DB_HOME</h4> 150 </div> 151 </div> 152 </div> 153 <p> 154 If the <span class="bold"><strong>-h</strong></span> option is not specified and 155 the environment variable DB_HOME is set, it is used as the path of the 156 database home, as described in the 157 <a class="xref" href="envopen.html" title="DB_ENV->open()">DB_ENV->open()</a> 158 method. 159 </p> 160 </div> 161 </div> 162 </div> 163 <div class="navfooter"> 164 <hr /> 165 <table width="100%" summary="Navigation footer"> 166 <tr> 167 <td width="40%" align="left"><a accesskey="p" href="db_load.html">Prev</a> </td> 168 <td width="20%" align="center"> 169 <a accesskey="u" href="utilities.html">Up</a> 170 </td> 171 <td width="40%" align="right"> <a accesskey="n" href="db_recover.html">Next</a></td> 172 </tr> 173 <tr> 174 <td width="40%" align="left" valign="top">db_load </td> 175 <td width="20%" align="center"> 176 <a accesskey="h" href="index.html">Home</a> 177 </td> 178 <td width="40%" align="right" valign="top"> db_recover</td> 179 </tr> 180 </table> 181 </div> 182 </body> 183</html> 184