robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 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 | echo ' ' |
| 11 | |
robbiew | 75fe22f | 2002-03-20 15:43:46 +0000 | [diff] [blame] | 12 | cat /etc/*release 2> /dev/null |
| 13 | if [ $? = 1 ]; then |
| 14 | echo '/etc/issue:' |
| 15 | cat /etc/issue 2> /dev/null |
| 16 | fi |
| 17 | |
robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 18 | uname -a |
| 19 | echo ' ' |
| 20 | |
robbiew | 564e8b2 | 2005-10-03 20:54:19 +0000 | [diff] [blame] | 21 | echo "Gnu C " `gcc --version 2>/dev/null | head -n 1` |
robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 22 | |
| 23 | make --version 2>&1 | awk -F, '{print $1}' | awk \ |
| 24 | '/GNU Make/{print "Gnu make ",$NF}' |
| 25 | |
| 26 | ld -v 2>&1 | awk -F\) '{print $1}' | awk \ |
| 27 | '/BFD/{print "binutils ",$NF}' |
| 28 | |
robbiew | 564e8b2 | 2005-10-03 20:54:19 +0000 | [diff] [blame] | 29 | fdformat --version 2>&1 | awk -F\- '{print "util-linux ", $NF}' |
robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 30 | |
robbiew | 564e8b2 | 2005-10-03 20:54:19 +0000 | [diff] [blame] | 31 | mount --version 2>&1 | awk -F\- '{print "mount ", $NF}' |
robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 32 | |
| 33 | insmod -V 2>&1 | awk 'NR==1 {print "modutils ",$NF}' |
| 34 | |
robbiew | 559e596 | 2001-12-18 16:14:23 +0000 | [diff] [blame] | 35 | tune2fs 2>&1 | grep "^tune2fs" | sed 's/,//' | awk \ |
robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 36 | 'NR==1 {print "e2fsprogs ", $2}' |
| 37 | |
| 38 | reiserfsck 2>&1 | grep reiserfsprogs | awk \ |
| 39 | 'NR==1{print "reiserfsprogs ", $NF}' |
| 40 | |
| 41 | cardmgr -V 2>&1| grep version | awk \ |
| 42 | 'NR==1{print "pcmcia-cs ", $3}' |
| 43 | |
| 44 | pppd --version 2>&1| grep version | awk \ |
| 45 | 'NR==1{print "PPP ", $3}' |
| 46 | |
| 47 | isdnctrl 2>&1 | grep version | awk \ |
| 48 | 'NR==1{print "isdn4k-utils ", $NF}' |
| 49 | |
| 50 | ls -l `ldd /bin/sh | awk '/libc/{print $3}'` | sed \ |
| 51 | -e 's/\.so$//' | awk -F'[.-]' '{print "Linux C Library " \ |
| 52 | $(NF-2)"."$(NF-1)"."$NF}' |
| 53 | |
robbiew | bd4caea | 2005-07-11 18:11:18 +0000 | [diff] [blame] | 54 | ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \ |
robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 55 | 'NR==1{print "Dynamic linker (ldd) ", $NF}' |
| 56 | |
| 57 | ls -l /usr/lib/lib{g,stdc}++.so 2>/dev/null | awk -F. \ |
| 58 | '{print "Linux C++ Library " $4"."$5"."$6}' |
| 59 | |
| 60 | ps --version 2>&1 | awk 'NR==1{print "Procps ", $NF}' |
| 61 | |
| 62 | ifconfig --version 2>&1 | grep tools | awk \ |
| 63 | 'NR==1{print "Net-tools ", $NF}' |
| 64 | |
subrata_modak | 9cc04e0 | 2009-07-06 15:02:21 +0000 | [diff] [blame] | 65 | ip -V 2>&1 | awk \ |
| 66 | 'NR==1{print "iproute2 ", $NF}' |
| 67 | |
robbiew | 0772b1b | 2001-10-12 21:03:46 +0000 | [diff] [blame] | 68 | # Kbd needs 'loadkeys -h', |
| 69 | loadkeys -h 2>&1 | awk \ |
| 70 | '(NR==1 && ($3 !~ /option/)) {print "Kbd ", $3}' |
| 71 | |
| 72 | # while console-tools needs 'loadkeys -V'. |
| 73 | loadkeys -V 2>&1 | awk \ |
| 74 | '(NR==1 && ($2 ~ /console-tools/)) {print "Console-tools ", $3}' |
| 75 | |
| 76 | expr --v 2>&1 | awk 'NR==1{print "Sh-utils ", $NF}' |
| 77 | |
robbiew | 559e596 | 2001-12-18 16:14:23 +0000 | [diff] [blame] | 78 | if [ -e /proc/modules ]; then |
| 79 | X=`cat /proc/modules | sed -e "s/ .*$//"` |
| 80 | echo "Modules Loaded "$X |
| 81 | fi |
robbiew | 75fe22f | 2002-03-20 15:43:46 +0000 | [diff] [blame] | 82 | |
| 83 | echo |
robbiew | fae2950 | 2003-04-07 21:19:52 +0000 | [diff] [blame] | 84 | echo 'free reports:' |
| 85 | free |
robbiew | 75fe22f | 2002-03-20 15:43:46 +0000 | [diff] [blame] | 86 | |
| 87 | echo |
| 88 | echo '/proc/cpuinfo' |
| 89 | cat /proc/cpuinfo |