checkrestart - the sysadmins rolling upgrade tool

The package debian-goodies, has a great little tool that allows Debian/Ubuntu sysadmin's to check if any software is using code thats been upgraded.

I've hacked the tool to support Gentoo Linux.

Requires the following packages on Gentoo: lsof, lsb-release and portage-utils.

It uses lsof to check if programs in memory is referencing erased data files on disk. When you upgrade a package, the running copy of the software can continue to use old binaries, libraries and other data files, even while they are erased from disk. This gives the tool something to check for to detect what applications in memory needs restarting.

It generates a list of programs that need restarting and to make things easier it uses qfile/qlist to check for init.d scripts, so it can suggest what you need to run.

The program is not intelligent though, it can only create a list you as SysAdmin can use to simplify the process of handling rolling upgrades, not do the restarting automatically.

At the moment the code contains a searchlist, whitelist and blacklist system to trim the list of locations it checks for files that has been updated. If it checked all files, it would detect /dev/zero, /tmp and other files. The default searchlist is configured to detect package upgrades, but other uses is possible by changing these lists. For advanced use you can change it to use a different search list or one of the other methods if it suits your configuration better (There isn't support for mixing the lists, it only support using one type)

To Do:
Implement improved detection of perl/python and other scripting language software, since it's at the moment detected as the scripting language program.

Quit operation for using it in a cron script that only generate output when you have programs running that needs attention.

Implement Command line and configuration file for easier configuration of the way it prunes the list to remove false positives.

Make an ebuild, if upstream continues to show no interest in merging.

AttachmentSizeHitsLast download
checkrestart-0.47-sep16.07 KB1361 day 18 hours ago

Merged in changes from debian-goodies-0.47 checkrestart

Updated to 0.47-sep and added direct downloads.

http://arcdraco.net/~dragon/checkrestart still gets you latest version.

Direct link to 0.47-sep
http://arcdraco.net/~dragon/checkrestart-0.47-sep

Direct link to compressed version
http://arcdraco.net/~dragon/checkrestart-0.47-sep.tar.bz2

Older versions (All contains a local exploitable security bug)
http://arcdraco.net/~dragon/checkrestart-0.30-sep-os_security_hole
http://arcdraco.net/~dragon/checkrestart-0.29-sep
http://arcdraco.net/~dragon/checkrestart-0.27-sep

ebuild

I've put up an ebuild and I am interested in putting a versioned SRC_URI in the Portage tree.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.

Copyright (c) 2007, 2008 Steen Eugen Poulsen

Syndicate content Syndicate content