Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Feb 2025 15:24:46 +0000
From:      Frank Leonhardt <freebsd-doc@fjl.co.uk>
To:        questions@freebsd.org
Subject:   Re: Should all services in rc.d support a status argument?
Message-ID:  <1739a1c4-4c96-4153-9c8f-718a3d81871f@fjl.co.uk>
In-Reply-To: <7BEE3985-47D4-4A08-9511-D73708A8F1FC@gushi.org>
References:  <7BEE3985-47D4-4A08-9511-D73708A8F1FC@gushi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------0LvVUzhz4wA7uS99E3WLtcR0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

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 :-)


--------------0LvVUzhz4wA7uS99E3WLtcR0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 19/02/2025 22:59, Dan Mahoney
      (Ports) wrote:<span style="white-space: pre-wrap">
</span></div>
    <blockquote type="cite"
      cite="mid:7BEE3985-47D4-4A08-9511-D73708A8F1FC@gushi.org">
      <pre class="moz-quote-pre" wrap="">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.
</pre>
    </blockquote>
    <p>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.</p>
    <p>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.</p>
    <p>Looking at other replies to the actual question with interest :-)
      <br>
    </p>
    <p><br>
    </p>
  </body>
</html>

--------------0LvVUzhz4wA7uS99E3WLtcR0--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1739a1c4-4c96-4153-9c8f-718a3d81871f>