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="log2pcap.1">
6 <refentrytitle>log2pcap</refentrytitle>
7 <manvolnum>1</manvolnum>
8 <refmiscinfo class="source">Samba</refmiscinfo>
9 <refmiscinfo class="manual">User Commands</refmiscinfo>
10 <refmiscinfo class="version">3.5</refmiscinfo>
15 <refname>log2pcap</refname>
16 <refpurpose>Extract network traces from Samba log files</refpurpose>
21 <command>log2pcap</command>
22 <arg choice="opt">-h</arg>
23 <arg choice="opt">-q</arg>
24 <arg choice="opt">logfile</arg>
25 <arg choice="opt">pcap_file</arg>
30 <title>DESCRIPTION</title>
32 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
33 <manvolnum>7</manvolnum></citerefentry> suite.</para>
35 <para><command>log2pcap</command> reads in a
36 samba log file and generates a pcap file (readable
37 by most sniffers, such as ethereal or tcpdump) based on the packet
38 dumps in the log file.</para>
40 <para>The log file must have a <parameter>log level</parameter>
41 of at least <constant>5</constant> to get the SMB header/parameters
42 right, <constant>10</constant> to get the first 512 data bytes of the
43 packet and <constant>50</constant> to get the whole packet.
48 <title>OPTIONS</title>
53 <listitem><para>If this parameter is
54 specified the output file will be a
55 hex dump, in a format that is readable
56 by the <application>text2pcap</application> utility.</para></listitem>
61 <listitem><para>Be quiet. No warning messages about missing
62 or incomplete data will be given.</para></listitem>
68 Samba log file. log2pcap will try to read the log from stdin
69 if the log file is not specified.
74 <term>pcap_file</term>
76 Name of the output file to write the pcap (or hexdump) data to.
77 If this argument is not specified, output data will be written
88 <title>EXAMPLES</title>
90 <para>Extract all network traffic from all samba log files:</para>
92 <para><programlisting>
93 <prompt>$</prompt> log2pcap < /var/log/* > trace.pcap
94 </programlisting></para>
96 <para>Convert to pcap using text2pcap:</para>
98 <para><programlisting>
99 <prompt>$</prompt> log2pcap -h samba.log | text2pcap -T 139,139 - trace.pcap
100 </programlisting></para>
104 <title>VERSION</title>
106 <para>This man page is correct for version 3 of the Samba suite.</para>
112 <para>Only SMB data is extracted from the samba logs, no LDAP,
113 NetBIOS lookup or other data.</para>
115 <para>The generated TCP and IP headers don't contain a valid
122 <title>SEE ALSO</title>
123 <para><citerefentry><refentrytitle>text2pcap</refentrytitle>
124 <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>ethereal</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>
128 <title>AUTHOR</title>
130 <para>The original Samba software and related utilities
131 were created by Andrew Tridgell. Samba is now developed
132 by the Samba Team as an Open Source project similar
133 to the way the Linux kernel is developed.</para>
135 <para>This manpage was written by Jelmer Vernooij.</para>