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

Provide loop count status #269

Closed
519seven opened this issue Dec 7, 2016 · 1 comment
Closed

Provide loop count status #269

519seven opened this issue Dec 7, 2016 · 1 comment
Assignees
Milestone

Comments

@519seven
Copy link

519seven commented Dec 7, 2016

Enhancement request:

I have several projects for which I'd like to be able to track the number of times a pcap has been played completely and loops back to the beginning (a.k.a. "a loop counter"). For example, a simple --loop-status argument would cause the loop # to be printed to stdout which I could redirect to a file using basic bash output redirection. An enhanced version would include the current loop count and requested loop count but for now, I'm able to pull the requested count from the running command that was issued and create the X/Y ratio myself. Thank you.

@fklassen fklassen self-assigned this Dec 7, 2016
@fklassen fklassen added this to the 4.2 milestone Feb 27, 2017
@fklassen fklassen added the 4.2.0 label Feb 27, 2017
@fklassen
Copy link
Member

#288 - Stats are printed when using --stats=0 option. Examples:

tcpreplay -ieth0 --loop 5 --mbps 0.25 --stats 0  ping.pcap
Loop 1 of 5...
Actual: 16 packets (1568 bytes) sent in 0.050214 seconds
Rated: 31200.0 Bps, 0.249 Mbps, 318.63 pps
Loop 2 of 5...
Actual: 32 packets (3136 bytes) sent in 0.100388 seconds
Rated: 31200.0 Bps, 0.249 Mbps, 318.76 pps
Loop 3 of 5...
Actual: 48 packets (4704 bytes) sent in 0.150569 seconds
Rated: 31200.0 Bps, 0.249 Mbps, 318.79 pps
Loop 4 of 5...
Actual: 64 packets (6272 bytes) sent in 0.200741 seconds
Rated: 31200.0 Bps, 0.249 Mbps, 318.81 pps
Loop 5 of 5...
Actual: 80 packets (7840 bytes) sent in 0.251036 seconds
Rated: 31200.0 Bps, 0.249 Mbps, 318.67 pps
Flows: 2 flows, 7.96 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 --loop 5 --pps 30 --stats 0  ping.pcap
Loop 1 of 5...
Actual: 16 packets (1568 bytes) sent in 0.500041 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.99 pps
Loop 2 of 5...
Actual: 32 packets (3136 bytes) sent in 1.03 seconds
Rated: 3000.0 Bps, 0.024 Mbps, 30.96 pps
Loop 3 of 5...
Actual: 48 packets (4704 bytes) sent in 1.56 seconds
Rated: 3000.0 Bps, 0.024 Mbps, 30.63 pps
Loop 4 of 5...
Actual: 64 packets (6272 bytes) sent in 2.10 seconds
Rated: 2900.0 Bps, 0.023 Mbps, 30.47 pps
Loop 5 of 5...
Actual: 80 packets (7840 bytes) sent in 2.63 seconds
Rated: 2900.0 Bps, 0.023 Mbps, 30.37 pps
Flows: 2 flows, 0.75 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 0  ping.pcap
Loop 1 of 5...
Actual: 16 packets (1568 bytes) sent in 0.502379 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.84 pps
Loop 2 of 5...
Actual: 32 packets (3136 bytes) sent in 1.00 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.81 pps
Loop 3 of 5...
Actual: 48 packets (4704 bytes) sent in 1.50 seconds
Rated: 3100.0 Bps, 0.024 Mbps, 31.81 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...
Actual: 80 packets (7840 bytes) sent in 2.01 seconds
Rated: 3800.0 Bps, 0.030 Mbps, 39.75 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