Posts Tagged ‘open files’

Today’s sysadmin tip: Finding what binaries to restart revisited

Monday, January 20th, 2014

Almost exactly two years ago, I posted a perl script to find what binaries to restart for Red Hat based systems. I digs a bit deeper than the excellent needs-restarting script that is provided by Red Hat, by running ldd on the running process binaries, and recursively checking all underlying libraries. I did an extra variant for Debian and derivates today.

Why is this necessary? Because processes may map libraries without opening them. If the underlying library is updated, needs-restarting (or checkrestart on Debian, Ubuntu and derivates) won’t list the process as need to be restarted. But the process may crash or behave strangely when it some time in the future opens a mapped library, and that library has been changed by an update.

And yes, this is a real problem, experienced on production systems.

Red Hat variant
Debian/Ubuntu variant