Debian Codegraph @

doc/grokevt-parselog.1.docbook

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <refentry id='grokevt-parselog.1'>
3 <!-- $Id: grokevt-parselog.1.docbook 119 2011-06-20 17:14:14Z tim $ -->
4 <refmeta>
5 <refentrytitle>grokevt-parselog</refentrytitle>
6 <manvolnum>1</manvolnum>
7 <refmiscinfo class="sectdesc">File Conversion Utilities</refmiscinfo>
8 </refmeta>
9 <refnamediv id='name'>
10 <refname>grokevt-parselog</refname>
11 <refpurpose>Parse a windows event log and generate human-readable output based on message resources stored in a database.</refpurpose>
12 </refnamediv>
13
14 <refsect1 id='synopsis'>
15 <title>SYNOPSIS</title>
16 <para>
17 <command>
18 grokevt-parselog -?|--help
19 </command>
20 </para>
21 <para>
22 <command>
23 grokevt-parselog -l <replaceable>database-dir</replaceable>
24 </command>
25 </para>
26 <para>
27 <command>
28 grokevt-parselog -m <replaceable>database-dir</replaceable> <replaceable>log-type</replaceable>
29 </command>
30 </para>
31 <para>
32 <command>
33 grokevt-parselog [-v] [-H] [-h] <replaceable>database-dir</replaceable> <replaceable>log-type</replaceable>
34 </command>
35 </para>
36 </refsect1>
37
38 <refsect1 id='description'>
39 <title>DESCRIPTION</title>
40 <para>
41 grokevt-parselog reads a windows event log (.evt file) and
42 combines that information with messages templates and other
43 resources stored in a pre-generated database. This is then
44 printed to stdout in a comma-separated values (CSV) format.
45 The database must first be created by grokevt-builddb(1).
46 </para>
47 </refsect1>
48
49 <refsect1 id='arguments'>
50 <title>ARGUMENTS</title>
51
52 <variablelist remap='IP'>
53 <varlistentry>
54 <term>
55 <option><replaceable>database-dir</replaceable></option>
56 </term>
57 <listitem>
58 <para>
59 This is the directory where the database is
60 stored. Currently, the actual log files from
61 the original system are also stored in this
62 directory tree.
63 </para>
64 </listitem>
65 </varlistentry>
66 </variablelist>
67
68 <variablelist remap='IP'>
69 <varlistentry>
70 <term>
71 <option><replaceable>log-type</replaceable></option>
72 </term>
73 <listitem>
74 <para>
75 This is the windows name for the log. By
76 default windows has the following logs:
77 <!-- XXX: do newer Windoze versions have additional types? -->
78 <screen>
79 Application
80 Security
81 System
82 </screen>
83 But others may have been created by third party
84 software. Use the -l option to print a list
85 of all available log types. (The log names are case-sensitive.)
86 </para>
87 </listitem>
88 </varlistentry>
89 </variablelist>
90 </refsect1>
91
92 <refsect1 id='options'>
93 <title>OPTIONS</title>
94
95 <variablelist remap='IP'>
96 <varlistentry>
97 <term>
98 <option>-?</option>
99 </term>
100 <listitem>
101 <para>
102 Prints a basic usage statement.
103 </para>
104 </listitem>
105 </varlistentry>
106 </variablelist>
107
108 <variablelist remap='IP'>
109 <varlistentry>
110 <term>
111 <option>--help</option>
112 </term>
113 <listitem>
114 <para>
115 Same as -?.
116 </para>
117 </listitem>
118 </varlistentry>
119 </variablelist>
120
121 <variablelist remap='IP'>
122 <varlistentry>
123 <term>
124 <option>-l</option>
125 </term>
126 <listitem>
127 <para>
128 Log list mode. Lists the logs available in the specified database.
129 </para>
130 </listitem>
131 </varlistentry>
132 </variablelist>
133
134 <variablelist remap='IP'>
135 <varlistentry>
136 <term>
137 <option>-m</option>
138 </term>
139 <listitem>
140 <para>
141 Meta information mode. Lists meta information stored in
142 the header of the specified log file. Does not print any
143 actual log records. (Format of output in this mode is
144 still subject to change.)
145 </para>
146 </listitem>
147 </varlistentry>
148 </variablelist>
149
150 <variablelist remap='IP'>
151 <varlistentry>
152 <term>
153 <option>-v</option>
154 </term>
155 <listitem>
156 <para>
157 Verbose mode. Prints status messages to stderr, which can be helpful for debugging.
158 </para>
159 </listitem>
160 </varlistentry>
161 </variablelist>
162
163 <variablelist remap='IP'>
164 <varlistentry>
165 <term>
166 <option>-h</option>
167 </term>
168 <listitem>
169 <para>
170 Prints a header row at the top of the CSV output
171 containing labels for each column. (This is the default behavior.)
172 </para>
173 </listitem>
174 </varlistentry>
175 </variablelist>
176
177 <variablelist remap='IP'>
178 <varlistentry>
179 <term>
180 <option>-H</option>
181 </term>
182 <listitem>
183 <para>
184 Disables the printing of a header row. This
185 is useful when grokevt-parselog is used in a script.
186 </para>
187 </listitem>
188 </varlistentry>
189 </variablelist>
190
191 </refsect1>
192
193 <refsect1 id='examples'>
194 <title>OUTPUT</title>
195 <para>
196 While the output format is compatible with programs (such as spreadsheets)
197 that understand the de-facto CSV standard format, the format is
198 additionally constrained in that each log entry is written to a
199 single line. Also, special characters and non-printable characters are
200 encoded using a URL-like encoding format of "%XX" where XX are the
201 hexadecimal digits of an encoded character. New line characters and other
202 special characters along with binary data are encoded this way to allow
203 for easy use of grep(1) and similar command line tools.
204 </para>
205 </refsect1>
206
207 <refsect1 id='examples'>
208 <title>EXAMPLES</title>
209 <para>
210 To list all available logs types stored in '~/example.grokevt':
211 <screen>
212 grokevt-parselog -l ~/example.grokevt
213 </screen>
214 </para>
215 <para>
216 To read the 'Application' log from the database stored in
217 '~/example.grokevt' and print it to stdout:
218 <screen>
219 grokevt-parselog ~/example.grokevt Application
220 </screen>
221 </para>
222 <para>
223 To read the 'System' log from the database stored in
224 '~/example.grokevt' and print it to stdout without a header, and
225 with verbosity turned on:
226 <screen>
227 grokevt-parselog -v -H ~/example.grokevt System
228 </screen>
229 </para>
230 </refsect1>
231
232 <refsect1 id='bugs'>
233 <title>BUGS</title>
234 <para>
235 Probably a few. This script has not been extensively tested with some guest platforms.
236 </para>
237 <para>
238 The file event log file format is pretty well understood and implemented, but
239 some diabolical wrapped, dirty, or fragmentary logs may not be correctly parsed.
240 </para>
241 <para>
242 Unicode support is currently limited. Any suggestions on how to
243 better handle unicode output would be appreciated.
244 </para>
245 </refsect1>
246
247 <refsect1 id='credits'>
248 <title>CREDITS</title>
249 <para>
250 Originally written by Jamie French.
251 Converted to Python and extended by Timothy D. Morgan.
252 Andreas Schuster has contributed greatly to the understanding of
253 the event log format.
254 </para>
255 </refsect1>
256
257 <refsect1 id='license'>
258 <title>LICENSE</title>
259 <para>
260 Please see the file "LICENSE" included with this software
261 distribution.
262 </para>
263 <para>
264 This program is distributed in the hope that it will be useful,
265 but WITHOUT ANY WARRANTY; without even the implied warranty of
266 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
267 GNU General Public License version 3 for more details.
268 </para>
269 </refsect1>
270
271 <refsect1 id='seealso'>
272 <title>SEE ALSO</title>
273 <para>
274 grokevt(7) grokevt-addlog(1) grokevt-builddb(1) grokevt-dumpmsgs(1) grokevt-findlogs(1) grokevt-ripdll(1)
275 </para>
276 </refsect1>
277 </refentry>