Date: Wed, 19 Feb 2025 22:09:58 -0500 From: Paul Procacci <pprocacci@gmail.com> To: "Dan Mahoney (Ports)" <freebsd@gushi.org> Cc: questions <questions@freebsd.org> Subject: Re: Should all services in rc.d support a status argument? Message-ID: <CAFbbPugH3B15yExLCvX1HxGMcKgcrB7T-PRD3wUFMnswLcuh1A@mail.gmail.com> In-Reply-To: <2292C3AA-A425-4C46-92D1-564DB3035F29@gushi.org> References: <7BEE3985-47D4-4A08-9511-D73708A8F1FC@gushi.org> <CAFbbPuiLG7KG-gJydbF-XRc3rCGzdOo1xUNtKJmOHpLb%2BcKJVQ@mail.gmail.com> <2292C3AA-A425-4C46-92D1-564DB3035F29@gushi.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 19, 2025 at 9:12=E2=80=AFPM Dan Mahoney (Ports) <freebsd@gushi.= org> wrote: > Which manpage is that from? It's not listed that way in man rc, nor in m= an service? > man rc.subr > Literally the first sentence in my email: > > >> I=E2=80=99m in the process of implementing a nagios check at the dayjo= b that basically ensures that all =E2=80=9Cenabled=E2=80=9D services are ru= nning. > > This includes services that don't have daemons that listen on a TCP port = or domain socket, but that *do* write PID files, for which the desired chec= k is an individual service nnn status (which can be run as non-root users). > Yeah I saw this, but a simple pid check here is easy enough. Why you must insist on enumerating everything in /etc/rc.d or /usr/local/etc/rc.d/ makes no sense as not everything is a long standing process. You should know the services running on a machine and should have targeted checks for them. That's my position anyways. > I would enumerate those with "service -e", which shows all enabled servic= es, including (as one example) dma_flushq. > > The "service" command makes no distinction between which services are thi= ngs that run once at boot, and which things start long-running daemons, and= that's what I'm looking for. I suppose another command that would be usef= ul is something like "service foo haspid". > Yeah, I get all this. I personally think the word service is misused here, but that's another topic for another day. > Short of grepping everything in /usr/local/etc/rc.d for "pidfile" there's= no good way to get that list. And that may in fact be the way. > -Dan > ~Paul --=20 __________________ :(){ :|:& };:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFbbPugH3B15yExLCvX1HxGMcKgcrB7T-PRD3wUFMnswLcuh1A>