Binstat - проверка установленной системы на наличие libs глюков
From: Zahar Kiselev <[email protected]>
Newsgroups: fido7.ru.linux
Subject: Binstat - проверка установленной системы на наличие libs глюков
Hello, All!
Хочу порекомендовать один полезный скрипт тем, кто про него еще не знает.
Он проверяет установленную систему на наличие глюков, которые могут
долгое время себя не проявлять, а потом вдруг вылезти в неподходящий момент.
Hиже привожу ссылку на него и пример выдаваемого отчета. Сразу хочу заметить,
что в разделе unused libs(неиспользуемые библиотеки) могут оказаться
библиотеки, в действительности используемые, но загружаемые не при старте
программы, а самостоятельно в процессе выполнения.
>===== Start cut [/tmp/binstats.lsm] =====<
Begin4
Title: binstats
Version: 1.08
Entered-date: 2001-01-18
Description: An admin utility to aid the tidying up of binaries,
interpreted scripts, dynamic libraries and man pages. It can
find the number and identity of a.out, ELF & ECOFF binaries,
plus their debugging symbols status, setuid status and
dynamic library dependence. It can count the number of Java
bytecode programs. It can tally up the main types of scripts
and look for unidentified executable text files. Also it is
able to look for any duplicated executable and manual page
names, unused libraries, binaries with missing libraries and
statically linked binaries. Also includes a C program to
dereference symbolic links.
Keywords : aout elf binary dynamic library symbolic link
Author: [email protected] (Peter Chang)
Maintained-by: [email protected] (Peter Chang)
Primary-site: metalab.unc.edu /pub/Linux/utils/scripts
12k binstats-1.08.tar.gz
Alternate-site: http://www.nottingham.ac.uk/~etzpc/binstats.html
Original-site:
Platforms: Linux, bash script needs lots of unix (or GNU) tools,
the Linux (or Gnu libc) ldd and gcc (for compiling
derefsymlink)
Copying-policy: GPL
End
>===== End cut [/tmp/binstats.lsm] =====<
>===== Start cut [/tmp/bstats.log] =====<
binstats-1.08 output from tester on 2001/10/10 18:38:05 MSD
Binaries: 491
OMAGIC Demand Paged: 0
NMAGIC Demand Paged: 0
QMAGIC Demand Paged: 0
ZMAGIC Demand Paged: 0
statically linked: 0
not stripped: 0
setuid: 0
ELF: 491
statically linked: 0
not stripped: 0
setuid: 13
ECOFF: 0
statically linked: 0
not stripped: 0
setuid: 0
Java: 0
Duplicate names: 0
Missing libraries: 1
Text: 28
Bourne shell: 26
Bourne-Again shell: 0
C shell: 0
Tenex C shell: 0
Awk: 0
Perl: 2
Python: 0
Tcl: 0
Other interpreted: 0
Unidentified: 0
Used libraries: 35
DLL: 0
Unused libs: 27
Man pages: 1727
Duplicate names: 0
setuid (ELF):
/bin/mount
/bin/ping
/bin/su
/bin/umount
/usr/bin/at
/usr/bin/crontab
/usr/bin/fdmount
/usr/bin/gpasswd
/usr/bin/newgrp
/usr/bin/passwd
/usr/bin/ssh-signer2
/usr/bin/sudo
/usr/bin/traceroute
binaries with missing libraries:
/usr/bin/ssh-askpass2:
libz.so.1 => /usr/lib/libz.so.1
libSM.so.6 => not found
libICE.so.6 => not found
libX11.so.6 => not found
libncurses.so.5 => /lib/libncurses.so.5
libnsl.so.1 => /lib/libnsl.so.1
libcrypt.so.1 => /lib/libcrypt.so.1
libutil.so.1 => /lib/libutil.so.1
libc.so.6 => /lib/libc.so.6
/lib/ld-linux.so.2 => /lib/ld-linux.so.2
usage count | dynamic library
--------------------------------------------------------------
ELF:
11 libbfd-2.11.90.0.19.so => /usr/lib/libbfd-2.11.90.0.19.so
1 libbz2.so.1.0 => /lib/libbz2.so.1.0
8 libcom_err.so.2 => /lib/libcom_err.so.2
16 libcrypto.so.0 => /usr/lib/libcrypto.so.0
44 libcrypt.so.1 => /lib/libcrypt.so.1
488 libc.so.6 => /lib/libc.so.6
2 libdb.so.3 => /lib/libdb.so.3
38 libdl.so.2 => /lib/libdl.so.2
12 libdns.so.4 => /usr/lib/libdns.so.4
2 libe2p.so.2 => /lib/libe2p.so.2
8 libext2fs.so.2 => /lib/libext2fs.so.2
1 libgdbm.so.1 => /usr/lib/libgdbm.so.1
1 libgpm.so.1 => /usr/lib/libgpm.so.1
1 libICE.so.6 => not found
12 libisc.so.3 => /usr/lib/libisc.so.3
488 /lib/ld-linux.so.2 => /lib/ld-linux.so.2
2 liblwres.so.1 => /usr/lib/liblwres.so.1
18 libm.so.6 => /lib/libm.so.6
41 libncurses.so.5 => /lib/libncurses.so.5
38 libnsl.so.1 => /lib/libnsl.so.1
2 libomapi.so.3 => /usr/lib/libomapi.so.3
1 libopcodes-2.11.90.0.19.so => /usr/lib/libopcodes-2.11.90.0.19.so
8 libproc.so.2.0.7 => /lib/libproc.so.2.0.7
16 libpthread.so.0 => /lib/libpthread.so.0
1 libreadline.so.4 => /usr/lib/libreadline.so.4
12 librt.so.1 => /lib/librt.so.1
1 libslang.so.1 => /usr/lib/libslang.so.1
1 libSM.so.6 => not found
7 libstdc++-libc6.2-2.so.3 => /usr/lib/libstdc++-libc6.2-2.so.3
1 libstdc++.so.2.8 => /usr/i386-slackware-linux/lib/libstdc++.so.2.8
2 libtermcap.so.2 => /lib/libtermcap.so.2
15 libutil.so.1 => /lib/libutil.so.1
3 libuuid.so.1 => /lib/libuuid.so.1
1 libX11.so.6 => not found
11 libz.so.1 => /usr/lib/libz.so.1
--------------------------------------------------------------
unused:
/lib/libanl-2.2.3.so
/lib/libdb1.so.2.1.3
/lib/libdb-3.1.so
/lib/libmemusage.so
/lib/libnss_compat-2.2.3.so
/lib/libnss_db-2.2.so
/lib/libnss_dns-2.2.3.so
/lib/libnss_files-2.2.3.so
/lib/libpcprofile.so
/lib/libresolv-2.2.3.so
/lib/libSegFault.so
/lib/libss.so.2.0
/lib/libthread_db-1.0.so
/usr/i386-slackware-linux/lib/libstdc++-2-libc6.1-1-2.9.0.so
/usr/i386-slackware-linux/lib/libstdc++-3-libc6.1-2-2.10.0.so
/usr/i386-slackware-linux/lib/libstdc++.so.2.7.2.8
/usr/i386-slackware-linux/lib/libstdc++.so.2.9.0
/usr/lib/libc.so
/usr/lib/libform.so.5.2
/usr/lib/libhistory.so.4.1
/usr/lib/libltdl.so.3.0.0
/usr/lib/libmenu.so.5.2
/usr/lib/libmm.so.11.0.23
/usr/lib/libpanel.so.5.2
/usr/lib/libpcap.so.0.4a6
/usr/lib/libpopt.so.0.0.0
/usr/lib/libtiff.so.3.5.5
>===== End cut [/tmp/bstats.log] =====<
Zahar