4 ms·
As the author of god, I'll agree that if your only need is to ensure that a process is running, and that process isn't doing a lot of fancy daemonization or for
by mojombo 17y ago
As the author of god, I'll agree that if your only need is to ensure that a process is running, and that process isn't doing a lot of fancy daemonization or forking, then init is the best solution. In fact, on all our boxes at GitHub we use init to run god, because init is incredibly reliable; who better to ensure that god is actually running?
But if your needs extend to ensuring that your processes are well behaved with respect to memory usage, cpu usage, response to HTTP requests, etc, or any custom metric of your choice, then you have to go a bit farther than the suggestions in this article. God is all about making it easy to keep everything running, no matter how complicated the setup or metrics may be.
- dlsspy 17y agoI've used god quite a bit (that's actually how I found github in the first place, I believe) and found many of its facilities useful. I was mostly aiming for the stuff your system already does (and daemontools for when it doesn't do what it should already do). As this was becoming a rather large work of writing, I didn't want to spend some extra time to, you know, praise god. Some of these things do go into the basics, though. At the very least, memory usage. Using rlimit for memory usage and death-of-child events for signaling restart gives really quick turnarounds for almost free. But rlimit for cpu utilization is less useful for long-lived processes. And for things that are entirely outside of the scope (the most common one for me is, "is my log still growing"), it's just not helpful at all. These are the types of process monitoring where god helps a lot.