# HG changeset patch # User suruga # Date 1513945013 -32400 # Node ID b3df5f0ce4fb8e44d1d2d7e65a916a6147a6d194 add test-scripts diff -r 000000000000 -r b3df5f0ce4fb LogupdateTest-qsub.sh --- /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 + diff -r 000000000000 -r b3df5f0ce4fb LogupdateTest-tino.sh --- /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 diff -r 000000000000 -r b3df5f0ce4fb LogupdateTest.pl --- /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; diff -r 000000000000 -r b3df5f0ce4fb LogupdateTest.sh --- /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 diff -r 000000000000 -r b3df5f0ce4fb copy.sh --- /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 diff -r 000000000000 -r b3df5f0ce4fb kill-java-qsub.sh --- /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 diff -r 000000000000 -r b3df5f0ce4fb killLogupdate.sh --- /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 diff -r 000000000000 -r b3df5f0ce4fb scripts/LogupdateTest-tino.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 diff -r 000000000000 -r b3df5f0ce4fb scripts/LogupdateTest.sh --- /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 diff -r 000000000000 -r b3df5f0ce4fb scripts/killLogupdate.sh --- /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 diff -r 000000000000 -r b3df5f0ce4fb test.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