Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postrotate-command not run when tcpdump terminated #1015

Open
cygnus2048 opened this issue Oct 25, 2022 · 1 comment
Open

postrotate-command not run when tcpdump terminated #1015

cygnus2048 opened this issue Oct 25, 2022 · 1 comment

Comments

@cygnus2048
Copy link

tcpdump version 4.9.3

Trying to use postrotate-command to compress the files and does work when the files are rotated, however, when terminating (tried SIGINT, SIGHUP, and SIGTERM) the postrotate-command is not run on the last file.

This leads to a mixture of compressed and uncompressed files.

Worse is when the postrotate-command is doing additional processing of the file, all data since the last rotate is lost.

I believe when terminating and a postrotate-command is specified it should also be run on the active file as well.

@DougSmythies
Copy link

I would also like the ability to ask tcpdump to terminate, but to execute the postrotate-command for the last data capture file. In my case the postrotate-command is actually a script, compression is not involved. Currently, I only terminate two always running tcpdump commands about 1 a month, and then I manually run the post processing script on the last data file and start things again in a new directory. However, I want to change to a new directory every day, without needing any manual intervention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants