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

Feature request - First and last packet times in --stats output #239

Closed
JohnMcHugh opened this issue Jan 12, 2016 · 1 comment
Closed

Feature request - First and last packet times in --stats output #239

JohnMcHugh opened this issue Jan 12, 2016 · 1 comment
Assignees
Milestone

Comments

@JohnMcHugh
Copy link

I am stress testing a flow sensor using large pcap files constructed for the purpose. The files have 10M to 100M entries each of which produces a unique flow. I loop over them to generate additional unique flow entries. I use the -K option to prestage the packets.

With files this size a considerable period elapses between the start of tcpreplay and the transmission of the first packet. With the 100M packet file (8GB) it takes about a minute. It would be useful to augment the statistics display (produced by --stats=num) with messages giving the times of the first and last packets transmitted (preferably in UTC with millisecond or better precision)

This would enable easy correlation of the transmission interval with logs and other instrumentation for the sensor under test.

I am running tcpreplay 4.1.0

@fklassen fklassen added this to the v4.1.2 milestone Jan 12, 2016
@fklassen fklassen added 4.2.0 and removed 4.1.2 labels Nov 19, 2016
@fklassen fklassen modified the milestones: 4.2, v4.1.2 Nov 19, 2016
@fklassen fklassen self-assigned this Feb 27, 2017
@fklassen
Copy link
Member

Fixed in #289

Examples:

# tcpreplay -ieth0 -t --loop 5 --loopdelay-ms 500 --stats 0  ping.pcap
Test start: 2017-02-27 12:56:41.164445 ...
Loop 1 of 5...
Actual: 16 packets (1568 bytes) sent in 0.503016 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.80 pps
Loop 2 of 5...
Actual: 32 packets (3136 bytes) sent in 1.00 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.83 pps
Loop 3 of 5...
Actual: 48 packets (4704 bytes) sent in 1.50 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.82 pps
Loop 4 of 5...
Actual: 64 packets (6272 bytes) sent in 2.01 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.82 pps
Loop 5 of 5...
Test complete: 2017-02-27 12:56:43.177122
Actual: 80 packets (7840 bytes) sent in 2.01 seconds
Rated: 3800.0 Bps, 0.030 Mbps, 39.74 pps
Flows: 2 flows, 0.99 fps, 400 flow packets, 0 non-flow
Statistics for network device: eth0
	Successful packets:        80
	Failed packets:            0
	Truncated packets:         0
	Retried packets (ENOBUFS): 0
	Retried packets (EAGAIN):  0

# tcpreplay -ieth0 -t --loop 5 --loopdelay-ms 500 --stats 1000  ping.pcap
Test start: 2017-02-27 12:57:02.041400 ...
Test complete: 2017-02-27 12:57:04.052220
Actual: 80 packets (7840 bytes) sent in 2.01 seconds
Rated: 3800.0 Bps, 0.030 Mbps, 39.78 pps
Flows: 2 flows, 0.99 fps, 400 flow packets, 0 non-flow
Statistics for network device: eth0
	Successful packets:        80
	Failed packets:            0
	Truncated packets:         0
	Retried packets (ENOBUFS): 0
	Retried packets (EAGAIN):  0

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

No branches or pull requests

2 participants