]> rtime.felk.cvut.cz Git - frescor/fwp.git/commitdiff
Initial work on test with multiple stations
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 4 Jul 2008 04:47:41 +0000 (06:47 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 4 Jul 2008 04:47:41 +0000 (06:47 +0200)
wme_test/more_sta/run-wlans [new file with mode: 0755]
wme_test/more_sta/wclientpar

diff --git a/wme_test/more_sta/run-wlans b/wme_test/more_sta/run-wlans
new file mode 100755 (executable)
index 0000000..292abc2
--- /dev/null
@@ -0,0 +1,44 @@
+#!/usr/bin/perl -w
+@run_at = qw|localhost/wlan0 localhost/wlan1 localhost/wlan2 localhost/wlan3|;
+$dest = "192.168.1.2";
+
+sub run {
+    my $at = shift; 
+    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);
+    print "running ", join(' ', @args), "\n";
+    if (fork() == 0) {
+       exec(@args);
+       exit();
+    }
+}
+
+
+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 ($i=1; $i <= @run_at; $i++) {
+           $at = 0;
+
+           run($at, $params . " -o $tbw-$ac-$i-stas $dest");
+           # 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");
+           }
+           print "==================\n";
+           
+           for ($j=1; $j <= @run_at; $j++) {
+               wait();
+           }
+           sleep(1);
+       }
+    }
+}
+
index 61a21db7ce352aec088d2fedd45781fc7fc04545..b4f9ac65794887c5733da967cd4e7e61d046bb04 100755 (executable)
@@ -1,5 +1,8 @@
 #!/usr/bin/perl -w
 
+# Runs wclient with given parameters on the host (and interface) given
+# by RUNAT environment variable.
+
 sub get_output {
     my @a=@ARGV;
     my $output = "delay_stats";