Ad Widget

Collapse

How can I watching a process by a pid file and keep it alive?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • watsonsong
    Junior Member
    • Jul 2014
    • 1

    #1

    How can I watching a process by a pid file and keep it alive?

    I want to keep a process alive, watch whether is it crash, and sample some data for example the memory and CPU useage.
    But I can not find the native support for this, so I write a simple script in ruby to start, stop and check state of the process.
    I use External Check the invoke this script, to check whether the process is still alive. And add a trigger to find whether it has been dead.

    But I met problem when I want to add an action to reboot it. I add an action and set the condition Trigger Name must like the specify trigger name. And add a remote command to launch the process.

    I modify the configure on the agent to enable the remote command support, but there is nothing happend: No email send and no process launched, but the trigger is always red.

    Is there any thing I miss? Where should I check?
    Thank you~
Working...