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">4.0</refmiscinfo>
15 <refname>eventlogadm</refname>
16 <refpurpose>push records into the Samba event log store</refpurpose>
22 <command>eventlogadm</command>
23 <arg><option>-s</option></arg>
24 <arg><option>-d</option></arg>
25 <arg><option>-h</option></arg>
26 <arg choice="plain"><option>-o</option>
27 <literal>addsource</literal>
28 <replaceable>EVENTLOG</replaceable>
29 <replaceable>SOURCENAME</replaceable>
30 <replaceable>MSGFILE</replaceable>
35 <command>eventlogadm</command>
36 <arg><option>-s</option></arg>
37 <arg><option>-d</option></arg>
38 <arg><option>-h</option></arg>
39 <arg choice="plain"><option>-o</option>
40 <literal>write</literal>
41 <replaceable>EVENTLOG</replaceable>
46 <command>eventlogadm</command>
47 <arg><option>-s</option></arg>
48 <arg><option>-d</option></arg>
49 <arg><option>-h</option></arg>
50 <arg choice="plain"><option>-o</option>
51 <literal>dump</literal>
52 <replaceable>EVENTLOG</replaceable>
53 <replaceable>RECORD_NUMBER</replaceable>
61 <title>DESCRIPTION</title>
63 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
64 <manvolnum>1</manvolnum></citerefentry> suite.</para>
66 <para><command>eventlogadm</command> is a filter that accepts
67 formatted event log records on standard input and writes them
68 to the Samba event log store. Windows client can then manipulate
69 these record using the usual administration tools.</para>
75 <title>OPTIONS</title>
81 <replaceable>FILENAME</replaceable>
84 The <command>-s</command> option causes <command>eventlogadm</command> to load the
85 configuration file given as FILENAME instead of the default one used by Samba.
90 <term><option>-d</option></term>
92 The <command>-d</command> option causes <command>eventlogadm</command> to emit debugging
100 <literal>addsource</literal>
101 <replaceable>EVENTLOG</replaceable>
102 <replaceable>SOURCENAME</replaceable>
103 <replaceable>MSGFILE</replaceable>
106 The <command>-o addsource</command> option creates a
107 new event log source.
114 <literal>write</literal>
115 <replaceable>EVENTLOG</replaceable>
118 The <command>-o write</command> reads event log
119 records from standard input and writes them to the Samba
120 event log store named by EVENTLOG.
127 <literal>dump</literal>
128 <replaceable>EVENTLOG</replaceable>
129 <replaceable>RECORD_NUMBER</replaceable>
132 The <command>-o dump</command> reads event log
133 records from a EVENTLOG tdb and dumps them to standard
139 <term><option>-h</option></term>
141 Print usage information.
150 <title>EVENTLOG RECORD FORMAT</title>
152 <para>For the write operation, <command>eventlogadm</command>
153 expects to be able to read structured records from standard
154 input. These records are a sequence of lines, with the record key
155 and data separated by a colon character. Records are separated
156 by at least one or more blank line.</para>
158 <para>The event log record field are:</para>
162 <command>LEN</command> - This field should be 0, since <command>eventlogadm</command> will calculate this value.
166 <command>RS1</command> - This must be the value 1699505740.
170 <command>RCN</command> - This field should be 0.
174 <command>TMG</command> - The time the eventlog record
175 was generated; format is the number of seconds since
176 00:00:00 January 1, 1970, UTC.
180 <command>TMW</command> - The time the eventlog record was
181 written; format is the number of seconds since 00:00:00
182 January 1, 1970, UTC.
186 <command>EID</command> - The eventlog ID.
190 <command>ETP</command> - The event type -- one of
192 "ERROR", "WARNING", "AUDIT
193 SUCCESS" or "AUDIT FAILURE".
197 <command>ECT</command> - The event category; this depends
198 on the message file. It is primarily used as a means of
199 filtering in the eventlog viewer.
203 <command>RS2</command> - This field should be 0.
207 <command>CRN</command> - This field should be 0.
211 <command>USL</command> - This field should be 0.
215 <command>SRC</command> - This field contains the source
216 name associated with the event log. If a message file is
217 used with an event log, there will be a registry entry
218 for associating this source name with a message file DLL.
222 <command>SRN</command> - The name of the machine on
223 which the eventlog was generated. This is typically the
228 <command>STR</command> - The text associated with the
229 eventlog. There may be more than one string in a record.
233 <command>DAT</command> - This field should be left unset.
241 <title>EXAMPLES</title>
242 <para>An example of the record format accepted by <command>eventlogadm</command>:</para>
258 STR: (root) CMD ( rm -f /var/spool/cron/lastrun/cron.hourly)
262 <para>Set up an eventlog source, specifying a message file DLL:</para>
264 eventlogadm -o addsource Application MyApplication | \\
265 %SystemRoot%/system32/MyApplication.dll
268 <para>Filter messages from the system log into an event log:</para>
270 tail -f /var/log/messages | \\
271 my_program_to_parse_into_eventlog_records | \\
272 eventlogadm SystemLogEvents
278 <title>VERSION</title>
279 <para>This man page is correct for version 3.0.25 of the Samba suite.</para>
283 <title>AUTHOR</title>
285 <para> The original Samba software and related utilities were
286 created by Andrew Tridgell. Samba is now developed by the
287 Samba Team as an Open Source project similar to the way the
288 Linux kernel is developed.</para>