Difference between revisions of "Capture Packets"

Line 1: Line 1:
 
When diagnosing a problem, Samba developers are likely to request a packet capture (or trace).
 
When diagnosing a problem, Samba developers are likely to request a packet capture (or trace).
  
The best way to do this depends on the tools available on your system. It is often easiest to run the capture tool from the command-line, unless debugging a problem that would require complex capture filters to reduce the network trace (the GUI based network tools, such as wireshark, are sometimes easier for beginners to use).  For most types of problems tracing can be done either on the server or the client.  If tracing on the server puts too much load on the server system to reproduce the problem or results in a network trace that is too large, tracing from the client can be attempted instead.  From the command line of the operating system:
+
The best way to do this depends on the tools available on your system. It is often easiest to run the capture tool from the command-line, unless debugging a problem that would require complex capture filters to reduce the network trace (the GUI based network tools, such as wireshark, are sometimes easier for beginners to use).  For most types of problems tracing can be done either on the server or the client.  If tracing on the server puts too much load on the server system to reproduce the problem or results in a network trace that is too large, tracing from the client can be attempted instead.  From the command line of the operating system type: (note: in the table below, replace FILENAME with the descriptive file name):
 
 
In the table below, replace FILENAME with the descriptive file name.
 
 
{|
 
{|
 
! Tool !! Commandline
 
! Tool !! Commandline

Revision as of 16:17, 27 February 2007

When diagnosing a problem, Samba developers are likely to request a packet capture (or trace).

The best way to do this depends on the tools available on your system. It is often easiest to run the capture tool from the command-line, unless debugging a problem that would require complex capture filters to reduce the network trace (the GUI based network tools, such as wireshark, are sometimes easier for beginners to use). For most types of problems tracing can be done either on the server or the client. If tracing on the server puts too much load on the server system to reproduce the problem or results in a network trace that is too large, tracing from the client can be attempted instead. From the command line of the operating system type: (note: in the table below, replace FILENAME with the descriptive file name):

Tool Commandline
wireshark
tshark -p -w FILENAME port 445 or port 139
ethereal
tethereal -p -w FILENAME port 445 or port 139
tcpdump
tcpdump -p -s 1500 -w FILENAME port 445 or port 139

If you are sitting at your Windows workstation it might also work if you download wireshark, start the capture, do the operation that causes trouble, and stop the capture.

For many operations it is also important that we see the beginning of the SMB connection. You can cause the Windows client to reconnect if you kill the smbd process servicing your client, you do not have to restart all of Samba. You can find out the smbd responsible with the tool smbstatus.