1
1
# TSHARK in a container
2
2
3
- This container starts a tshark and safes the captured packages in files. It
4
- uses a ring buffer with a default file size of 1 Gigabyte and a maximum number
3
+ This container starts a tshark and safes the captured packages in files. It
4
+ uses a ring buffer with a default file size of 1 Gigabyte and a maximum number
5
5
of files of 10. All files are stored in the ` /data ` directory.
6
6
7
7
## Usage
@@ -23,6 +23,7 @@ These options are configurable:
23
23
| ` DURATION ` | ` "" ` |
24
24
| ` FILENAME ` | ` dump ` |
25
25
| ` FORMAT ` | ` pcapng ` |
26
+ | ` SNAPLENGTH ` | <deactivated > |
26
27
27
28
` IFACE ` space-separated list of interfaces tshark should listen on.
28
29
@@ -34,22 +35,26 @@ be opened. The unit for this is Megabytes (1 Megabyte = 1,000,000 bytes).
34
35
` MAXFILENUM ` is the maximum number of files that are opened before tshark
35
36
starts overwriting old files one by one beginning with the first one.
36
37
37
- ` DURATION ` is the maximum number of seconds tshark waits until it begins to
38
+ ` DURATION ` is the maximum number of seconds tshark waits until it begins to
38
39
write into the next file.
39
40
40
- The ` FILENAME ` variable sets the filename that is used. The default value is
41
- ` dump ` . A number will be attached to each file (see tshark manpage for more
42
- information). To dump on multiple interfaces simply add more interfaces to this
41
+ The ` FILENAME ` variable sets the filename that is used. The default value is
42
+ ` dump ` . A number will be attached to each file (see tshark manpage for more
43
+ information). To dump on multiple interfaces simply add more interfaces to this
43
44
variable seperated by a whitespace (e.g. "eth0 eth1").
44
45
45
46
` FORMAT ` sets the file-format of the written trace. Note that when you're setting
46
47
the ` FORMAT ` to ` pcap ` for example, the ` FILENAME ` has to be changed to ` dump.pcap ` .
47
48
Other formats are described in the [ official tshark documentation] ( https://www.wireshark.org/docs/man-pages/tshark.html ) .
48
49
50
+ ` SNAPLENGTH ` is the amount of data for each frame that is actually captured by the
51
+ network capturing tool and stored into the CaptureFile. This is sometimes called PacketSlicing.
52
+ By default this is turned off so large packets are not truncated by accident.
53
+
49
54
Example:
50
55
51
56
```
52
- -> % ls -1 dump
57
+ -> % ls -1 dump
53
58
dump_00164_20180622110637
54
59
dump_00165_20180622110638
55
60
dump_00166_20180622110639
@@ -73,13 +78,13 @@ option to read captured raw packages from a file.
73
78
74
79
### Display Filters
75
80
76
- Since ` tshark ` does not allow for wireshark like filters to be applied to a
77
- capture stream. And the functionality of piping to a ` tshark ` and than applying
78
- a read filter is also broken (see
79
- https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2234 ), applying wireshark
81
+ Since ` tshark ` does not allow for wireshark like filters to be applied to a
82
+ capture stream. And the functionality of piping to a ` tshark ` and than applying
83
+ a read filter is also broken (see
84
+ https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=2234 ), applying wireshark
80
85
like filters needs to be done in a second filter pass.
81
86
82
- This can be done with a local installed instance of ` tshark ` or using the
87
+ This can be done with a local installed instance of ` tshark ` or using the
83
88
` tshark ` provided by the docker-pcap container:
84
89
85
90
```
0 commit comments