Joost Roeleveld wrote: > Hi all, > > After upgrading my system, I always run "needrestart". > This works, mostly, fine. But sometimes I don't pay enough attention > and accidentally allow a critical service to be restarted, causing the > server to become unstable. > > One of this is "multipathd", which is required for the filesystems. > Another is "xenstored" (which has obvious issues with all the VMs > running) > > I am unable to find any config files, but am hoping I can add services > like this to some exclude-list somewhere. > Can someone point me in the right direction? > > Many thanks, > > --- > Joost
I don't know if this will help or not. I use checkrestart to find services or programs that need to be restarted after updates. This is the needed info if you want to try it. It's in a overlay. root@Gentoo-1 / # eix checkrestart [I] app-admin/checkrestart [1] Available versions: (~)0.53{gpkg} {PYTHON_SINGLE_TARGET="python3_10 python3_11 python3_12"} Installed versions: 0.53{gpkg}(12:38:09 PM 10/30/2024)(PYTHON_SINGLE_TARGET="python3_12 -python3_10 -python3_11") Homepage: https://github.com/voyageur/checkrestart/ Description: the sysadmin's rolling upgrade tool [1] "voyageur" /var/db/repos/voyageur root@Gentoo-1 / # What I like about it, it doesn't restart anything. It just lists what needs to be done and you do it manually. That way if there is something that shouldn't be restarted, you just don't restart it. This is a sample of output, pretty good one too. root@Gentoo-1 / # checkrestart Found 76 processes using old versions of upgraded files (54 distinct programs) (36 distinct packages) Of these, 3 seem to contain init scripts which can be used to restart them: app-admin/gkrellm: 2612 /usr/bin/gkrellm sys-apps/systemd-utils: 21459 /usr/bin/udevadm sys-auth/elogind: 21795 /usr/lib/elogind/elogind These are the init scripts: /etc/init.d/gkrellmd restart /etc/init.d/systemd-tmpfiles-setup restart /etc/init.d/systemd-tmpfiles-setup-dev restart /etc/init.d/elogind restart These processes do not seem to have an associated init script to restart them: app-accessibility/at-spi2-core: 2310 /usr/libexec/at-spi2-registryd 2227 /usr/libexec/at-spi-bus-launcher 4877 /usr/libexec/at-spi-bus-launcher app-misc/geoclue: 2615 /usr/libexec/geoclue-2.0/demos/agent gnome-base/dconf: 2354 /usr/libexec/dconf-service gnome-base/gvfs: 11616 /usr/libexec/gvfsd-trash 11636 /usr/libexec/gvfsd-network 3305 /usr/libexec/gvfsd-metadata 11642 /usr/libexec/gvfsd-dnssd 2302 /usr/libexec/gvfsd 3260 /usr/libexec/gvfsd 11595 /usr/libexec/gvfs-udisks2-volume-monitor 11608 /usr/libexec/gvfs-gphoto2-volume-monitor kde-apps/dolphin: 2551 /usr/bin/dolphin 2552 /usr/bin/dolphin 2553 /usr/bin/dolphin 2556 /usr/bin/dolphin kde-apps/konsole: 3210 /usr/bin/konsole kde-apps/kwrite: 2544 /usr/bin/kwrite kde-frameworks/kded: 2317 /usr/bin/kded6 kde-frameworks/kwallet: 2209 /usr/bin/kwalletd6 kde-misc/kclock: 2613 /usr/bin/kclockd kde-misc/krusader: 2535 /usr/bin/krusader kde-plasma/kactivitymanagerd: 2328 /usr/libexec/kactivitymanagerd 25268 /usr/libexec/kactivitymanagerd kde-plasma/kdesu-gui: 2460 /usr/libexec/kf6/kdesu 2721 /usr/libexec/kf6/kdesu kde-plasma/kglobalacceld: 2619 /usr/libexec/kglobalacceld kde-plasma/ksystemstats: 2532 /usr/bin/ksystemstats kde-plasma/kwin: 2321 /usr/bin/kwin_x11 kde-plasma/libkscreen: 2448 /usr/libexec/kf6/kscreen_backend_launcher kde-plasma/plasma-desktop: 2399 /usr/bin/kaccess kde-plasma/plasma-workspace: 2398 /usr/bin/xembedsniproxy 2210 /usr/bin/startplasma-x11 2393 /usr/bin/plasmashell 2248 /usr/bin/plasma_session 2377 /usr/bin/ksmserver 2455 /usr/bin/gmenudbusmenuproxy kde-plasma/polkit-kde-agent: 2394 /usr/libexec/polkit-kde-authentication-agent-1 kde-plasma/powerdevil: 2396 /usr/libexec/org_kde_powerdevil kde-plasma/xdg-desktop-portal-kde: 2288 /usr/libexec/xdg-desktop-portal-kde 3245 /usr/libexec/xdg-desktop-portal-kde media-video/mpv: 3876 /usr/bin/mpv 13202 /usr/bin/mpv 16667 /usr/bin/mpv media-video/smplayer: 5032 /usr/bin/smplayer media-video/wireplumber: 2618 /usr/bin/wireplumber net-p2p/qbittorrent: 9517 /usr/bin/qbittorrent sys-apps/xdg-desktop-portal: 2267 /usr/libexec/xdg-document-portal 3225 /usr/libexec/xdg-document-portal 2272 /usr/libexec/xdg-permission-store 3230 /usr/libexec/xdg-permission-store 2259 /usr/libexec/xdg-desktop-portal 3218 /usr/libexec/xdg-desktop-portal sys-apps/xdg-desktop-portal-gtk: 2294 /usr/libexec/xdg-desktop-portal-gtk 3251 /usr/libexec/xdg-desktop-portal-gtk sys-auth/polkit: 2335 /usr/lib/polkit-1/polkitd sys-fs/udisks: 2372 /usr/libexec/udisks2/udisksd sys-power/upower: 2387 /usr/libexec/upowerd www-client/seamonkey: 4853 /usr/lib64/seamonkey/seamonkey x11-misc/sddm: 2196 /usr/libexec/sddm-helper 2172 /usr/bin/sddm root@Gentoo-1 / # To get that I re-emerged sys-apps/util-linux. It's a package that tends to trigger a lot of things that need to be restarted, services or software. I shortened that list by closing Firefox. This is a good example of what it shows and often times what might even require a reboot. It will also show if init needs to be restarted. I tend to use telinit u to restart init but rebooting works too. I might add, I sometimes just use htop to find processes that need to be restarted. It uses different colors when services or programs are using outdated files. Running checkrestart sometimes takes longer than just typing in htop and looking at the colors. The color yellow almost always means it needs to be restarted. As I said, you may like needrestart and just want to tweak it a bit. Or this may help. It may do more of what you want, or not. Hope that helps. Dale :-) :-)