- This topic has 0 replies, 1 voice, and was last updated 14 years, 10 months ago by .
-
Topic
-
I have been trying to write TCL scripts to stop and restart processes in a specific site using the following TCL (snippet): Code:set sites “test”
foreach site $sites {
if {$site == “test” } {
netcfgLoad
set processes [lsort [netcfgGetProcList]]
echo $processes
}echo “Stopping Processes in site $site”
echo “——————————–”
foreach process $processes {
set out [exec tcl [file join $::HciRoot bin hciprocstatus.htc] -p $process]
if {[string match -nocase *dead* $out] == 0} {
echo “About to KILL $process”
echo [THREADCTL die [string trim $process]]
lappend processesToRestart $process
}
}echo “Restarting Processes in site $site”
echo “——————————–”
foreach process $processesToRestart {
set out [exec tcl [file join $::HciRoot bin hciprocstatus.htc] -p $process]
if {[string match -nocase *dead* $out] == 1} {
echo “About to Start $process”
echo [exec perl [file join $::HciRoot bin hcienginerun.pl] -p $process]
}
}
set processesToRestart “”}
I am fairly new to TCL so please excuse any basic errors.
I have been testing this from hcitcl run in the shell window and every so often the command
hciprocstatusor hcienginerunhangs and I have to close the shell window. It doesn
- The forum ‘Cloverleaf’ is closed to new topics and replies.