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:55:58 UTC
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