|
From: Jason B. <br...@us...> - 2004-11-16 21:29:10
|
Update of /cvsroot/openxcat/openxcat/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7285 Modified Files: psh Log Message: Make fork even faster by using exec instead of backticks Index: psh =================================================================== RCS file: /cvsroot/openxcat/openxcat/bin/psh,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- psh 16 Nov 2004 20:53:03 -0000 1.9 +++ psh 16 Nov 2004 21:29:00 -0000 1.10 @@ -196,12 +196,14 @@ print "$node$interface: noping\n"; exit; } - my @results = split("\n", `$RSHC $flags $node$interface "$command" 2>&1 | sed "s/^/$node: /"`); - @results = grep { $_ !~ /.Xauthority$/ } @results; - if ( scalar(@results) ) { - print join("\n", @results); - print "\n"; - } + my @results; + exec("$RSHC $flags $node$interface '$command' 2>&1 | sed 's/^/$node: /'"); + #my @results = split("\n", `$RSHC $flags $node$interface "$command" 2>&1 | sed "s/^/$node: /"`); + #@results = grep { $_ !~ /.Xauthority$/ } @results; + #if ( scalar(@results) ) { + # print join("\n", @results); + # print "\n"; + #} exit; } @@ -314,6 +316,7 @@ --serial Run command serially in order --interface <if> Use interface --fork Use forking instead of threads + noderange may be 'me' to specify all the nodes running your pbs job(s). You may also specify a PBS job ID to run on the nodes assigned to that job ID. |