You changed the script to execute tcpreplay via ./tcpreplay .... Hence you need to change the jobs line to also read ./tcpreplay
As for the stats, you probably could hack the code to print them easily enough after the kill / CTRL-C. I could do it too, but it'd be a day or two before I had time to look into it. You could also just use the 'time' command with say 100 loops and see how long it takes. Then the math would be pretty simple to figure out how many loops you need it to run for 10 seconds. On Mon, Jun 20, 2011 at 11:22 AM, Dileep Simha <dsi...@gmail.com> wrote: > I did that, but still get an error > [...]$ sudo bash scrpit.sh > [sudo] password for ...: > scrpit.sh: line 3: jobs: tcpreplay: no such job > sending out eth0 > processing file: capture.pcap > processing file: capture.pcap > processing file: capture.pcap > processing file: capture.pcap > processing file: capture.pcap > kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or > kill -l [sigspec] > processing file: capture.pcap > processing file: capture.pcap > processing file: capture.pcap.......(keeps going) > SCIPT: > #!/bin/bash > ./tcpreplay --intf1=eth0 --loop=0 capture.pcap & > pid=`jobs -l tcpreplay | cut -d " " -f 2` > sleep 10 > kill -9 $pid > However, if the output for CTRL-C has a bug, then this probably wouldn't be > the route I should take since for my project, since I require a correct time > output. Is there a way to calculate the topspeed of a network interface. > Then I could just calculate the approximate number of loops needed in order > to run for certain time period. > On Mon, Jun 20, 2011 at 2:10 PM, Aaron Turner <synfina...@gmail.com> wrote: >> >> Sorry need more coffee this morning i guess, the script needs an & at >> the end of the tcpreplay line... that puts it in the background so the >> shell script continues running. >> >> so: >> >> tcpreplay -i eth0 --topspeed --loop=0 my.pcap & >> >> or something like that. >> >> On Mon, Jun 20, 2011 at 10:53 AM, Dileep Simha <dsi...@gmail.com> wrote: >> > I tried the script. for the arguments, should I be passing the loop >> > variable in or not? Because otherwise, obviously it has to wait until >> > the >> > loop ends before going to the next line. >> > Anyways, I ran tcpreplay on another linux box with top speed, and CTRL-C >> > works on that machine. I am guessing what you stated earlier, that the >> > system is too busy processing packets in the 1st machine. >> > Also, is it intentional that CTRL-C doesn't print the full report? >> > >> > On Mon, Jun 20, 2011 at 1:43 PM, Aaron Turner <synfina...@gmail.com> >> > wrote: >> >> >> >> Yeah, there is a bug with CTRL-C and the timing calculation. Probably >> >> because it doesn't print the full report. >> >> >> >> CTRL-C should work though. My guess is your system isn't passing the >> >> signal to tcpreplay because it's too busy processing packets. >> >> >> >> Have you tried that shell script I gave you? >> >> >> >> >> >> On Mon, Jun 20, 2011 at 10:23 AM, Dileep Simha <dsi...@gmail.com> >> >> wrote: >> >> > alright, so I realized that CTRL-C does work but only when I don't >> >> > run >> >> > on >> >> > topspeed. Also, I get a negative time interval: >> >> > [.....]$ sudo ./tcpreplay --intf1=eth0 --loop=0 capture.pcap >> >> > sending out eth0 >> >> > processing file: capture.pcap >> >> > processing file: capture.pcap >> >> > processing file: capture.pcap >> >> > Actual: 130 packets (11228 bytes) sent in -1308590569.94 seconds. >> >> > Rated: -0.0 bps, -0.00 Mbps, -0.00 pps >> >> > >> >> > >> >> > On Mon, Jun 20, 2011 at 1:15 PM, Dileep Simha <dsi...@gmail.com> >> >> > wrote: >> >> >> >> >> >> didn't finish the last message.. >> >> >> anyways, i'll check out my system and see what happens with other >> >> >> programs >> >> >> when I press CTRL-C >> >> >> thanks for trying to help. I appreciate it. >> >> >> >> >> >> On Mon, Jun 20, 2011 at 1:13 PM, Dileep Simha <dsi...@gmail.com> >> >> >> wrote: >> >> >>> >> >> >>> I'm running 3.4.4 >> >> >>> Thanks for trying to help. Ill check out >> >> >>> >> >> >>> On Jun 20, 2011 1:07 PM, "Aaron Turner" <synfina...@gmail.com> >> >> >>> wrote: >> >> >>> >> >> >>> What version of tcpreplay? 3.4.4 is the latest. Looks like you're >> >> >>> running an older version, so it's worth upgrading. >> >> >>> >> >> >>> On Mon, Jun 20, 2011 at 10:01 AM, Dileep Simha <dsi...@gmail.com> >> >> >>> wrote: >> >> >>> > Here is the txt of the c... >> >> >> >> >> >> >> >> -- >> >> Aaron Turner >> >> http://synfin.net/ Twitter: @synfinatic >> >> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & >> >> Windows >> >> Those who would give up essential Liberty, to purchase a little >> >> temporary >> >> Safety, deserve neither Liberty nor Safety. >> >> -- Benjamin Franklin >> >> "carpe diem quam minimum credula postero" >> >> >> >> >> >> >> >> ------------------------------------------------------------------------------ >> >> EditLive Enterprise is the world's most technically advanced content >> >> authoring tool. Experience the power of Track Changes, Inline Image >> >> Editing and ensure content is compliant with Accessibility Checking. >> >> http://p.sf.net/sfu/ephox-dev2dev >> >> _______________________________________________ >> >> Tcpreplay-users mailing list >> >> Tcpreplay-users@lists.sourceforge.net >> >> https://lists.sourceforge.net/lists/listinfo/tcpreplay-users >> >> Support Information: http://tcpreplay.synfin.net/trac/wiki/Support >> > >> > >> > >> > ------------------------------------------------------------------------------ >> > EditLive Enterprise is the world's most technically advanced content >> > authoring tool. Experience the power of Track Changes, Inline Image >> > Editing and ensure content is compliant with Accessibility Checking. >> > http://p.sf.net/sfu/ephox-dev2dev >> > _______________________________________________ >> > Tcpreplay-users mailing list >> > Tcpreplay-users@lists.sourceforge.net >> > https://lists.sourceforge.net/lists/listinfo/tcpreplay-users >> > Support Information: http://tcpreplay.synfin.net/trac/wiki/Support >> > >> >> >> >> -- >> Aaron Turner >> http://synfin.net/ Twitter: @synfinatic >> http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & >> Windows >> Those who would give up essential Liberty, to purchase a little temporary >> Safety, deserve neither Liberty nor Safety. >> -- Benjamin Franklin >> "carpe diem quam minimum credula postero" >> >> >> ------------------------------------------------------------------------------ >> EditLive Enterprise is the world's most technically advanced content >> authoring tool. Experience the power of Track Changes, Inline Image >> Editing and ensure content is compliant with Accessibility Checking. >> http://p.sf.net/sfu/ephox-dev2dev >> _______________________________________________ >> Tcpreplay-users mailing list >> Tcpreplay-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/tcpreplay-users >> Support Information: http://tcpreplay.synfin.net/trac/wiki/Support > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Tcpreplay-users mailing list > Tcpreplay-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tcpreplay-users > Support Information: http://tcpreplay.synfin.net/trac/wiki/Support > -- Aaron Turner http://synfin.net/ Twitter: @synfinatic http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. -- Benjamin Franklin "carpe diem quam minimum credula postero" ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Tcpreplay-users mailing list Tcpreplay-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tcpreplay-users Support Information: http://tcpreplay.synfin.net/trac/wiki/Support