how to monitor deamon processes

we have several deamon processes which were killed for some unknown reasons. we have to bring the deamon back manually everytime. Deamons running on 2 identical instances. It is ok on one instance but be killed 3 or 4 times a day on another. Any idea how to monitor it? like who/how the processes be killed? AIX 5.3, Oracle 10g.

Thanks

If you are starting your daemons from the /etc/inittab, you can set them up like the cron daemon to automatically respawn it if it is killed or dies. You can see here I kill my cron daemon and the system automatically restarts it because of the "respawn" in the /etc/inittab.

host:/:$ grep ^cron /etc/inittab
cron:23456789:respawn:/usr/sbin/cron

host:/:$ ps -ef | grep cron
    root  4915380        1   0   Jun 15      -  1:02 /usr/sbin/cron

host:/:$ kill 4915380

host:/:$ ps -ef | grep cron
    root  8192228        1   7 15:42:04      -  0:00 /usr/sbin/cron
host:/:$

There is no logging doing it this way, but it will keep your processes running even if they are killed.

---------- Post updated at 03:46 PM ---------- Previous update was at 03:45 PM ----------

As to who is killing them... it has to be either root or the owner of the processes. I don't think you can kill some one else's running processes.

Hi,
Zaxxon is right:
"You should check out the AIX error....."
When the daemon will be good you can listen me.
I prefere add your demon to system src.
create new service. If you do it you can start the service by 'startsrc xxxx', stop by 'stopsrc xxxx', or reload by 'refesh xxxx'.
and system do analogy as write the demon in /etc/inittab.

If it is no normal behaviour that your demon dies I would not recommend respawning it automatically all the time via inittab etc.
You should check out the AIX error report for an according entry and the log file your demon might write and solve the problem of the demon. It could be some memory problem or whatever - the log or errpt should tell.