views:

192

answers:

4

How do I find out which executables or processes are using my shared library objects in a Unix environment, specifically the AIX environment. Is there any command for it?

A: 

Not sure if it will help, but maybe you could lsof.

tronda
+2  A: 

In linux, you would:

for i in /usr/bin /bin /usr/local/bin /sbin /...; do
  # edit: bug fix to display which filename has the library
  # the egrep component will extract line with your library
  # or line with ":::", which contains name of the binary
  find /usr/bin -printf '::: %p\n' -exec ldd \{\} \; | egrep 'your lib. name|:::'
done

The ldd package for AIX can be found as described here

To check running processes, you could: lsof | grep 'your library name'. How to obtain lsof for AIX can be found here

A: 

fuser might be what you want.

Jackson
A: 

In Solaris Open or otherwise:

For example; some of the output supressed...

mybox@myplace02:~$ pldd `pgrep pidgin `
5451: pidgin
/usr/lib/libc/libc_hwcap1.so.1
/usr/lib/libgdk-x11-2.0.so.0.1400.3
/usr/lib/libgdk_pixbuf-2.0.so.0.1400.3
/usr/lib/libglib-2.0.so.0.1800.0
/usr/lib/libgobject-2.0.so.0.1800.0
/usr/lib/libmlib.so.2
/usr/lib/libmlib/libmlib_sse2.so.2
/usr/lib/libgthread-2.0.so.0.1800.0
/lib/libpthread.so.1
/usr/lib/locale/en_US.UTF-8/en_US.UTF-8.so.3
/usr/lib/locale/common/methods_unicode.so.3
/lib/libthread.so.1
/usr/lib/libpurple.so.0.5.1
/lib/libnsl.so.1
/usr/lib/libgtk-x11-2.0.so.0.1400.3