Ask Your Question
0

Why, sometimes, do I have twin PCAP files with rotate?

asked 2026-05-21 08:17:20 +0000

Manou gravatar image

updated 2026-05-21 13:00:50 +0000

Chuckc gravatar image

I use dumpcap (vsersion 3.6.2) with -b duration and -b filesize option.
Sometimes, i have twin pcap

DATA_0_00002_20251022060511.pcap
DATA_0_00002_20251022060512.pcap

and the capinfos command returns exactly the same information. How can this happen ?

edit retag flag offensive close merge delete

Comments

Can you log the file names to see if there is a pattern?
Dumpcap: print closed ring-buffer file names

Chuckc gravatar imageChuckc ( 2026-05-21 13:11:28 +0000 )edit

My guess is that there is a small window of opportunity that 2 distinct tasks get started to do the same job as you have 2 distinct criteria. There is propably a window during which the first rotation is still in progress that the second one gets triggered doing pretty much the same job.

This is pretty much a case of "shit happens".

hugo.vanderkooij gravatar imagehugo.vanderkooij ( 2026-05-21 13:40:28 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2026-05-21 09:39:46 +0000

SYN-bit gravatar image

That sounds like there are two processes running, generating the files. Are you doing this in Linux with nohup dumpcap .... & perhaps? What does ps aux | grep dumpcap show?

edit flag offensive delete link more

Comments

I ran several dumpcaps on multiple interfaces (approximately 200) over 10 days. The problem only occurred once, during a single rotation. This happens exceptionally. I am indeed using Ubuntu Linux and I do not use the nohup command.

Manou gravatar imageManou ( 2026-05-21 12:25:19 +0000 )edit

I ran several dumpcaps on multiple interfaces

Are you using the threads option? (dumpcap man page)

-t
Use a separate thread per interface.
Chuckc gravatar imageChuckc ( 2026-05-21 14:19:55 +0000 )edit

I use a dumpcap command for each interface: 200 interfaces, therefore 200 dumpcaps.

Manou gravatar imageManou ( 2026-05-22 06:18:03 +0000 )edit

Ah, and you want the packets of all interfaces to be written in the same file? Then you are now relying on all 200 independent dumpcap process to come up with the same name, which it mostly does based on your other command line options. But as you notice, there could be a corner case where they do not.

Why not include all 200 interfaces in the same dumpcap process to make sure it writes packets of those 200 interfaces to the same file?

SYN-bit gravatar imageSYN-bit ( 2026-05-22 06:41:17 +0000 )edit

No I have one pcap set by interface. My dumpcap command (for each interface) looks like this :

/usr/bin/dumpcap -nni vlan.1 -w /data/output/captures/VLAN1/VLAN1_0.pcap  -g -b duration:60 -a filesize:2048 -f  "(src 189.1.1.1 and port 4000) or (src 189.1.1.2 and port 5000)".

For reasons of volumetrics and post-processing, I cannot put everything in the same capture.

Manou gravatar imageManou ( 2026-05-22 07:47:44 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2026-05-21 08:17:20 +0000

Seen: 91 times

Last updated: May 21