1 #!/bin/sh 2 # Before running this script please ensure that your PATH is 3 # typical as you use for compilation/istallation. I use 4 # /bin /sbin /usr/bin /usr/sbin /usr/local/bin, but it may 5 # differ on your system. 6 # 7 PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH 8 echo 'If some fields are empty or look unusual you may have an old version.' 9 echo 'Compare to the current minimal requirements in Documentation/Changes.' 10 11 echo 12 echo "`ls /etc/*release 2> /dev/null`" 13 cat /etc/*release 2> /dev/null 14 if [ $? = 1 ]; then 15 echo "`ls /usr/lib/*release 2> /dev/null`" 16 cat /usr/lib/*release 2> /dev/null 17 fi 18 if [ $? = 1 ]; then 19 echo '/etc/issue:' 20 cat /etc/issue 2> /dev/null 21 fi 22 if [ $? = 1 ]; then 23 echo 'lsb_release -a' 24 lsb_release -a 2> /dev/null 25 fi 26 27 echo 28 echo 'uname:' 29 uname -a 30 31 echo 32 echo '/proc/cmdline' 33 cat /proc/cmdline 34 35 echo 36 37 echo "Gnu C " `gcc --version 2>/dev/null | head -n 1` 38 echo "Clang " `clang --version 2>/dev/null | head -n 1` 39 40 make --version 2>&1 | awk -F, '{print $1}' | awk \ 41 '/GNU Make/{print "Gnu make ",$NF}' 42 43 ld -v 2>&1 | awk -F\) '{print $1}' | awk \ 44 '/BFD/{print "binutils ",$NF}' 45 46 fdformat --version 2>&1 | awk -F\- '{print "util-linux ", $NF}' 47 48 mount --version 2>&1 | awk -F\- '{print "mount ", $NF}' 49 50 insmod -V 2>&1 | awk 'NR==1 {print "modutils ",$NF}' 51 52 tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \ 53 'NR==1 {print "e2fsprogs ", $2}' 54 55 reiserfsck 2>&1 | grep reiserfsprogs | awk \ 56 'NR==1{print "reiserfsprogs ", $NF}' 57 58 cardmgr -V 2>&1| grep version | awk \ 59 'NR==1{print "pcmcia-cs ", $3}' 60 61 pppd --version 2>&1| grep version | awk \ 62 'NR==1{print "PPP ", $3}' 63 64 isdnctrl 2>&1 | grep version | awk \ 65 'NR==1{print "isdn4k-utils ", $NF}' 66 67 ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \ 68 -e 's/\.so$//' | awk -F'[.-]' '{print "Linux C Library " \ 69 $(NF-2)"."$(NF-1)"."$NF}' 70 71 ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \ 72 'NR==1{print "Dynamic linker (ldd) ", $NF}' 73 74 ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \ 75 '{print "Linux C++ Library " $4"."$5"."$6}' 76 77 ps --version 2>&1 | awk 'NR==1{print "Procps ", $NF}' 78 79 ifconfig --version 2>&1 | grep tools | awk \ 80 'NR==1{print "Net-tools ", $NF}' 81 82 ip -V 2>&1 | awk \ 83 'NR==1{print "iproute2 ", $NF}' 84 85 ping -V 2>&1 | awk \ 86 'NR==1{print "iputils ", $NF}' 87 88 # Kbd needs 'loadkeys -h', 89 loadkeys -h 2>&1 | awk \ 90 '(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}' 91 92 # while console-tools needs 'loadkeys -V'. 93 loadkeys -V 2>&1 | awk \ 94 '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}' 95 96 expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}' 97 98 if [ -e /proc/modules ]; then 99 X=`cat /proc/modules | sed -e "s/ .*$//"` 100 echo "Modules Loaded "$X 101 fi 102 103 echo 104 echo 'free reports:' 105 free 106 107 echo 108 echo 'cpuinfo:' 109 if which lscpu > /dev/null 2>&1; then 110 lscpu 111 else 112 cat /proc/cpuinfo 113 fi 114