Re: Should all services in rc.d support a status argument?
- In reply to: Dan Mahoney (Ports): "Should all services in rc.d support a status argument?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 20 Feb 2025 15:24:46 UTC
On 19/02/2025 22:59, Dan Mahoney (Ports) wrote: > I’m in the process of implementing a nagios check at the dayjob that basically ensures that all “enabled” services are running. (Arguably, the answer to a service that fell over is *not* always to just quietly restart it). > > However, not all services support the “status” command. An observation - I wouldn't trust this anyway. You can have a service that's running but not working. Personally I have scripts that connect to the port, perform a query and check the result. As you say, the automatic restart if a service stops isn't always the best option either - script a clean-up and restart appropriate to every service. Off hand, SASL is a complete PITA. It doesn't crash but it goes ape and consumes all system resources before the swapper eventually shuts it down (if you're lucky), and even then it leaves a stub so it's not clear it's gone. I monitor that by periodically checking swap space and restarting the SASL daemon as a first try if something's eating it all. Looking at other replies to the actual question with interest :-)