fix a few memory leaks and cppcheck detected errors - more in bugreport
[client-tools.git] / exe / linux / start_cluster.pl
blob65ee5daeb9dfaa2f90bb687d8aa20d3804bc36da
1 #!/usr/bin/perl
3 use Getopt::Std;
4 require "/m1/homes/swgsrv/nodes.pl";
6 # verify cmd line arguments and abort if incorrect
7 $Getopt::Std::opt_v = "";
8 Getopt::Std::getopts("v");
10 if ( ! $ARGV[0] )
12 print "usage: startcluster.pl <CLUSTER>\n";
13 print " e.g: startcluster.pl dev\n";
14 exit;
17 $cmd = "ulimit -c unlimited; killall TaskManager_d; cd /swg/swg/test/exe/linux ; ./TaskManager_d -- \@remote_taskmanager.cfg";
19 $cluster = $ARGV[0];
20 if ( ! $node{"$cluster"}{"01"} )
22 print "cluster: $cluster not defined\n";
23 exit;
25 else
27 system("killall LoginServer_d");
28 system("killall CentralServer_d");
29 foreach $n ( sort { $a <=> $b } keys % {$node{"$cluster"}} )
31 $hostname = "$node{\"$cluster\"}{\"$n\"}.$domain";
32 system("/usr/local/bin/ssh -f $user\@$hostname \"$cmd 2>&1 \" > logs/taskmanager-$hostname.log");
34 # system("./LoginServer_d -- \@loginServer.cfg &");
35 # system("./TaskManager_d -- \@taskmanager.cfg > logs/taskmanager-swo-dev17.log");