Certain Engine commands causing shell window to hang

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Certain Engine commands causing shell window to hang

  • Creator
    Topic
  • #51398
    Graham Hartley
    Participant

      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 hciprocstatus or hcienginerun hangs and I have to close the shell window.  It doesn

    • The forum ‘Cloverleaf’ is closed to new topics and replies.