Re: When to reboot after dist-upgrade?
On Mon, May 03, 2021 at 09:16:40AM -0400, Stefan Monnier wrote: > Me, I basically only reboot in 2 cases: > - the power went out > > > Stefan There are two difficult problems in computing: naming things, cache invalidation, and off-by-one errors.
Re: When to reboot after dist-upgrade?
> I'm trying to distinguish when a system reboot is an absolute need > and when it is absolutely safe to keep the system running/working > after a `sudo apt-get update && sudo apt-get dist-upgrade`, once > I have already performed a complete restart of all needed services > through `sudo needrestart' options in Debian testing. I think the only reason you might "absolute"ly need to reboot is if a newer kernel fixes a security hole to which your current system is vulnerable. Since your kernel might include security holes to which you happen not to be vulnerable (e.g. because you just happen not to use that part of the kernel, or for some other reason), it's in generally extremely difficult to determine with a 100% certainty whether or not a reboot is "absolute"ly needed. Me, I basically only reboot in 2 cases: - the power went out Stefan
Re: When to reboot after dist-upgrade?
On Du, 02 mai 21, 22:42:28, riveravaldez wrote: > Hi, sorry if this is not the place to ask (and in that case please > point me in the proper direction). It's definitely on topic here ;) > I'm trying to distinguish when a system reboot is an absolute need > and when it is absolutely safe to keep the system running/working > after a `sudo apt-get update && sudo apt-get dist-upgrade`, once > I have already performed a complete restart of all needed services > through `sudo needrestart' options in Debian testing. needrestart does have some built-in exceptions (e.g. network-manager), to minimize disruptions. > $ sudo checkrestart > lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs > Output 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 on > the contrary should I perform a (warm/cold?) reboot to be safe? Would you have a reason not to? > PS: `apt-get dist-upgrade` output is translated to English..., That has the potential to introduce misunderstandings. When dealing with computer output exact wording matters a lot! > system is > in Spanish and I keep not-remembering how to force console output > to English, sorry... Please use something like LANG=C.UTF-8 apt ... LANG=C will probably work in most cases, but it might display funny stuff in case some program is using non-ASCII characters. Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser signature.asc Description: PGP signature
Re: When to reboot after dist-upgrade?
I use the following little script. If it produces output, then a reboot is desirable. #!/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)' What it does is look for library (and other) files that are in use but have been removed from the filesystem. The "egrep -v" filters out some files that various utilities create, open, then delete without closing so that if the utility ends catastrophically without cleaning up, they don't hang around. It's not perfect, but it does help. Rick On Sun, May 2, 2021, at 9:16 PM, Kenneth Parker wrote: > > > On Sun, May 2, 2021, 9:42 PM riveravaldez wrote: >> Hi, sorry if this is not the place to ask (and in that case please >> point me in the proper direction). >> >> I'm trying to distinguish when a system reboot is an absolute need >> and when it is absolutely safe to keep the system running/working >> after a `sudo apt-get update && sudo apt-get dist-upgrade`, once >> I have already performed a complete restart of all needed services >> through `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 Parker > >> >> So, in a situation like this: >> >> $ sudo apt-get dist-upgrade >> Reading package list ... Done >> Creating dependency tree ... Done >> Reading status information ... Done >> Calculating the update ... Done >> The following packages have been withheld: >>imagemagick inkscape libc-bin libc6 libc6-dbg libcrypt1 >> libpoppler-glib8 local openssh-client openssh-server >> openssh-sftp-server ssh >> 0 updated, 0 new will be installed, 0 to remove, and 12 not updated. >> >> $ sudo needrestart >> Scanning 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 checkrestart >> lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs >> Output 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 on >> the 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 is >> in Spanish and I keep not-remembering how to force console output >> to English, sorry... >>
Re: When to reboot after dist-upgrade?
On Sun, May 2, 2021, 9:42 PM riveravaldez wrote: > Hi, sorry if this is not the place to ask (and in that case please > point me in the proper direction). > > I'm trying to distinguish when a system reboot is an absolute need > and when it is absolutely safe to keep the system running/working > after a `sudo apt-get update && sudo apt-get dist-upgrade`, once > I have already performed a complete restart of all needed services > through `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 Parker > So, in a situation like this: > > $ sudo apt-get dist-upgrade > Reading package list ... Done > Creating dependency tree ... Done > Reading status information ... Done > Calculating the update ... Done > The following packages have been withheld: >imagemagick inkscape libc-bin libc6 libc6-dbg libcrypt1 > libpoppler-glib8 local openssh-client openssh-server > openssh-sftp-server ssh > 0 updated, 0 new will be installed, 0 to remove, and 12 not updated. > > $ sudo needrestart > Scanning 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 checkrestart > lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs > Output 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 on > the 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 is > in Spanish and I keep not-remembering how to force console output > to English, sorry... > >
Re: When to reboot after dist-upgrade?
On Mon, 3 May 2021 at 11:42, riveravaldez wrote: > PS: `apt-get dist-upgrade` output is translated to English Please don't do this, because it introduces unreliable and unreproducible communication and wastes your time. What helps everyone is to share the reproducible *copy/paste* output. > system is > in Spanish and I keep not-remembering how to force console output > to English If you can't remember then please do an internet search before posting, to find the way. For example: https://askubuntu.com/questions/264283/switch-command-output-language-from-native-language-to-english The easiest way for a single command is: LC_ALL=C your command here If you want to change the terminal session before running multiple commands: LC_ALL=C ; export LC_ALL
When to reboot after dist-upgrade?
Hi, sorry if this is not the place to ask (and in that case please point me in the proper direction). I'm trying to distinguish when a system reboot is an absolute need and when it is absolutely safe to keep the system running/working after a `sudo apt-get update && sudo apt-get dist-upgrade`, once I have already performed a complete restart of all needed services through `sudo needrestart' options in Debian testing. So, in a situation like this: $ sudo apt-get dist-upgrade Reading package list ... Done Creating dependency tree ... Done Reading status information ... Done Calculating the update ... Done The following packages have been withheld: imagemagick inkscape libc-bin libc6 libc6-dbg libcrypt1 libpoppler-glib8 local openssh-client openssh-server openssh-sftp-server ssh 0 updated, 0 new will be installed, 0 to remove, and 12 not updated. $ sudo needrestart Scanning 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 checkrestart lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs Output 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 on the 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 is in Spanish and I keep not-remembering how to force console output to English, sorry...