PF_RING
PF_RING copied to clipboard
disk2n doesn't seem to respect `--takeoff-time`
Hi,
I'm trying to use --takeoff-time option of disk2n. I pass in a UTC timestamp.
disk2n --interface nt:0 --pcap-file my.pcap --takeoff-time "2024-08-22 23:51:34" --one-shot
The pcap spans 90s.
Event log shows (timestamp adjusted to UTC)
22/Aug/2024 23:51:25 [disk2n.c:1994] Using PF_RING v.8.7.0
22/Aug/2024 23:51:25 [disk2n.c:2015] Created PF_RING socket for transmission on device nt:0
22/Aug/2024 23:51:30 [disk2n.c:1270] [reader] PCAP data fully cached
22/Aug/2024 23:53:00 [disk2n.c:375] Waiting thread termination...
I also confirmed in the capture that it started replaying earlier than the specified takeoff time. Is there something else I should be doing? Thanks.
# disk2n --version
disk2n v.3.7.240412 (r5503)
Are you using local time in --takeoff-time ?
Otherwise please run it with -v and report the full output
I'm using UTC time.
I also adjusted the timestamp in the log to be UTC time.
Here's the full log with -v
> disk2n --interface nt:1 --pcap-file my.pcap --takeoff-time "2024-08-23 14:34:00" --one-shot --event-log event.log -v
23/Aug/2024 14:33:22 [disk2n.c:2714] Welcome to disk2n v.3.7.240412 (r5503) [CPU 406F]
23/Aug/2024 14:33:22 [disk2n.c:2740] Reading data in 1024 KB chunks
23/Aug/2024 14:33:22 [disk2n.c:2741] Allocating 1024 MB buffer memory...
23/Aug/2024 14:33:22 [disk2n.c:2792] Memory allocated successfully
23/Aug/2024 14:33:22 [disk2n.c:1994] Using PF_RING v.8.7.0
23/Aug/2024 14:33:22 [disk2n.c:2005] Transmission statistics on /proc/net/pf_ring/stats/118791-none.276
23/Aug/2024 14:33:22 [disk2n.c:2015] Created PF_RING socket for transmission on device nt:1
23/Aug/2024 14:33:22 [disk2n.c:2828] Starting time pulse thread
23/Aug/2024 14:33:22 [disk2n.c:2835] Starting sender thread...
23/Aug/2024 14:33:22 [disk2n.c:2844] Starting pcap packet reader thread...
23/Aug/2024 14:33:24 [disk2n.c:1380] [reader] thread started (chunk = 0)
23/Aug/2024 14:33:24 [disk2n.c:1727] [sender] waiting for timer and reader thread
23/Aug/2024 14:33:24 [disk2n.c:1568] [time-pulse] thread started..
23/Aug/2024 14:33:24 [disk2n.c:1425] [reader] reading pcap file my.pcap
23/Aug/2024 14:33:24 [disk2n.c:1446] [reader] Read throughput: [19377172 bytes/0.035 sec][4.43 Gbit]
23/Aug/2024 14:33:24 [disk2n.c:1425] [reader] reading pcap file my.pcap
23/Aug/2024 14:33:24 [disk2n.c:1270] [reader] PCAP data fully cached
23/Aug/2024 14:33:24 [disk2n.c:1737] [sender] ready to take off
23/Aug/2024 14:33:24 [disk2n.c:1757] [sender] thread started.. (chunk = 0/19)
23/Aug/2024 14:33:25 [disk2n.c:326] [PF_RING] Total stats: 76097 pkts sent
23/Aug/2024 14:33:25 [disk2n.c:334] Transmission Duration: 0:00:00:00:957
23/Aug/2024 14:33:25 [disk2n.c:336] Average TX Throughput: 0.06 Gbit / 0.08 Mpps
23/Aug/2024 14:33:26 [disk2n.c:326] [PF_RING] Total stats: 121778 pkts sent
23/Aug/2024 14:33:26 [disk2n.c:334] Transmission Duration: 0:00:00:01:957
23/Aug/2024 14:33:26 [disk2n.c:336] Average TX Throughput: 0.05 Gbit / 0.06 Mpps
23/Aug/2024 14:33:27 [disk2n.c:326] [PF_RING] Total stats: 159143 pkts sent
23/Aug/2024 14:33:27 [disk2n.c:334] Transmission Duration: 0:00:00:02:957
23/Aug/2024 14:33:27 [disk2n.c:336] Average TX Throughput: 0.04 Gbit / 0.05 Mpps
23/Aug/2024 14:33:28 [disk2n.c:326] [PF_RING] Total stats: 193413 pkts sent
23/Aug/2024 14:33:28 [disk2n.c:334] Transmission Duration: 0:00:00:03:957
23/Aug/2024 14:33:28 [disk2n.c:336] Average TX Throughput: 0.04 Gbit / 0.05 Mpps
23/Aug/2024 14:33:29 [disk2n.c:326] [PF_RING] Total stats: 223690 pkts sent
23/Aug/2024 14:33:29 [disk2n.c:334] Transmission Duration: 0:00:00:04:957
23/Aug/2024 14:33:29 [disk2n.c:336] Average TX Throughput: 0.03 Gbit / 0.05 Mpps
23/Aug/2024 14:33:29 [disk2n.c:375] Waiting thread termination...
23/Aug/2024 14:33:29 [disk2n.c:326] [PF_RING] Total stats: 224817 pkts sent
23/Aug/2024 14:33:29 [disk2n.c:334] Transmission Duration: 0:00:00:04:999
23/Aug/2024 14:33:29 [disk2n.c:336] Average TX Throughput: 0.03 Gbit / 0.04 Mpps
23/Aug/2024 14:33:30 [disk2n.c:2878] Reader thread terminated
23/Aug/2024 14:33:30 [disk2n.c:2882] Sender thread terminated
23/Aug/2024 14:33:30 [disk2n.c:2886] Timer thread terminated
@LucyLu717 that option expects local time, could you try with that?
ah ok, let me try
hm local time also didn't work :(
I will add more info to debug this
I added more info, update to the next nightly build and provide the output again. Thank you.
@cardigliano Hey, I just tried the new binary and seeing the following logs with --takeoff-time "2024-09-10 02:47:44"
10/Sep/2024 02:20:37 [disk2n.c:1570] [time-pulse] thread started..
10/Sep/2024 02:20:37 [disk2n.c:1292] [reader] waiting.. (buffer full) :-)
10/Sep/2024 02:20:37 [disk2n.c:1739] [sender] ready to take off
10/Sep/2024 02:20:37 [disk2n.c:1745] [sender] take off at 1725954464000000000, now is 1725952837884266158 (ns epoch)
10/Sep/2024 02:20:37 [disk2n.c:1760] [sender] thread started.. (chunk = 0/1024)
10/Sep/2024 02:20:38 [disk2n.c:326] [PF_RING] Total stats: 21860 pkts sent
10/Sep/2024 02:20:38 [disk2n.c:334] Transmission Duration: 0:00:00:00:565
10/Sep/2024 02:20:38 [disk2n.c:336] Average TX Throughput: 0.04 Gbit / 0.04 Mpps
10/Sep/2024 02:20:38 [disk2n.c:1292] [reader] waiting.. (buffer full) :-)
10/Sep/2024 02:20:39 [disk2n.c:326] [PF_RING] Total stats: 50817 pkts sent
10/Sep/2024 02:20:39 [disk2n.c:334] Transmission Duration: 0:00:00:01:565
@LucyLu717 a software update is already available that should address this, please check it out and report. Thank you.
@cardigliano works now with the latest update, thanks!