Batch File to check Process state

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Batch File to check Process state

  • Creator
    Topic
  • #49477
    Patricia Smith
    Participant

    Hello,

    I’m having a problem with one my sites. I have one process that shuts down when it receives a panic message. I’m still working on fixing the problem that causes the panic but in the meantime I would like to run a batch file that checks the state of the process and if the state were “dead” then it would issue the command to start the process.  Does anyone have a TCL or batch file that does this or something similar to it?

    Thanks,

    John Calhoun

    Programmer Analyst

    Owensboro Medical Health System

    270-852-8562 jcalhoun@omhs.org

Viewing 3 reply threads
  • Author
    Replies
    • #62113
      Steve Carter
      Participant

      Can you just setup an alert that will restart the process if it dies?  I think that would be a quicker temporary solution than writing a batch file.

      Steve

    • #62114
      Patricia Smith
      Participant

      I’ll try it out,

      Thanks,

      John

    • #62115
      David Burks
      Participant

      When you set up that alert you might consider configuring so it does not restart the process until it has been down for say 10 minutes and make sure everyone knows about it.  It can be a little frustrating if you are intentionally bringing something down for troubleshooting or other purposes and it keeps coming back up and nobody remembers why.  ðŸ˜‰

    • #62116
      David Dillard
      Participant

      I wrote this script to check the processes in our site and send out an e-mail if any of them were dead or down.  A cron job was used to run the script on a regular schedule (every 15 or 30 min depending depending on the time of day)  

      As David pointed out you want to avoid “crying wolf”  — the e-mails either get everyone in a panic or are ignored as false alarms.

      You should be able to modify it for your specific site and e-mail address and adjust the text to read how you like.

Viewing 3 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,117
Forums
28
Topics
9,292
Replies
34,435
Topic Tags
286
Empty Topic Tags
10