#!/bin/sh
fnWriteHeader()
{
echo ''
echo '
'
echo 'System Information for' `hostname` ''
echo ''
echo ''
echo 'System Information for' `hostname` '
'
}
fnSectionHeader()
{
echo '' $1 '
'
echo ''
}
fnCommand()
{
echo '
' "$1" '
'
echo ''
eval $2
echo '
'
echo ''
}
fnFooter()
{
echo ''
}
fnWriteHeader
fnSectionHeader "SYSTEM"
fnCommand "Output of uname -a" "uname -a"
fnCommand "Contents of /etc/redhat-release" "cat /etc/redhat-release"
fnCommand "Contents of /etc/modules.conf" "cat /etc/modules.conf"
fnCommand "output of lsmod" "lsmod"
fnCommand "output of lspci" "lspci"
fnCommand "Contents of /boot/grub/grub.conf" "cat /boot/grub/grub.conf"
fnSectionHeader "FILE SYSTEM"
fnCommand "Output of fdisk -l" "fdisk -l"
fnCommand "Contents of /etc/fstab" "cat /etc/fstab"
fnCommand "Output of vgdisplay -v" "vgdisplay -v"
fnSectionHeader "NETWORKING"
fnCommand "Contents of /etc/sysconfig/network" "cat /etc/sysconfig/network"
fnCommand 'Contents of /etc/sysconfig/network-scripts/ifcfg*' 'for File in /etc/sysconfig/network-scripts/ifcfg* ; do echo "
Contents of $File
" ; cat $File ; done'
fnCommand "Contents of /etc/hosts" "cat /etc/hosts"
fnCommand "Output of ifconfig -a" "ifconfig -a"
fnCommand "Output of netstat -rn" "netstat -rn"
fnCommand "Contents of /etc/resolv.conf" "cat /etc/resolv.conf"
fnCommand "Contents of /etc/services" "cat /etc/services"
fnCommand 'Contents of /etc/inetd.d/*' 'for File in /etc/xinetd.d/* ; do echo " Contents of $File
" ; cat $File ; done'
fnCommand "Contents of /etc/nsswitch.conf" "cat /etc/nsswitch.conf"
fnCommand "Contents of /etc/exports" "cat /etc/exports"
fnCommand "Output of iptables --list" "iptables --list"
fnSectionHeader "SOFTWARE"
fnCommand "Start up scripts" "find /etc/rc.d -ls"
fnCommand "List of installed packages" "rpm -q -a"
fnFooter