|Question on the dependency of processes
|Mon, 14 Mar 2005 09:38:29 -0500
I am a new monit user, working on a project that uses monit to monitor a list of services that has inter-process dependencies. I am not sure if this is the proper news group that I should post this question to, as there are monit implementation questions in this email...
What I have found was that the order in the monitrc file for monitoring these proceeses generate different 'servicelist' content (in the source code). For example, the content of servicelist (when in validate.c::validate() to check for zombie processes) is different if the processes are listed in reverse order in the monitrc file.
For example, say I have a service dependency tree like:
Where as A is the 'root of the tree.
In my monitrc file, I have 'check process' in the following order: E, F, D, C, B, G, A.
If I turn debug on using -v option, the checks on the zombie processes are in the order of: G, F, E, D, C, B, A
If I reverse the order in the monitrc file, and restart monit using -v option, the checks on the zombie processes are in the order of: E, F, D, C, B, G, A. This is in a different result than the previous one.
I went through the code, and noticed that the 'servicelist' is actually re-organized based on the dependencies after the configuration file is parsed.. However, the result yield the most visited process to be the last on the servicelist.
I don't quite understand why the the most visited process is not at the beginning of the list. If my understanding is correct, validate goes through the servicelist, to check process status every poll interval. If we think of a scenario where because process A crashed, process G exited. The current behaviour will result in G being restarted before A, despite the dependency. Would it not make more sense to have the servicelist constructed the other way where the most dependent process be the first process on the servicelist?
Because of the dependencies between these processes, it really only make sense to me if monit would check for the 'root' process first. Or am I mis-using monit?
Thank you very much for your help!
Phone: (613) 763-4286
|[Prev in Thread]
|[Next in Thread]