Chris Browne cbbrowne at lists.slony.info
Thu Dec 18 09:54:40 PST 2008
Update of /home/cvsd/slony1/slony1-engine/tools/altperl
In directory main.slony.info:/tmp/cvs-serv4373

Modified Files:
	slon-tools.pm 
Log Message:
Per Cyril SCETBON - if there are multiple clusters where the cluster
name of one is a substring of that of the other, and they are running
on the same box, the egrep for slon processes can find both clusters'
slon processes.  Add an extra space to allow them to be distinguished.



Index: slon-tools.pm
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/tools/altperl/slon-tools.pm,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** slon-tools.pm	6 Mar 2008 19:21:31 -0000	1.32
--- slon-tools.pm	18 Dec 2008 17:54:38 -0000	1.33
***************
*** 118,122 ****
    my ($dbname, $dbport, $dbhost) = ($DBNAME[$nodenum], $PORT[$nodenum], $HOST[$nodenum]);
    #  print "Searching for PID for $dbname on port $dbport\n";
!   my $command =  ps_args() . "| egrep \"[s]lon .*$CLUSTER_NAME\" | egrep \"host=$dbhost dbname=$dbname.*port=$dbport\" | sort -n | awk '{print \$2}'";
    #print "Command:\n$command\n";
    open(PSOUT, "$command|");
--- 118,122 ----
    my ($dbname, $dbport, $dbhost) = ($DBNAME[$nodenum], $PORT[$nodenum], $HOST[$nodenum]);
    #  print "Searching for PID for $dbname on port $dbport\n";
!   my $command =  ps_args() . "| egrep \"[s]lon .*$CLUSTER_NAME \" | egrep \"host=$dbhost dbname=$dbname.*port=$dbport\" | sort -n | awk '{print \$2}'";
    #print "Command:\n$command\n";
    open(PSOUT, "$command|");



More information about the Slony1-commit mailing list