Skip to content

ability to work with captured stream "on the fly" #459

Closed
@yp-isi

Description

@yp-isi

When using tcpdump to capture packets and writing to a file, we need to be able to compress the stream before writing. At high packet rates disk seems to be the bottleneck and using an ultra-fast compressor like snappy can significantly reduce disk bandwidth.

I've submitted a patch that adds an option --pipeoutput which inserts a piped "command" between raw capture and output file. For example:
tcpdump -w "pcap_%F-%T.gz" -G 3 -W 60 --pipeoutput gzip
will compress files on the fly.

Since the child (gzip in the example above) is running as a separate process, it can run on another core without robbing main tcpdump of cpu cycles.

Patch submitted: 3e08e65

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions