Customer Login

  • Check for Running Process
  • I have a process that keeps disappearing for a yet unknown reason. So, I finally added a script that will check for the process, and if it's not there, will restart it. Here it is:
    SERVICE='myprocess'
    
    if ps ax | grep -v grep | grep $SERVICE > /dev/null
    then
        echo "$SERVICE service running, everything is fine"
    else
        echo "$SERVICE is not running"
        /restart_myprocess.com
    fi
    
  • Posted August 23, 2007 09:49 by dave

Back