Restart daemons after library updates.
Clone or download
liske [uCode] Handle microcode updates for multiple CPUs in initramfs (Debi…
…an Bug#907372 by Paul Wise <pabs@debian.org>).
Latest commit 6975bc5 Oct 29, 2018
Permalink
Failed to load latest commit information.
.github Enable github bot "no-response". Sep 2, 2018
ex [Core] Ignore temporary mappings of elasticsearch (closes #134 by Georg Oct 28, 2018
hooks [Hooks] Ignore non-executable init scripts (closes #116 by Marc Dequè… May 26, 2018
lib [uCode] Handle microcode updates for multiple CPUs in initramfs (Debi… Oct 29, 2018
man Update version string to 3.0. Jan 13, 2018
perl [uCode] Prevent microcode false positives for BIOS updates (Debian Bu… Oct 28, 2018
po Merge pull request #133 from p-bo/patch-4 Sep 29, 2018
.gitignore Build and install l10n files. Feb 28, 2016
AUTHORS Add README. Mar 28, 2013
COPYING Add README. Mar 28, 2013
ChangeLog [uCode] Handle microcode updates for multiple CPUs in initramfs (Debi… Oct 29, 2018
INSTALL.md Add localization support for needrestart. Feb 28, 2016
Makefile [uCode/Intel] Use wrapper and handle custom microcode updates in /usr… Jan 13, 2018
NEWS Add more hints if run non-interactive. Nov 2, 2017
README.Cont.md [CONT] Ignore processes being part of docker containers (closes #80 b… Oct 29, 2017
README.Interp.md Add .md extension. May 19, 2015
README.batch.md Document meaning of different NEEDRESTART-KSTA values. Nov 3, 2016
README.md Update formating. Feb 11, 2018
README.nagios.md Update nagios documentation. Sep 3, 2016
README.uCode.md [uCode] Add more markdown formatting. Jan 13, 2018
needrestart [Core] Configuration file is ignored (closes #121 by Sven Hartge @sha… Jun 24, 2018

README.md

needrestart

About

needrestart checks which daemons need to be restarted after library upgrades. It is inspired by checkrestart from the debian-goodies package.

There are some hook scripts in the ex/ directory (to be used with apt and dpkg. The scripts will call needrestart after any package installation/upgrades.

needrestart should work on GNU/Linux. It has limited functionality on GNU/kFreeBSD since /proc/<pid>/maps does not show removed file links.

Restarting Services

needrestart supports but does not require systemd (available since v0.6). If systemd is used you should use libpam-systemd, too. If needrestart detects systemd it will assume that libpam-systemd is used and relies on cgroup names to detect if a process belongs to a user session or a daemon. If you do not use libpam-systemd you should set $nrconf{has_pam_systemd} to 0 within needrestart.conf.

If systemd is not available or does not return a service name needrestart uses hooks to identify the corresponding System V init script. The shipped hooks support the following package managers:

  • dpkg
  • rpm
  • pacman

The service command is used to run the tradiditional System V init script.

Frontends

needrestart uses a modular aproach based on perl packages providing the user interface. The following frontends are shipped:

  • NeedRestart::UI::Debconf using debconf
  • NeedRestart::UI::stdio fallback using stdio interaction

Kernel & Microcode

needrestart 0.8 brings a obsolete kernel detection feature. In needrestart 3.0 a processor microcode update detection feature for Intel CPUs has been added.

Interpreters

needrestart 0.8 brings an interpreter scanning feature. Interpreters not only map binary (shared) objects but also use plaintext source files. The interpreter detection tries to check for outdated source files since they may contain security issues, too. This is only a heuristic and might fail to detect all relevant source files. The following interpreter scanners are shipped:

  • NeedRestart::Interp::Java
  • NeedRestart::Interp::Perl
  • NeedRestart::Interp::Python
  • NeedRestart::Interp::Ruby

Containers

needrestart 2.1 detects some container technologies. If a process is part of a container it might not be possible to restart it using Sys-V/systemd.

There are special perl packages (NeedRestart::CONT::*) implementing the container detection and restarting. The following container detectors are shipped:

  • NeedRestart::CONT::docker
  • NeedRestart::CONT::LXC
  • NeedRestart::CONT::machined

Batch Mode

needrestart can be run in batch mode to use the results within other programs or scripts.

There is also a nagios plugin mode available.