1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry PUBLIC "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" "http://www.samba.org/samba/DTD/samba-doc">
3 <refentry id="eventlogadm.8">
6 <refentrytitle>eventlogadm</refentrytitle>
7 <manvolnum>8</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">System Administration tools</refmiscinfo>
10 <refmiscinfo class="version">3.5</refmiscinfo>
15 <refname>eventlogadm</refname>
16 <refpurpose>push records into the Samba event log store</refpurpose>
22 <command>eventlogadm</command>
23 <arg><option>-d</option></arg>
24 <arg><option>-h</option></arg>
25 <arg choice="plain"><option>-o</option>
26 <literal>addsource</literal>
27 <replaceable>EVENTLOG</replaceable>
28 <replaceable>SOURCENAME</replaceable>
29 <replaceable>MSGFILE</replaceable>
34 <command>eventlogadm</command>
35 <arg><option>-d</option></arg>
36 <arg><option>-h</option></arg>
37 <arg choice="plain"><option>-o</option>
38 <literal>write</literal>
39 <replaceable>EVENTLOG</replaceable>
44 <command>eventlogadm</command>
45 <arg><option>-d</option></arg>
46 <arg><option>-h</option></arg>
47 <arg choice="plain"><option>-o</option>
48 <literal>dump</literal>
49 <replaceable>EVENTLOG</replaceable>
50 <replaceable>RECORD_NUMBER</replaceable>
58 <title>DESCRIPTION</title>
60 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
61 <manvolnum>1</manvolnum></citerefentry> suite.</para>
63 <para><command>eventlogadm</command> is a filter that accepts
64 formatted event log records on standard input and writes them
65 to the Samba event log store. Windows client can then manipulate
66 these record using the usual administration tools.</para>
72 <title>OPTIONS</title>
77 <term><option>-d</option></term>
79 The <command>-d</command> option causes <command>eventlogadm</command> to emit debugging
87 <literal>addsource</literal>
88 <replaceable>EVENTLOG</replaceable>
89 <replaceable>SOURCENAME</replaceable>
90 <replaceable>MSGFILE</replaceable>
93 The <command>-o addsource</command> option creates a
101 <literal>write</literal>
102 <replaceable>EVENTLOG</replaceable>
105 The <command>-o write</command> reads event log
106 records from standard input and writes them to the Samba
107 event log store named by EVENTLOG.
114 <literal>write</literal>
115 <replaceable>EVENTLOG</replaceable>
116 <replaceable>RECORD_NUMBER</replaceable>
119 The <command>-o dump</command> reads event log
120 records from a EVENTLOG tdb and dumps them to standard
126 <term><option>-h</option></term>
128 Print usage information.
137 <title>EVENTLOG RECORD FORMAT</title>
139 <para>For the write operation, <command>eventlogadm</command>
140 expects to be able to read structured records from standard
141 input. These records are a sequence of lines, with the record key
142 and data separated by a colon character. Records are separated
143 by at least one or more blank line.</para>
145 <para>The event log record field are:</para>
149 <command>LEN</command> - This field should be 0, since <command>eventlogadm</command> will calculate this value.
153 <command>RS1</command> - This must be the value 1699505740.
157 <command>RCN</command> - This field should be 0.
161 <command>TMG</command> - The time the eventlog record
162 was generated; format is the number of seconds since
163 00:00:00 January 1, 1970, UTC.
167 <command>TMW</command> - The time the eventlog record was
168 written; format is the number of seconds since 00:00:00
169 January 1, 1970, UTC.
173 <command>EID</command> - The eventlog ID.
177 <command>ETP</command> - The event type -- one of
179 "ERROR", "WARNING", "AUDIT
180 SUCCESS" or "AUDIT FAILURE".
184 <command>ECT</command> - The event category; this depends
185 on the message file. It is primarily used as a means of
186 filtering in the eventlog viewer.
190 <command>RS2</command> - This field should be 0.
194 <command>CRN</command> - This field should be 0.
198 <command>USL</command> - This field should be 0.
202 <command>SRC</command> - This field contains the source
203 name associated with the event log. If a message file is
204 used with an event log, there will be a registry entry
205 for associating this source name with a message file DLL.
209 <command>SRN</command> - The name of the machine on
210 which the eventlog was generated. This is typically the
215 <command>STR</command> - The text associated with the
216 eventlog. There may be more than one string in a record.
220 <command>DAT</command> - This field should be left unset.
228 <title>EXAMPLES</title>
229 <para>An example of the record format accepted by <command>eventlogadm</command>:</para>
245 STR: (root) CMD ( rm -f /var/spool/cron/lastrun/cron.hourly)
249 <para>Set up an eventlog source, specifying a message file DLL:</para>
251 eventlogadm -o addsource Application MyApplication | \\
252 %SystemRoot%/system32/MyApplication.dll
255 <para>Filter messages from the system log into an event log:</para>
257 tail -f /var/log/messages | \\
258 my_program_to_parse_into_eventlog_records | \\
259 eventlogadm SystemLogEvents
265 <title>VERSION</title>
266 <para>This man page is correct for version 3.0.25 of the Samba suite.</para>
270 <title>AUTHOR</title>
272 <para> The original Samba software and related utilities were
273 created by Andrew Tridgell. Samba is now developed by the
274 Samba Team as an Open Source project similar to the way the
275 Linux kernel is developed.</para>