I have an agent which monitors a process and restarts it.

It works fine.

The one thing I would like to improve is how quickly it notices that a process 
has died and fails over or restarts it.

I know that I can increase the monitoring level to do this.  However, it seems 
like a lot of wasted cycles.  Instead of polling I would really like a callback.

I searched the archives for "process death" and did not see any comments in 
this area.

I think the basic requirements are:

1.When a process starts it registers itself with a kernel component.  This 
registration also gets passed an action.

2.If the process is gracefully exiting, it unregisters itself.

3.If the process dies, the kernel component would call the action.

I assume this is already there but I have not found it thus far.  It is similar 
to the watchdog but I do not want to kill the whole box, I just want to trigger 
Pacemaker to do the monitor/start cycle.

A possible implementation is:

The registration opens /dev/process_death and leaves it open

Graceful exit does an ioctl to /dev/process_death that going down gracefully.

If a close on /dev/process_death occurs, we know that the process died and we 
need to call an action.  The action would then somehow trigger Pacemaker to do 
the monitor/start cycle of the resource.

Is something like this already there or something better?


Thanks,

Bob


      
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to