Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ldd /usr/sbin/named
linux-vdso.so.1 => (0x00007fff79692000)
liblwres.so.160 => /lib64/liblwres.so.160 (0x00007f644f481000)
libdns.so.1102 => /lib64/libdns.so.1102 (0x00007f644f049000)
libbind9.so.160 => /lib64/libbind9.so.160 (0x00007f644ee39000)
libisccfg.so.160 => /lib64/libisccfg.so.160 (0x00007f644ec0b000)
libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f644e9be000)
libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f644e6d5000)
libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f644e4a2000)
libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f644e29e000)
libisccc.so.160 => /lib64/libisccc.so.160 (0x00007f644e093000)
libisc.so.169 => /lib64/libisc.so.169 (0x00007f644de16000)
libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f644d9b3000)
libcap.so.2 => /lib64/libcap.so.2 (0x00007f644d7ae000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f644d592000)
libGeoIP.so.1 => /lib64/libGeoIP.so.1 (0x00007f644d362000)
libxml2.so.2 => /lib64/libxml2.so.2 (0x00007f644cff8000)
libz.so.1 => /lib64/libz.so.1 (0x00007f644cde2000)
libm.so.6 => /lib64/libm.so.6 (0x00007f644cae0000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f644c8dc000)
libc.so.6 => /lib64/libc.so.6 (0x00007f644c50e000)
libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f644c2fe000)
libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f644c0fa000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f644bee0000)
/lib64/ld-linux-x86-64.so.2 (0x00007f644f959000)
libattr.so.1 => /lib64/libattr.so.1 (0x00007f644bcdb000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f644bab5000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f644b88e000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f644b62c000)
and
lsof -p 1439|grep .so
named 1439 named mem REG 253,0 37168 6792 /usr/lib64/libnss_sss.so.2
named 1439 named mem REG 253,0 61560 41770 /usr/lib64/libnss_files-2.17.so
named 1439 named mem REG 253,0 402384 42119 /usr/lib64/libpcre.so.1.2.0
named 1439 named mem REG 253,0 155744 42128 /usr/lib64/libselinux.so.1
named 1439 named mem REG 253,0 157424 42139 /usr/lib64/liblzma.so.5.2.2
named 1439 named mem REG 253,0 19896 85820 /usr/lib64/libattr.so.1.1.0
named 1439 named mem REG 253,0 109976 386239 /usr/lib64/libresolv-2.17.so
named 1439 named mem REG 253,0 15688 91050 /usr/lib64/libkeyutils.so.1.5
named 1439 named mem REG 253,0 67104 263574 /usr/lib64/libkrb5support.so.0.1
named 1439 named mem REG 253,0 2156344 41745 /usr/lib64/libc-2.17.so
named 1439 named mem REG 253,0 19248 41752 /usr/lib64/libdl-2.17.so
named 1439 named mem REG 253,0 1136944 41755 /usr/lib64/libm-2.17.so
named 1439 named mem REG 253,0 90248 42131 /usr/lib64/libz.so.1.2.7
named 1439 named mem REG 253,0 1509528 85787 /usr/lib64/libxml2.so.2.9.1
named 1439 named mem REG 253,0 197088 6840 /usr/lib64/libGeoIP.so.1.5.0
named 1439 named mem REG 253,0 142144 386089 /usr/lib64/libpthread-2.17.so
named 1439 named mem REG 253,0 20048 85824 /usr/lib64/libcap.so.2.22
named 1439 named mem REG 253,0 2520768 6030 /usr/lib64/libcrypto.so.1.0.2k
named 1439 named mem REG 253,0 517360 6846 /usr/lib64/libisc.so.169.0.3
named 1439 named mem REG 253,0 45544 6852 /usr/lib64/libisccc.so.160.0.3
named 1439 named mem REG 253,0 15856 42141 /usr/lib64/libcom_err.so.2.1
named 1439 named mem REG 253,0 210784 263566 /usr/lib64/libk5crypto.so.3.1
named 1439 named mem REG 253,0 967840 263572 /usr/lib64/libkrb5.so.3.3
named 1439 named mem REG 253,0 320720 263562 /usr/lib64/libgssapi_krb5.so.2.2
named 1439 named mem REG 253,0 187264 6848 /usr/lib64/libisccfg.so.160.2.1
named 1439 named mem REG 253,0 65408 6850 /usr/lib64/libbind9.so.160.0.8
named 1439 named mem REG 253,0 2345592 6842 /usr/lib64/libdns.so.1102.1.2
named 1439 named mem REG 253,0 78272 6854 /usr/lib64/liblwres.so.160.0.2
named 1439 named mem REG 253,0 163312 386276 /usr/lib64/ld-2.17.so
where
ps -ef|grep named
named 1439 1 0 03:26 ? 00:00:01 /usr/sbin/named -u named -c /etc/named.conf
i expected that all the so libraries showed on ldd command to be opened when named run.but i see from lsof that only a part of them.
why this?
Code:
ls -l /proc/1439/fd
total 0
lrwx------. 1 named named 64 Mar 25 03:40 0 -> /dev/null
lrwx------. 1 named named 64 Mar 25 03:40 1 -> /dev/null
lrwx------. 1 named named 64 Mar 25 03:40 10 -> anon_inode:[eventpoll]
lr-x------. 1 named named 64 Mar 25 03:40 11 -> /usr/share/GeoIP/GeoIP-initial.dat
lr-x------. 1 named named 64 Mar 25 03:40 12 -> /usr/share/GeoIP/GeoIPv6-initial.dat
lr-x------. 1 named named 64 Mar 25 03:40 13 -> /dev/random
l-wx------. 1 named named 64 Mar 25 03:40 14 -> /var/named/data/named.run
lrwx------. 1 named named 64 Mar 25 03:40 2 -> /dev/null
lrwx------. 1 named named 64 Mar 25 03:40 20 -> socket:[23128]
lrwx------. 1 named named 64 Mar 25 03:40 21 -> socket:[23142]
lrwx------. 1 named named 64 Mar 25 03:40 22 -> socket:[23144]
lrwx------. 1 named named 64 Mar 25 03:40 23 -> socket:[23146]
lrwx------. 1 named named 64 Mar 25 03:40 24 -> socket:[23149]
lrwx------. 1 named named 64 Mar 25 03:40 25 -> socket:[23150]
lrwx------. 1 named named 64 Mar 25 03:40 3 -> socket:[23104]
lr-x------. 1 named named 64 Mar 25 03:40 4 -> /var/lib/sss/mc/initgroups
lrwx------. 1 named named 64 Mar 25 03:40 5 -> socket:[23109]
lrwx------. 1 named named 64 Mar 25 03:40 512 -> socket:[23140]
lrwx------. 1 named named 64 Mar 25 03:40 513 -> socket:[23143]
lrwx------. 1 named named 64 Mar 25 03:40 514 -> socket:[23145]
lrwx------. 1 named named 64 Mar 25 03:40 6 -> /dev/null
lr-x------. 1 named named 64 Mar 25 03:40 7 -> pipe:[23118]
l-wx------. 1 named named 64 Mar 25 03:40 9 -> pipe:[23118]
lsof -p 1439|grep socket
named 1439 named 3u unix 0xffff996433a0e600 0t0 23104 socket
named 1439 named 5u unix 0xffff996433a0ea40 0t0 23109 socket
why in lsof i see less soclet that in ls -l /proc/?
And if that throws up anything, you have issues. Otherwise, why bother? I imagine purely internal factors of how the program was structured/written affect what use it made of dependencies. If the programmer is a game, all libraries will be wanted now to avoid delays. If the programmer tries to keep the overhead low, stuff can be called as required only and closed afterwards.
ls -l /proc/1439/fd
total 0
lrwx------. 1 named named 64 Mar 25 03:40 0 -> /dev/null
lrwx------. 1 named named 64 Mar 25 03:40 1 -> /dev/null
lrwx------. 1 named named 64 Mar 25 03:40 10 -> anon_inode:[eventpoll]
lr-x------. 1 named named 64 Mar 25 03:40 11 -> /usr/share/GeoIP/GeoIP-initial.dat
lr-x------. 1 named named 64 Mar 25 03:40 12 -> /usr/share/GeoIP/GeoIPv6-initial.dat
lr-x------. 1 named named 64 Mar 25 03:40 13 -> /dev/random
l-wx------. 1 named named 64 Mar 25 03:40 14 -> /var/named/data/named.run
lrwx------. 1 named named 64 Mar 25 03:40 2 -> /dev/null
lrwx------. 1 named named 64 Mar 25 03:40 20 -> socket:[23128]
lrwx------. 1 named named 64 Mar 25 03:40 21 -> socket:[23142]
lrwx------. 1 named named 64 Mar 25 03:40 22 -> socket:[23144]
lrwx------. 1 named named 64 Mar 25 03:40 23 -> socket:[23146]
lrwx------. 1 named named 64 Mar 25 03:40 24 -> socket:[23149]
lrwx------. 1 named named 64 Mar 25 03:40 25 -> socket:[23150]
lrwx------. 1 named named 64 Mar 25 03:40 3 -> socket:[23104]
lr-x------. 1 named named 64 Mar 25 03:40 4 -> /var/lib/sss/mc/initgroups
lrwx------. 1 named named 64 Mar 25 03:40 5 -> socket:[23109]
lrwx------. 1 named named 64 Mar 25 03:40 512 -> socket:[23140]
lrwx------. 1 named named 64 Mar 25 03:40 513 -> socket:[23143]
lrwx------. 1 named named 64 Mar 25 03:40 514 -> socket:[23145]
lrwx------. 1 named named 64 Mar 25 03:40 6 -> /dev/null
lr-x------. 1 named named 64 Mar 25 03:40 7 -> pipe:[23118]
l-wx------. 1 named named 64 Mar 25 03:40 9 -> pipe:[23118]
lsof -p 1439|grep socket
named 1439 named 3u unix 0xffff996433a0e600 0t0 23104 socket
named 1439 named 5u unix 0xffff996433a0ea40 0t0 23109 socket
why in lsof i see less soclet that in ls -l /proc/?
I would check what lsof says about file descriptors 20..25.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.