[Hamara-devel] needrestart-session - check for processes need to be restarted in user sessions
shirish
shirish at hamaralinux.org
Fri May 29 16:50:36 BST 2015
Hi all,
This is a package which has made my life so much smoother for last
couple of years. I know I had promised not to talk about packages I like
but can't resist as there are lot of goodies that need to be marketed,
this is where debian.org really fails but anyways.
I really hope this becomes part of the new .iso, dunno if people know
about it or not :-
[$] aptitude show needrestart needrestart-session
Package: needrestart
State: installed
Automatically installed: no
Version: 2.0-2
Priority: optional
Section: admin
Maintainer: Patrick Matthäi <pmatthaei at debian.org>
Architecture: all
Uncompressed Size: 203 k
Depends: perl, dpkg (>= 1.16.0), libproc-processtable-perl,
libsort-naturally-perl, libmodule-scandeps-perl, libterm-readkey-perl,
libmodule-find-perl
Suggests: libnotify-bin
Description: check which daemons need to be restarted after library
upgrades needrestart checks which daemons need to be restarted after
library upgrades. It is inspired by checkrestart from the debian-goodies
package.
Features:
* supports (but does not require) systemd
* binary blacklisting (i.e. display managers)
* tries to detect pending kernel upgrades
* tries to detect required restarts of interpreter based daemons
(supports Perl, Python, Ruby)
* fully integrated into apt/dpkg using hooks
Homepage: https://github.com/liske/needrestart
Package: needrestart-session
State: installed
Automatically installed: no
Version: 0.3-2
Priority: optional
Section: admin
Maintainer: Patrick Matthäi <pmatthaei at debian.org>
Architecture: all
Uncompressed Size: 187 k
Depends: perl, needrestart (>= 2.0), libnet-dbus-perl,
libproc-processtable-perl, libwx-perl, wmctrl, policykit-1
Description: check for processes need to be restarted in user sessions
needrestart checks which processes need to be restarted after library
upgrades. needrestart-session implements a notification of user sessions
about their obsolete processes after system upgrades.
Homepage: https://github.com/liske/needrestart-session
I have been wanting to document it on my blog for sometime now and then
later would document it whenever it comes in hamara (probably a more
integrated release than now)
What it basically does is shared as the last few lines of an upgrade
happening :-
Processing triggers for menu (2.1.47) ...
D000001: ensure_diversions: same, skipping
D000001: cmpversions a='0:1.17.25' b='0:1.16' r=1
D000001: cmpversions a='0:1.17.25' b='0:1.16' r=1
D000001: ensure_diversions: new, (re)loading
D000001: cmpversions a='0:1.17.25' b='0:1.16' r=1
D000001: cmpversions a='0:1.17.25' b='0:1.16' r=1
Running kernel seems to be up-to-date.
No services need to be restarted.
User sessions:
root on /dev/tty1 is running obsolete agetty[1157]
shirish on session #1 is running obsolete pulseaudio[5501]
umm... ok the first few lines that you see are part of my aptitude
verbose install messages. I have upgraded few packages on my system.
The interesting part starts from
Running kernel seems to be up-to-date.
No services need to be restarted.
User sessions:
root on /dev/tty1 is running obsolete agetty[1157]
shirish on session #1 is running obsolete pulseaudio[5501]
the checker always tries to see if the kernel is up-to-date and if it is
says that. Actually the release of the kernel version I have is a bit
old but as that's the release in testing it passes :-
$ uname -r
3.16.0-4-amd64
The next part are the services that need restarting. I have deliberately
configured it to just tell me which are the packages/libraries which
have become obsolete due to the upgrades and not to perform those
library upgrades if they are going to threaten the session. Hence what
it does is just inform me of the libraries that are obsolete and still
running in the session. I, at my convenience can go to any of the TTY's
and just run
$sudo systemctl gdm3 restart and the 'old' gdm3 session is closed and a
new session is started without the need to restart the system.
I do have electricity issues (as in electricity going off) otherwise
could have pretty good uptime even with these constant rolling upgrades
and packages I keep track of.
[$] uptime
21:09:58 up 2 days, 7:19, 9 users, load average: 0.09, 0.35, 0.62
If I get some time this week-end, then would do proper documentation for
it and also explore it a bit more than what I have shared so far.
I have been using it since squeeze and it provide with lot of
'buffering' especially during the squeeze to wheezy (at the endish),
wheezy to jessie and now jessie to stretch upgrade.
So nice CLI tool to have.
--
Regards,
Shirish Agarwal,
Community Lead,
Hamaralinux.org
More information about the Hamara-devel
mailing list