Debian Codegraph @

docs/api_reference/CXX/db_printlog.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>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 A.  Berkeley DB Command Line Utilities" />
11 <link rel="prev" href="db_log_verify.html" title="db_log_verify" />
12 <link rel="next" href="db_recover.html" title="db_recover" />
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_printlog</th>
22 </tr>
23 <tr>
24 <td width="20%" align="left"><a accesskey="p" href="db_log_verify.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_recover.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_printlog"></a>db_printlog</h2>
38 </div>
39 </div>
40 </div>
41 <pre class="programlisting">db_printlog [-NrV] [-b start-LSN] [-e stop-LSN] [-h home] [-P password]
42 [-D bytes] </pre>
43 <p>
44 The <span class="command"><strong>db_printlog</strong></span> utility is a debugging utility that dumps Berkeley DB
45 log files in a human-readable format.
46 </p>
47 <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
48 <h3 class="title">Note</h3>
49 <p>
50 If the application(s) that use the environment make use of
51 the <a class="xref" href="envset_lg_dir.html" title="DbEnv::set_lg_dir()">DbEnv::set_lg_dir()</a>
52 method, then in order for this utility to run correctly,
53 you need a
54 <a href="../../programmer_reference/env_db_config.html#env_db_config.DB_CONFIG" class="olink">DB_CONFIG</a>
55 file which sets the proper paths using the
56 <a class="xref" href="set_lg_dir_parameter.html" title="set_lg_dir">set_lg_dir</a>
57 configuration parameter.
58 </p>
59 </div>
60 <p>
61 The options are as follows:
62 </p>
63 <div class="itemizedlist">
64 <ul type="disc">
65 <li>
66 <p>
67 <span class="bold"><strong>-b</strong></span>
68 </p>
69 <p>
70 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,
71 followed by a slash (/) character, followed by an offset number, with
72 no intervening whitespace.
73 </p>
74 </li>
75 <li>
76 <p>
77 <span class="bold"><strong>-D</strong></span>
78 </p>
79 <p>
80 Specifies the maximum number of bytes to display for each
81 key/data item found in the log. This option overrides the
82 "set_data_len" parameter found in your DB_CONFIG file, if
83 any.
84 </p>
85 </li>
86 <li>
87 <p>
88 <span class="bold"><strong>-e</strong></span>
89 </p>
90 <p>
91 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,
92 followed by a slash (/) character, followed by an offset number, with
93 no intervening whitespace.
94 </p>
95 </li>
96 <li>
97 <p>
98 <span class="bold"><strong>-h</strong></span>
99 </p>
100 <p>
101 Specify a home directory for the database environment; by default, the
102 current working directory is used.
103 </p>
104 </li>
105 <li>
106 <p>
107 <span class="bold"><strong>-N</strong></span>
108 </p>
109 <p>
110 Do not acquire shared region mutexes while running. Other problems,
111 such as potentially fatal errors in Berkeley DB, will be ignored as
112 well. This option is intended only for debugging errors, and should
113 not be used under any other circumstances.
114 </p>
115 </li>
116 <li>
117 <p>
118 <span class="bold"><strong>-P</strong></span>
119 </p>
120 <p>
121 Specify an environment password. Although Berkeley DB utilities
122 overwrite password strings as soon as possible, be aware there may be
123 a window of vulnerability on systems where unprivileged users can see
124 command-line arguments or where utilities are not able to overwrite
125 the memory containing the command-line arguments.
126 </p>
127 </li>
128 <li>
129 <p>
130 <span class="bold"><strong>-r</strong></span>
131 </p>
132 <p>
133 Read the log files in reverse order.
134 </p>
135 </li>
136 <li>
137 <p>
138 <span class="bold"><strong>-V</strong></span>
139 </p>
140 <p>
141 Write the library version number to the standard output, and exit.
142 </p>
143 </li>
144 </ul>
145 </div>
146 <p>
147 For more information on the <span class="command"><strong>db_printlog</strong></span> output and using it to debug
148 applications, see
149 <a href="../../installation/debug_printlog.html" class="olink">Reviewing Berkeley DB log files</a>.
150 </p>
151 <p>
152 The <span class="command"><strong>db_printlog</strong></span> utility uses a Berkeley DB environment (as described
153 for the <span class="bold"><strong>-h</strong></span> option, the environment
154 variable <span class="bold"><strong>DB_HOME</strong></span>, or because the
155 utility was run in a directory containing a Berkeley DB environment).
156 In order to avoid environment corruption when using a Berkeley DB
157 environment, <span class="command"><strong>db_printlog</strong></span> should always be given the chance to detach
158 from the environment and exit gracefully. To cause <span class="command"><strong>db_printlog</strong></span> to
159 release all environment resources and exit cleanly, send it an
160 interrupt signal (SIGINT).
161 </p>
162 <p>
163 The <span class="command"><strong>db_printlog</strong></span> utility exits 0 on success, and &gt;0 if an error
164 occurs.
165 </p>
166 <div class="sect2" lang="en" xml:lang="en">
167 <div class="titlepage">
168 <div>
169 <div>
170 <h3 class="title"><a id="idp10795288"></a>Environment Variables</h3>
171 </div>
172 </div>
173 </div>
174 <div class="sect3" lang="en" xml:lang="en">
175 <div class="titlepage">
176 <div>
177 <div>
178 <h4 class="title"><a id="idp10795480"></a>DB_HOME</h4>
179 </div>
180 </div>
181 </div>
182 <p>
183 If the <span class="bold"><strong>-h</strong></span> option is not specified and
184 the environment variable DB_HOME is set, it is used as the path of the
185 database home, as described in the
186 <a class="xref" href="envopen.html" title="DbEnv::open()">DbEnv::open()</a>
187 method.
188 </p>
189 </div>
190 </div>
191 </div>
192 <div class="navfooter">
193 <hr />
194 <table width="100%" summary="Navigation footer">
195 <tr>
196 <td width="40%" align="left"><a accesskey="p" href="db_log_verify.html">Prev</a> </td>
197 <td width="20%" align="center">
198 <a accesskey="u" href="utilities.html">Up</a>
199 </td>
200 <td width="40%" align="right"> <a accesskey="n" href="db_recover.html">Next</a></td>
201 </tr>
202 <tr>
203 <td width="40%" align="left" valign="top">db_log_verify </td>
204 <td width="20%" align="center">
205 <a accesskey="h" href="index.html">Home</a>
206 </td>
207 <td width="40%" align="right" valign="top"> db_recover</td>
208 </tr>
209 </table>
210 </div>
211 </body>
212 </html>