Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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)
share|improve this question
This isn't a great answer, but you might be able to infer some part of your answer by starting you process with strace instead of attaching to it once it's already running... – jj33 Jan 12 '11 at 16:11
You could also try using ltrace instead of strace: both are usable in the exact same situations, but strace tracks calls and ltrace tracks library usage. – Mei Jan 13 '11 at 22:13
up vote 0 down vote accepted

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.

share|improve this answer
Thank you for introducing me to ltrace. I have opened another question to get it to run in tomcat. – flashnode Jan 18 '11 at 18:16
For reference's sake: running ltrace against a complex system like Tomcat is unlikely to avail much: there are too many things going on, too many new processes working in concert. – Mei Feb 10 '11 at 15:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.