Operating System - HP-UX
1831820 Members
4688 Online
110031 Solutions
New Discussion

Re: How to find which application uses which library

 
Bojan Andjelkovic
Occasional Contributor

How to find which application uses which library

Hi,

I am supposed to install the appropriate preliminary patch ( HPUX 11.00 )
PHNE_28929.depot #B.11.00
and install libc.1 as follows:
#DIR=[path to new files]
#cd /usr/lib
#cp $DIR/libc.1 libc.1.new
#chmod 555 libc.1.new
#chown bin:bin libc.1.new
#mv libc.1 libc.1.orig
#mv libc.1.new libc.1

After this, any applications that use libnsl.1 must be restarted and any applications that use libnsl.a must be relinked and restarted.

My question is how to define applications that use libnsl.1 library.

Thanks,
Bojan
5 REPLIES 5
H.Merijn Brand (procura
Honored Contributor

Re: How to find which application uses which library

# fuser -u libc.1.orig

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Todd McDaniel_1
Honored Contributor

Re: How to find which application uses which library

I believe that if you use lsof it will show you what files have open or access a lib file or any other file...

post back if you dont have it and i will give you a link.

Unix, the other white meat.
Robert-Jan Goossens
Honored Contributor

Re: How to find which application uses which library

Hi Bojan,

You can use ldd and chatr

Regards,
Robert-Jan
H.Merijn Brand (procura
Honored Contributor

Re: How to find which application uses which library

Robert-Jan, chatr will show which library an application will use, but not if it is currently using it :)

Though the command is very useful, and related to the posters quest, it is the other way around.

If I read the question correctly, he asks "who is currently using libc.1"

And yes, you can also do it with lsof, but that's quite more complicated than just fuser

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Sathish C
Frequent Advisor

Re: How to find which application uses which library

hi
chatr should give you the dynamic/shared libs names that are attached to that binary . You can also write a small script that will traverse the desired path where the different applications are installed to use chatr for each one of them .
Some cause happiness wherever they go; others, whenever they go