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>
12 <refname>log2pcap</refname>
13 <refpurpose>Extract network traces from Samba log files</refpurpose>
18 <command>log2pcap</command>
19 <arg choice="opt">-h</arg>
20 <arg choice="opt">-q</arg>
21 <arg choice="opt">logfile</arg>
22 <arg choice="opt">pcap_file</arg>
27 <title>DESCRIPTION</title>
29 <para>This tool is part of the <citerefentry><refentrytitle>samba</refentrytitle>
30 <manvolnum>7</manvolnum></citerefentry> suite.</para>
32 <para><command>log2pcap</command> reads in a
33 samba log file and generates a pcap file (readable
34 by most sniffers, such as ethereal or tcpdump) based on the packet
35 dumps in the log file.</para>
37 <para>The log file must have a <parameter>log level</parameter>
38 of at least <constant>5</constant> to get the SMB header/parameters
39 right, <constant>10</constant> to get the first 512 data bytes of the
40 packet and <constant>50</constant> to get the whole packet.
45 <title>OPTIONS</title>
50 <listitem><para>If this parameter is
51 specified the output file will be a
52 hex dump, in a format that is readable
53 by the <application>text2pcap</application> utility.</para></listitem>
58 <listitem><para>Be quiet. No warning messages about missing
59 or incomplete data will be given.</para></listitem>
65 Samba log file. log2pcap will try to read the log from stdin
66 if the log file is not specified.
71 <term>pcap_file</term>
73 Name of the output file to write the pcap (or hexdump) data to.
74 If this argument is not specified, output data will be written
85 <title>EXAMPLES</title>
87 <para>Extract all network traffic from all samba log files:</para>
89 <para><programlisting>
90 <prompt>$</prompt> log2pcap < /var/log/* > trace.pcap
91 </programlisting></para>
93 <para>Convert to pcap using text2pcap:</para>
95 <para><programlisting>
96 <prompt>$</prompt> log2pcap -h samba.log | text2pcap -T 139,139 - trace.pcap
97 </programlisting></para>
101 <title>VERSION</title>
103 <para>This man page is correct for version 3.0 of the Samba suite.</para>
109 <para>Only SMB data is extracted from the samba logs, no LDAP,
110 NetBIOS lookup or other data.</para>
112 <para>The generated TCP and IP headers don't contain a valid
119 <title>SEE ALSO</title>
120 <para><citerefentry><refentrytitle>text2pcap</refentrytitle>
121 <manvolnum>1</manvolnum></citerefentry>, <citerefentry><refentrytitle>ethereal</refentrytitle><manvolnum>1</manvolnum></citerefentry></para>
125 <title>AUTHOR</title>
127 <para>The original Samba software and related utilities
128 were created by Andrew Tridgell. Samba is now developed
129 by the Samba Team as an Open Source project similar
130 to the way the Linux kernel is developed.</para>
132 <para>This manpage was written by Jelmer Vernooij.</para>