Mercurial > hg > Database > jungle-test-scripts
view LogupdateTest.pl @ 1:b91b56c80fc5
separate logfiles
author | suruga |
---|---|
date | Mon, 25 Dec 2017 20:13:58 +0900 |
parents | b3df5f0ce4fb |
children |
line wrap: on
line source
#!usr/bin/perl my $debug = 0; sub mysystem { my ($cmd) = @_; if ($debug) { print $cmd ,"\n"; } else { system $cmd; } } 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 ; unshift(@nodes,$_); } 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 $jungleDir;java -jar build/libs/logupdateTest-1.1.jar -host $nodes[0] -p 10003 -port 10000 --noKeepAlive > $logFile$logNum\" & "); $logNum++; } 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;