changeset 0:b3df5f0ce4fb

add test-scripts
author suruga
date Fri, 22 Dec 2017 21:16:53 +0900
parents
children b91b56c80fc5
files LogupdateTest-qsub.sh LogupdateTest-tino.sh LogupdateTest.pl LogupdateTest.sh copy.sh kill-java-qsub.sh killLogupdate.sh scripts/LogupdateTest-tino.sh scripts/LogupdateTest.sh scripts/killLogupdate.sh test.sh
diffstat 11 files changed, 110 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LogupdateTest-qsub.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,7 @@
+#!/bin/sh
+#PBS -q jungle
+#PBS -N ExampleJob
+#PBS -l nodes=3,walltime=00:02:00
+
+/usr/bin/perl /mnt/data/jungle_workspace/LogupdateTest.pl
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LogupdateTest-tino.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,11 @@
+最初の1台にかくこと
+java -cp /mnt/data/Alice.jar alice.topology.manager.TopologyManager -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10000 -port 10001 --noKeepAlive &
+sleep 3
+java -jar /mnt/data/logupdateTest-1.1.jar -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10001 -port 10000  --noKeepAlive 
+
+中間の14台にかくこと
+java -jar /mnt/data/logupdateTest-1.1.jar -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10001 -port 10000  --noKeepAlive 
+
+最後の1台にかくこと
+sleep 10
+java -jar /mnt/data/logupdateTest-1.1.jar -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10001 -port 10000 -write --noKeepAlive 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LogupdateTest.pl	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,33 @@
+#!usr/bin/perl
+
+my $debug = 1;
+
+sub mysystem {
+  my ($cmd) = @_;
+  if ($debug) {
+    print $cmd ,"\n";
+  } else {
+    system $cmd;
+  }
+}
+
+my $nodes = $ENV{'PBS_NODEFILE'};
+
+open my $fd,"<",$nodes or die("can't read file $nodes $!");
+
+while (<$fd>) {
+  chop ;
+  push(@nodes,$_); 
+} 
+
+mysystem("ssh $nodes[0] \"cd /mnt/data/jungle_workspace;java -cp build/libs/Alice.jar alice.topology.manager.TopologyManager -host localhost -p 10000 -port 10001 --noKeepAlive \" &");
+
+sleep 10;
+for my $i (1..($#nodes-1)) {
+  mysystem("ssh $nodes[$i] \"cd /mnt/data/jungle_workspace;java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10003 -port 10000  --noKeepAlive \" & ");
+
+}
+
+sleep 60;
+mysystem("ssh $nodes[$#nodes] \"cd /mnt/data/jungle_workspace;java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10003 -port 10000  -write --noKeepAlive \" &" );
+sleep 60;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LogupdateTest.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,6 @@
+java -cp build/libs/Alice.jar alice.topology.manager.TopologyManager -host localhost -p 10000 -port 10001 --noKeepAlive &
+sleep 3 
+java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10003 -port 10000  --noKeepAlive &
+java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10001 -port 10000  --noKeepAlive &
+sleep 4
+java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10002 -port 10000 -write --noKeepAlive 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/copy.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,10 @@
+#!/bin/sh
+#PBS -q jungle
+#PBS -N copyfile_Job
+#PBS -l nodes=16,walltime=00:00:30
+for serv in `cat $PBS_NODEFILE`
+do
+  mkdir ~/jungle_workspace/copy_test
+  scp scp one@dragonfly.cr.ie.u-ryukyu.ac.jp:src/jungle-core/build/libs/Alice.jar ~/copy_test
+done
+wait
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/kill-java-qsub.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,9 @@
+#!/bin/sh
+#PBS -q jungle
+#PBS -N ExampleJob
+#PBS -l nodes=16,walltime=00:00:30
+for serv in `cat $PBS_NODEFILE`
+do
+  ssh $serv 'hostname;sh /mnt/data/jungle_workspace/scripts/killLogupdate.sh' & 
+done
+wait
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/killLogupdate.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+ps agx | grep logupdate | grep -v grep | grep -v killLogupdate | perl -le 'while (<>){if (/(\d+)/){print "kill -9 $1"}}' | sh & 
+ps agx | grep TopologyManager | grep -v grep | grep -v killLogupdate | perl -le 'while (<>){if (/(\d+)/){print "kill -9 $1"}}' | sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/LogupdateTest-tino.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,11 @@
+最初の1台にかくこと
+java -cp /mnt/data/Alice.jar alice.topology.manager.TopologyManager -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10000 -port 10001 --noKeepAlive &
+sleep 3
+java -jar /mnt/data/logupdateTest-1.1.jar -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10001 -port 10000  --noKeepAlive 
+
+中間の14台にかくこと
+java -jar /mnt/data/logupdateTest-1.1.jar -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10001 -port 10000  --noKeepAlive 
+
+最後の1台にかくこと
+sleep 10
+java -jar /mnt/data/logupdateTest-1.1.jar -host tino-VM1.ads.ie.u-ryukyu.ac.jp -p 10001 -port 10000 -write --noKeepAlive 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/LogupdateTest.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,6 @@
+java -cp build/libs/Alice.jar alice.topology.manager.TopologyManager -host localhost -p 10000 -port 10001 --noKeepAlive &
+sleep 3 
+java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10003 -port 10000  --noKeepAlive &
+java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10001 -port 10000  --noKeepAlive &
+sleep 4
+java -jar build/libs/logupdateTest-1.1.jar -host localhost -p 10002 -port 10000 -write --noKeepAlive 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/scripts/killLogupdate.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+ps agx | grep logupdate | grep -v grep | grep -v killLogupdate | perl -le 'while (<>){if (/(\d+)/){print "kill -9 $1"}}' | sh & 
+ps agx | grep TopologyManager | grep -v grep | grep -v killLogupdate | perl -le 'while (<>){if (/(\d+)/){print "kill -9 $1"}}' | sh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test.sh	Fri Dec 22 21:16:53 2017 +0900
@@ -0,0 +1,9 @@
+#!/bin/sh
+#PBS -q jungle
+#PBS -N ExampleJob
+#PBS -l nodes=16,walltime=00:00:30
+for serv in `cat $PBS_NODEFILE`
+do
+  ssh $serv 'hostname;pwd' & 
+done
+wait