From: Stef Coene Date: Mon, 31 Jan 2005 16:15:15 +0000 Subject: Re: [LARTC] Anyone have the userguide's tc script and the corresponding ethloop input files? Message-Id: <200501311715.15302.stef.coene@docum.org> List-Id: References: <20050131032629.71345.qmail@web15507.mail.cnb.yahoo.com> In-Reply-To: <20050131032629.71345.qmail@web15507.mail.cnb.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On Monday 31 January 2005 04:26, CcM wrote: > I'm trying to get picture from ethloop and gnuplot. But the output seems > weird. I still do not know why and want some examples. > > Thanks in advance. This is the only script I found. It uses monitor.pl that I use to get the counters. But you can also see the original code from Devik in comments that uses ethloop. I hope this will help you. burst.sh is a script that creates the tc setup I want to test. client1 and client2 are actually ttcp commands to generate traffic. So the script launchs 2 programs to generate traffic, monitor.pl to get some counters, kills the running ttcp programs, parse the output and use gnuplot to plot it. # set -x CEIL="1000kbps" ./burst.sh $CEIL (sleep 3 ; ./client1 ) & (sleep 6 ; ./client2 ) & monitor.pl end0 sleepP0000 kill `ps -ef | grep ttcp | awk '{print $3}'` kill `ps -ef | grep ttcp | awk '{print $2}'` DATA=/tmp/bb_speed.log PIX="OUT.png" #DATA=$1.out #PROG=$1 #PIX=$2.png #if [ "$2" = "" ]; then PIX=$1.png; fi #ethloop < $1 > $1.out #cat >.plotperl <<"EOF" #$ln=0; $lx=-1000; #while (<>) { #if(/^(\d+)\s+R\s+(\d+)\s+(\d+)/) { #$x = $1/1000; $y = -0.1; $y1 = $y+0.02; $y2 = $y + 0.05; #if ($x-$lx<2) { $ln=($ln+1)%3; } else { $ln=0; } #$y-=$ln*0.04; $lx=$x; $lb=$3; #$lb=int($3/1000)."k" if ($lb>000); #print "set label '$2:$lb' at $x,graph $y center\n"; #print "set arrow from $x,graph $y1 to $x,graph $y2\n"; #} #} #EOF #perl .plotperl $PROG > .plot cat >.plot <