processes/threads monitor

From: Angelo Borsotti
Date: Sat Jan 31 2009 - 16:57:49 EST


I wish to be personally CC'ed the answers/comments posted to the list
in response to this posting

In 2004, a thread appeared in the mailing list, stating the need for
some means to
monitor processes and threads. Patches were proposed, and alternatives solutions
hinted. However, the thread ended with no final solution to the problem.
I would like to bring the problem up again.

The need occurs on Linux installations in which there are some process
control applications,
or some continuous sever applications that need some resilience
towards process failures.
When a process providing an essential service terminates, come
"process monitor" would
create it again, restoring the service automatically (and without the
need for human intervention).
Traditionally this has been implemented in a very inefficient way by
having some process
reading periodically the list of running processes (e.g. by execing
"ps") and checking if the
processes providing essential service are still there.
This is clearly very inefficient, and all the more, it needs to be
executed repeatedly polling
A much more efficient solution would be for the process monitor to be
allowed to wait
for the termination of any processes/threads belonging to a specified list.
Note that this would mean waiting for one among several events to occur.

Are there any solution to this?

-Angelo Borsotti
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at