File: multi.sh

package info (click to toggle)
ns2 2.35%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 78,864 kB
  • sloc: cpp: 172,923; tcl: 107,130; perl: 6,391; sh: 6,143; ansic: 5,846; makefile: 818; awk: 525; csh: 355
file content (26 lines) | stat: -rwxr-xr-x 668 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/csh

rm -f data* flows*
rm -f multi/flows* multi/tmp* multi/dropRate* multi/data*

set t1=500
foreach ftype ( cbr tcp ) 
	echo "Doing flow type $ftype"
	foreach links ( 1 2 3 4 5 )
		echo "Doing links ${links}"
		ns red-pd.tcl multi netMulti Multi enable 0 links $links ftype $ftype time $t1 
		mv multi.netMulti.Multi.0.flows flows0.${ftype}-${links}
		ns red-pd.tcl multi netMulti Multi links $links ftype $ftype time $t1 
		mv multi.netMulti.Multi.1.flows flows1.${ftype}-${links}
	end
	multi/multi.pl flows0.${ftype}- $t1 0.${ftype}
	multi/multi.pl flows1.${ftype}- $t1 1.${ftype}
end

mv flows* data* multi
cd multi
gnuplot multi.gp
gv multi.ps &

cd ..