Datasheet

“main” (Installation and Administration) 2004/6/25 13:29 page 722 #748
i
i
i
i
i
i
i
i
28.16 Specifying the Required Library:
ldd
With the command ldd, find out which libraries the dynamic executable
specified as argument would be subsequently loaded:
$ ldd /bin/ls
linux-gate.so.1 => (0xffffe000)
librt.so.1 => /lib/tls/librt.so.1 (0x4002b000)
libacl.so.1 => /lib/libacl.so.1 (0x40033000)
libselinux.so.1 => /lib/libselinux.so.1 (0x40039000)
libc.so.6 => /lib/tls/libc.so.6 (0x40048000)
libpthread.so.0 => /lib/tls/libpthread.so.0 (0x4015d000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libattr.so.1 => /lib/libattr.so.1 (0x4016d000)
Static binaries do not need any dynamic libraries:
$ ldd /bin/rpm
not a dynamic executable
$ file /bin/rpm
/bin/rpm: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), \
statically linked, stripped
28.17 Interprocess Communication:
ipcs
The command ipcs produces a list of the IPC resources currently in use:
$ ipcs
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x000027d9 5734403 toms 660 64528 2
0x00000000 5767172 toms 666 37044 2
0x00000000 5799941 toms 666 37044 2
------ Semaphore Arrays --------
key semid owner perms nsems
0x000027d9 0 toms 660 1
------ Message Queues --------
key msqid owner perms used-bytes messages
722
28.16. Specifying the Required Library: ldd