problem with restarting processes

Clovertech Forums Read Only Archives Cloverleaf Operating Systems problem with restarting processes

  • Creator
    Topic
  • #48978
    Gina Borden
    Participant

      I use the script below (this is just a snippet, if you need the whole thing let me know).  I didn’t write this, and I am limited in my tcl programming.  This script runs from cron at 23:59, and ibex is the first process that it restarts.  We have been having issues for a while now about missing transactions at midnight for ibex.  It appears that if a message is in there when this script runs that I am losing that message.  

      Does anyone know of a modification I can make to this script to keep this from happening?

      I will also post a snippet of the log below the script.

      Thanks for your help.

      Gina Borden

        ##########

         # First shut down the process

         set pid [open “| hcienginestop -p $process” r]

         while {[gets $pid line] >= 0} {

           puts $logfile $line

           flush stdout

         }

         close $pid

         while {[file exists $HciRootDir/$site/exec/processes/$process/pid] == 1} {

           after 3000

         }

         puts $logfile n

         flush stdout

         after 3000

         ##########

         # Restart the process

         set pid [open “| hcienginerun -p $process” r]

         while {[gets $pid line] >= 0} {

           puts $logfile $line

           flush stdout

         }

         close $pid

         while {[file exists $HciRootDir/$site/exec/processes/$process/pid] == 0} {

           after 3000

         }

         puts $logfile n

         flush stdout

         after 3000

       }

      }

      Log file:

      er : Restarting ibex

      Thu Jan 04 00:00:01 EST 2007


      Trying hcicmd…

      Response:

      Process shutdown initiated

      Now trying SIGINT…

      Now trying SIGKILL…

      Process ‘ibex’ is not running

      Process ibex initiated

      lab : Restarting lab

      Thu Jan 04 00:00:01 EST 2007


      Trying hcicmd…

      Response:

      Process shutdown initiated

      Now trying SIGINT…

      Process ‘lab’ is not running

      Process lab initiated

    Viewing 2 reply threads
    • Author
      Replies
      • #60310
        James Cobane
        Participant

          Gina,

          Shutting down a process should not cause a loss of a message in the engine; you may want to verify that ‘Use Recovery DB’ is turned on (checked) for your threads.  Also, you may want to review any custom tcl procs that may be disposing of the messages (possibly inappropriately).

          Hope this helps.

          Jim Cobane

          Henry Ford Health

        • #60311
          Gina Borden
          Participant

            Thanks for your reply:

            Yes, the threads are set to use the Recovery Database.  I am almost thinking that since this is the only system that has issues with the restart processs, that maybe they are doing something at midnight also, that is causing a problem.  I am checking with them also.

            Thanks again,

            Gina Borden

          • #60312
            Bill Bertera
            Participant

              Process shutdown initiated

              Now trying SIGINT…

              Now trying SIGKILL…

              I’d investigate as to why the process is not shutting down properly… something is happenning when your script runs that does not allow the process to get the shutdown command.

          Viewing 2 reply threads
          • The forum ‘Operating Systems’ is closed to new topics and replies.