pktt
NAME
pktt – controls on-filer packet tracing
SYNOPSIS
pktt start {if | all} [-b bsize] [-d dir] [-s size] [-m pklen] [-v] [-i ipaddr] [-i ipaddr] …pktt pause {if | all}
pktt dump {if | all} [-d dir]
pktt stop {if | all}
pktt status [{if | all}] [-v]
pktt delete [filename.trc]+
pktt list
DESCRIPTION
The pktt command controls a simple on-filer packet tracing facility. Packets can be captured into a trace buffer then dumped to a file, or the captured data can be logged to a file. The data is stored in "tcpdump" format, and can be directly viewed with tcpdump, ethereal, and perhaps other viewers. The output can also be converted using the editcap program to a variety of other formats, including Sniffer, NetMon, and snoop.It is helpful to have pktt available because it can capture traffic from switched networks, and from all the supported filer network media types.
In addition, it is often useful to turn on pktt tracing before a filer crash occurs, as the packet trace can be extracted from the core file.
USAGE
pktt start {if | all} [-b bsize] [-d dir] [-s size] [-m pklen] [-v] [-i ipaddr] [-i ipaddr] …The start subcommand is used to start tracing, (or restart if it has been paused). As mentioned above, the packet trace data is stored in "tcpdump" format in a circular buffer in memory. The options that can be supplied are as follows:
- -b bsize
-
- -d dir
-
Be aware that any existing .trc files will be silently overwritten when the command is issued.
- -s size
-
- -m pklen
-
- -v
-
- -i ipaddr [-i ipaddr] …
-
pktt pause {if | all}
The "pause" subcommand is used to temporarily stop capturing traffic from one or all interfaces. If any unwritten data is in the trace buffer it will be flushed to disk. Use pktt start without any options to restart a paused interface.
pktt dump {if | all} [-d dir]
The dump subcommand causes the contents of the packet trace buffer to be written to a file. If the -d dir option is used the file will be written to that directory, otherwise it will be written to the root directory of the root volume. The name of the file is always if.trc, and the contents are in "tcpdump" format. If a file by that name already exists it will be silently overwritten.
pktt stop {if | all}
This causes all tracing to stop on the named interface, or all interfaces. If you are logging to disk, any unwritten data in the trace buffer will be flushed to disk. If you have not dumped the trace data and you were not tracing to a disk file, the trace data will be lost. This action is not confirmed, so be careful when using this command.
pktt status [{if | all}] [-v]
This can be used to display the buffer and file status of an existing trace. Using "pktt status -v" will give you full tracing status for all interfaces.
pktt delete [filename.trc]+
This allows you to delete one or more tracefiles from the root directory. At least one tracefile must be specified.
pktt list
This allows you to list all tracefiles in the root directory.
EXAMPLES
Examples of pktt start:pktt start e0
This will start capturing network traffic from the "e0″ interface. All traffic will be logged to a 128K circular buffer. Or, if tracing had been suspended previously it would be restarted.
pktt start fa3 -d / -s 100m -b 2m
This starts capturing traffic on the "fa3" interface, writing to a file called "/fa3.trc" which will be allowed to grow to a maximum size of 100MB, with a 2MB buffer.
pktt start el10 -d /home -m 10k -b 500k -i ehost1 -i ehost2
This starts capturing traffic to and from the hosts "ehost1" and "ehost2″, storing the traces into the file "/home/el10.trc”. Up to 10K of each of the packets will be stored, in a 500K buffer. Note that this will only work if the hostnames can be resolved.
pktt start all -b 128k -i 172.20.4.1
All interfaces will start capturing traffic to and from the specified IP address. This is a quick way to look at traffic if you’re not sure which interface to use but you want to see the packets from one or more IP addresses.
NOTES
A number of Win32 programs exist to convert from tcpdump format to NetMon. The Win32 version of "editcap" is preferred, but there are also the "capconv" and "captrans” programs.
Copyright © 1994-2008 NetApp, Inc. Legal Information









































