#!/bin/bash -p
set -x
PATH=/usr/bin:/bin
lsof +c0 -w | grep ' DEL *REG *[^0 ]' | egrep -v \ '(/var/lib/gdm3|/usr/share/mime|/home/[^/]*)/(.cache|.config|.local)'
On Sun, May 2, 2021, 9:42 PM riveravaldez <riveravaldezmail@gmail.com> wrote:Hi, sorry if this is not the place to ask (and in that case pleasepoint me in the proper direction).I'm trying to distinguish when a system reboot is an absolute needand when it is absolutely safe to keep the system running/workingafter a `sudo apt-get update && sudo apt-get dist-upgrade`, onceI have already performed a complete restart of all needed servicesthrough `sudo needrestart' options in Debian testing.In general, if the Kernel is updated, plan to Restart. Usually, dist-upgrade is required, when Version Numbers change, requiring addition of new packages. The Linux Kernel is a common (but not the only) reason for this.Also beware, because Debian occasionally will update the Kernel without updating the Version Number. So it is possible that a Restart is required, without a dist-upgrade.Good luck!Kenneth ParkerSo, in a situation like this:$ sudo apt-get dist-upgradeReading package list ... DoneCreating dependency tree ... DoneReading status information ... DoneCalculating the update ... DoneThe following packages have been withheld:imagemagick inkscape libc-bin libc6 libc6-dbg libcrypt1libpoppler-glib8 local openssh-client openssh-serveropenssh-sftp-server ssh0 updated, 0 new will be installed, 0 to remove, and 12 not updated.$ sudo needrestartScanning processes...Scanning processor microcode...Scanning linux images...Running kernel seems to be up-to-date.Failed to check for processor microcode upgrades.No services need to be restarted.No containers need to be restarted.No user sessions are running outdated binaries.$ sudo checkrestartlsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfsOutput information may be incomplete.Found 6 processes using old versions of upgraded files(1 distinct program)(0 distinct packages)No packages seem to need to be restarted.(please read checkrestart(8)), would be perfectly safe and right to keep the system running or onthe contrary should I perform a (warm/cold?) reboot to be safe?Thanks a lot in advance for any hint or info.Kind regards.PS: `apt-get dist-upgrade` output is translated to English..., system isin Spanish and I keep not-remembering how to force console outputto English, sorry...