How do I list which applications use a particular shared library in Linux?
-
# /usr/sbin/lsof /usr/lib/libwrap.so* COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME sshd 2287 root mem REG 253,0 32856 89881 /usr/lib/libwrap.so.0.7.6 sendmail 2318 root mem REG 253,0 32856 89881 /usr/lib/libwrap.so.0.7.6 sendmail 2326 smmsp mem REG 253,0 32856 89881 /usr/lib/libwrap.so.0.7.6 sshd 2704 root mem REG 253,0 32856 89881 /usr/lib/libwrap.so.0.7.6 sshd 2706 salelink mem REG 253,0 32856 89881 /usr/lib/libwrap.so.0.7.6 sshd 2759 root mem REG 253,0 32856 89881 /usr/lib/libwrap.so.0.7.6 rpc.rquot 3001 root mem REG 253,0 32856 89881 /usr/lib/libwrap.so.0.7.6
In the above example, the lsof command returned a list of running programmes using TCP wrappers. If the tcp_wrappers package is updated, all the above programmes would have to be stopped and restarted.
© Lightnetics 2024