This is a static, read-only archive of Wireshark Q&A. Older questions and answers from October 2017 and earlier can be found at osqa-ask.wireshark.org.
0

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

asked May 21 '26

updated May 21 '26

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 ?

Comments

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

User 2763 ( May 21 '26 )

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".

User 39051 ( May 21 '26 )

1 Answer

0

answered May 21 '26

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?

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.

User 31840 ( May 21 '26 )

I ran several dumpcaps on multiple interfaces

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

-t
Use a separate thread per interface.
User 2763 ( May 21 '26 )

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

User 31840 ( May 22 '26 )

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?

User 36540 ( May 22 '26 )

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.

User 31840 ( May 22 '26 )

(Small note: -n tells dumpcap to write a pcapng file; 1) saying it twice isn't necessary and 2) saying it once isn't even necessary, as pcapng is the default format. Just a note - that's not causing any of these issues.)

User 87485 ( May 22 '26 )

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

Presumably the pathname of the output file is different for each interface.

User 87485 ( May 22 '26 )

Do the two files have identical content? From the names, they appear to be on the same interface, just with different time stamps; is that correct?

User 87485 ( May 22 '26 )
cc-by-sa Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.