Re: Possible OS suggestion: make service status smarter about process runtime
- In reply to: Dan Mahoney : "Possible OS suggestion: make service status smarter about process runtime"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 03 Oct 2022 20:22:22 UTC
On Mon, Oct 3, 2022 at 2:19 PM Dan Mahoney <freebsd@gushi.org> wrote: > 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? > > > > To be frank, how long something's been running is not important, at least in this context. My only concern surrounding how long something has been running is simply to ensure it's running successfully. As for which services needing a restart, I personally don't see any benefit. Either you're a sysadmin who's doing targeted updates, letting your users know in advance a specific service is being restarted due to maintenance anyways, or you're a sysadmin who's not doing their due diligence in keeping track properly of changes occuring on a given system and just taking whatever pkg gives them. I'm the former. That's to say when I run pkg to update packages it's followed by restarting necessary services; all planned in advanced of which my users are informed about it. That's not to say I hate the idea however as some may find it useful. I am not one of those people. I just think something like this is best left for a separate application that someone can obtain through the ports tree. My 2 nickels. Thanks, Paul Procacci -- __________________ :(){ :|:& };: