Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 03 Oct 2022 13:55:58 -0700
From:      Carl Johnson <carlj@peak.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Possible OS suggestion: make service status smarter about process runtime
Message-ID:  <86zgeceie9.fsf@bay.localnet>
In-Reply-To: <8E0D7E65-CA5D-4338-B4A4-0875B7E30B56@gushi.org> (Dan Mahoney's message of "Mon, 3 Oct 2022 11:18:43 -0700")
References:  <8E0D7E65-CA5D-4338-B4A4-0875B7E30B56@gushi.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan Mahoney <freebsd@gushi.org> writes:

> Hey all,
>
> There's no mailing list for "rc" commands so I'm putting this in generic questions.
>
> We've recently done some pkg upgrades and would like to restart the various services.
>
> It occurs to me that since the rc subsystem knows the command
> involved, (say, /usr/local/sbin/httpd), and already looks at the
> process table and the pid file to figure out if it's running, It's
> also possible to extend the output of service foo status to print how
> long a service has been running.
>
> Further, this could be extended such that there was a way of telling,
> post pkg upgrade or post freebsd-update install, which services were
> in need of a restart.  (I.e. which files had mtimes newer than their
> runtimes).
>
> Thoughts on this?  Is it worth a feature request?

You might want to look into the checkrestart port/package to tell you
which services need to be restarted.

-- 
Carl Johnson		carlj@peak.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86zgeceie9.fsf>