From: hadaq Date: Tue, 29 Oct 2002 13:43:16 +0000 (+0000) Subject: Performance improvement by join with nov01 -- mm X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=78f98e8b17881978d4d345daad64b54d31bcd119;p=daqdata.git Performance improvement by join with nov01 -- mm --- diff --git a/hadaq/hadaq_init.tcl b/hadaq/hadaq_init.tcl index f8d3acf..78b6332 100644 --- a/hadaq/hadaq_init.tcl +++ b/hadaq/hadaq_init.tcl @@ -16,16 +16,8 @@ foreach i [agent cat] { } if {[lindex $argv 0] == "stop" || [lindex $argv 0] == "restart"} { - set f [open "|rsh $host -l $user \"$psCmd\"" r] - while {[gets $f line] >= 0} { - set cmd [lindex $line 1] - if {![string match {*_manage} $cmd] && [string match {daq_*} $cmd] || [string match {./daq_*} $cmd]} { - puts $line - set pid [lindex $line 0] - catch {eval exec "rsh $host -l $user sh -c {'kill $pid'}"} - } - } - close $f + set cmd "kill `$psCmd | awk '\$2 ~ /daq_/ { print \$1 }'`" + catch {exec rsh $host -l $user "$cmd"} } if {[lindex $argv 0] == "start" || [lindex $argv 0] == "restart"} {