debian – How to Know if Reboot is Required After Update

debian

I have 4 servers with Debian Wheezy OS. I have Apticron installed that informs me about updates. Debian updates are realized so often that when I finish to update the last of 4 servers I get new email about new updates on the first server. I try to update all servers when I get a notification but I never know if there is a need to reboot the servers. I have read that if the directory "/var/run" contains file "reboot-required" I have to reboot the server. But I never have seen this file in "/var/run". How can I know when reboot is required? I don't want reboot my servers every time when I install new updates if it's not needed.

I understand that if I update PHP or MySQL, etc I don't need to reboot the server but updates usually contain many "lib…".

Below are 9 updates (I have received this week).

krb5-locales 1.10.1+dfsg-5+deb7u3
libdbus-1-3 1.6.8-1+deb7u6
libgssapi-krb5-2 1.10.1+dfsg-5+deb7u3
libk5crypto3 1.10.1+dfsg-5+deb7u3
libkrb5-3 1.10.1+dfsg-5+deb7u3
libkrb5support0 1.10.1+dfsg-5+deb7u3
libruby1.8 1.8.7.358-7.1+deb7u2
libxml2 2.8.0+dfsg1-7+wheezy3
ruby1.8 1.8.7.358-7.1+deb7u2

I have no idea what is "libkrb,libgssapi", etc. How can I detect if reboot is needed? Please do not suggest to install UnattendedUpgrades to let the servers update automatically because this can cause websites going offline if something updates not correct.

Best Answer

Check checkrestart from the debian-goodies package. It shows which processes using the old versions of the libs you updated. If you are not able to remove all processes out of that list, you need a reboot :)

Additionally (as YuKYuK said), always reboot after a kernel update!