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