sub run {
my $at = shift;
+ my @args = @_;
+
my ($host, $iface) = split(/\//, $run_at[$at], 2);
-
- @args = ();
- push @args, ('ssh', $host) if ($host ne 'localhost');
- push @args, ('wclient');
- push @args, ('-I', $iface) if (defined $iface);
- push @args, split(/ /, shift);
+ unshift @args, ('-I', $iface) if (defined $iface);
+ unshift @args, ('wclient');
+ unshift @args, ('ssh', $host) if ($host ne 'localhost');
print "running ", join(' ', @args), "\n";
if (fork() == 0) {
exec(@args);
}
-for ($tbw=20; $tbw<=20; $tbw+=10) {
- foreach $ac(qw/VO/) {# VI BE BK
- $params="-B $tbw -b $ac -j 50 -s 100 -c 15";
-
+for ($tbw=10; $tbw<=30; $tbw+=5) {
+ foreach $ac(qw/VO VI BE BK/) {
for ($i=1; $i <= @run_at; $i++) {
$at = 0;
- run($at, $params . " -o $tbw-$ac-$i-stas $dest");
+ @args = (split(/ +/,"-B $tbw -b $ac -j 50 -s 100 -c 15 $dest"), ("-C", "$i STAs"));
+ run($at, (@args, ('-o', "$tbw-$ac-$i-stas")));
# Run first tasks at [0] and the remaining in
for ($j=1; $j<@run_at; $j++) {
if ($j > @run_at - $i) { $at++; }
- run($at, $params . " -o $tbw-$ac-$i-stas-$j $dest");
+ run($at, (@args, ('-o', "$tbw-$ac-$i-stas-$j")));
}
print "==================\n";
$PLOT_SINGLE_EXPERIMENT = $opt{'m'} ? 0 : 1;
$EXPERIMENT_TITLES = $opt{'t'};
$PLOT_BOTH_DIRECTIONS=1 if $opt{'b'};
-$
$DELAY_BOUND="[0:".$opt{'d'}."]" if $opt{'d'};
$SET_TERM_TEMPLATE='set term postscript color eps enhanced; set output "${FILE}.eps"' if $opt{'e'};
$SET_TERM_TEMPLATE='set term png enhanced; set output "${FILE}.png"' if $opt{'n'};
my $t=$titles[$experiment];
$t = '' unless $t;
print CMD qq/plot $DELAY_BOUND [0.01:100]\\
- "${FILE}.dat" index 0 with lines ls $ls1 title "AC\\\\_VO $t",\\
- "${FILE}.dat" index 1 with lines ls $ls2 title "AC\\\\_VI $t",\\
- "${FILE}.dat" index 2 with lines ls $ls3 title "AC\\\\_BE $t",\\
- "${FILE}.dat" index 3 with lines ls $ls4 title "AC\\\\_BK $t"/;
+ "${FILE}.dat" index 0 using 1:2 with lines ls $ls1 title "AC\\\\_VO $t",\\
+ "${FILE}.dat" index 1 using 1:2 with lines ls $ls2 title "AC\\\\_VI $t",\\
+ "${FILE}.dat" index 2 using 1:2 with lines ls $ls3 title "AC\\\\_BE $t",\\
+ "${FILE}.dat" index 3 using 1:2 with lines ls $ls4 title "AC\\\\_BK $t"/;
foreach $dat_file (@ARGV[1,2]) {
last if (!defined $dat_file);
$experiment++;
($FILE, , ) = fileparse($dat_file, (".dat"));
($ls1, $ls2, $ls3, $ls4) = map($_+4, ($ls1, $ls2, $ls3, $ls4));
print CMD qq/,\\
- "${FILE}.dat" index 0 with lines ls $ls1 title "AC\\\\_VO $t",\\
- "${FILE}.dat" index 1 with lines ls $ls2 title "AC\\\\_VI $t",\\
- "${FILE}.dat" index 2 with lines ls $ls3 title "AC\\\\_BE $t",\\
- "${FILE}.dat" index 3 with lines ls $ls4 title "AC\\\\_BK $t"/;
+ "${FILE}.dat" index 0 using 1:2 with lines ls $ls1 title "AC\\\\_VO $t",\\
+ "${FILE}.dat" index 1 using 1:2 with lines ls $ls2 title "AC\\\\_VI $t",\\
+ "${FILE}.dat" index 2 using 1:2 with lines ls $ls3 title "AC\\\\_BE $t",\\
+ "${FILE}.dat" index 3 using 1:2 with lines ls $ls4 title "AC\\\\_BK $t"/;
}
print CMD "\n";
last;
if (ph)
stream->rem_addr.sin_addr = *((struct in_addr *)ph->h_addr);
else {
- perror("Unknown server");
+ char str[100];
+ snprintf(str, sizeof(str), "gethostbyname(%s)", server_addr);
+ perror(str);
exit(1);
}
stream->rem_addr.sin_port = htons(BASE_PORT + stream->ac);