Is there a command like pstree for libraries?

Posted on

Is there a command like pstree for libraries? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, rhel5, , , .

I need to determine whether a library named is being called directly by the process or by another library called I guess what I’m looking for is a pstree for libraries. The system is running RHEL 5.3 Beta.

This output shows the two libraries in the process map

# grep -e toki -e una /proc/2335/maps
0043f000-004ad000 r-xp 00000000 08:02 543465     /usr/lib/
004ad000-004c5000 rwxp 0006d000 08:02 543465     /usr/lib/
01185000-01397000 r-xp 00000000 08:02 543503     /usr/lib/
01397000-013dc000 rwxp 00211000 08:02 543503     /usr/lib/

This output shows that only the library is in the current cache

# ldconfig -p | grep -e una -e toki (libc6) => /usr/lib/ (libc6) => /usr/lib/ (libc6) => /usr/lib/

I attached strace to the running process but it doesn’t provide much output

# strace -p 2335
Process 2335 attached - interrupt to quit
futex(0xb7ef5bd8, FUTEX_WAIT, 2336, NULL

Here’s the output to ldd for each library

# ldd /usr/lib/ =>  (0x00a0a000) => /lib/ (0x001bd000) => /usr/lib/ (0x00f3f000) => /lib/ (0x00b27000) => /lib/ (0x0043d000)
        /lib/ (0x00742000) => /lib/ (0x00110000)
# ldd /usr/lib/ =>  (0x00244000) => /lib/ (0x00baf000) => /lib/ (0x007fa000) => /usr/lib/ (0x009ce000) => /lib/ (0x00c96000) => /lib/ (0x004a2000)
        /lib/ (0x00742000) => /lib/ (0x00a9f000)

Solution :

Everything you posted suggests that stands alone. does not require libunaSA (as shown by ldd). You could try using ltrace or lsof against the running application to see if libunaSA is called; if libtoki2 makes the call, then it will be hidden (I believe) from the output of ltrace.

lsof will show if the binary requires libunaSA at all.

Both ltrace and lsof are available for RHEL 5.

Leave a Reply

Your email address will not be published.