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

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

Tags: , , ,

5 Responses to “Today’s sysadmin tip: Finding what binaries to restart revisited”

  1. kparal says:

    Would you care to post a patch for needs-restarting? It would certainly benefit larger audience than providing a separated script here. Thanks in advance.

  2. ingvar says:

    Hello, kparal

    I would have to learn python first…

    And since there are so many excellent python programmers at Red Hat, I guess just a BZ ticket would be more appropriate :-)


  3. kparal says:

    Yeah, creating a bugzilla ticket, describing the needed changes and linking your script could help as well. Thanks.

  4. Alice Lehman says:

    They’re requesting information about how to reproduce the issue you describe at bugzilla. Can you provide steps to reproduce at the link noted above?

Leave a Reply