Mercurial > hg > Database > jungle-test-scripts
changeset 1:b91b56c80fc5
separate logfiles
author | suruga |
---|---|
date | Mon, 25 Dec 2017 20:13:58 +0900 |
parents | b3df5f0ce4fb |
children | ddf19a51f91f |
files | LogupdateTest-qsub.sh LogupdateTest.pl |
diffstat | 2 files changed, 13 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/LogupdateTest-qsub.sh Fri Dec 22 21:16:53 2017 +0900 +++ b/LogupdateTest-qsub.sh Mon Dec 25 20:13:58 2017 +0900 @@ -1,7 +1,7 @@ #!/bin/sh #PBS -q jungle #PBS -N ExampleJob -#PBS -l nodes=3,walltime=00:02:00 +#PBS -l nodes=3,walltime=00:04:00 /usr/bin/perl /mnt/data/jungle_workspace/LogupdateTest.pl
--- a/LogupdateTest.pl Fri Dec 22 21:16:53 2017 +0900 +++ b/LogupdateTest.pl Mon Dec 25 20:13:58 2017 +0900 @@ -1,6 +1,6 @@ #!usr/bin/perl -my $debug = 1; +my $debug = 0; sub mysystem { my ($cmd) = @_; @@ -12,22 +12,25 @@ } my $nodes = $ENV{'PBS_NODEFILE'}; +my $jungleDir = "/mnt/data/jungle_workspace"; +my $logFile = "$jungleDir/Log/Log"; +my $logNum = "0000"; open my $fd,"<",$nodes or die("can't read file $nodes $!"); while (<$fd>) { chop ; - push(@nodes,$_); + unshift(@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 \" &"); - +mysystem("ssh $nodes[0] \"cd $jungleDir;java -cp build/libs/Alice.jar alice.topology.manager.TopologyManager -host $nodes[0] -p 10000 -port 10001 --noKeepAlive > $logFile$logNum\" &"); +$logNum++; 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 \" & "); - + mysystem("ssh $nodes[$i] \"cd $jungleDir;java -jar build/libs/logupdateTest-1.1.jar -host $nodes[0] -p 10003 -port 10000 --noKeepAlive > $logFile$logNum\" & "); + $logNum++; } -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; +sleep 10; +mysystem("ssh $nodes[$#nodes] \"cd $jungleDir;java -jar build/libs/logupdateTest-1.1.jar -host $nodes[0] -p 10003 -port 10000 -write --noKeepAlive > $logFile$logNum\" &" ); +sleep 10;