#!/bin/sh
[ -f /etc/redhat-release ] & cat /etc/redhat-release
echo "=================== ENV =================="
env
if [ -f /sbin/chkconfig ] ; then
  echo "================ CHkCONFIG ==============="
  chkconfig --list
fi
echo "================== DMESG ================="
dmesg
echo "=================== PS ==================="
ps -efw
echo "================= IFCONFIG ==============="
ifconfig
echo "=================== DF ==================="
df -h
for xxx in `dmesg |grep ' DISK'|cut -f 1 -d ':'`
do
  echo "================ /dev/$xxx ==============="
  fdisk -l /dev/$xxx
done
echo "================= NETSTAT ================"
netstat -al
if [ -f /sbin/ipchains ] ; then
  echo "================= IPCHAINS ==============="
  /sbin/ipchains -L -n
fi
if [ -f /etc/samba/smb.conf ] ; then
  echo "================== SAMBA ================="
  cat /etc/samba/smb.conf | egrep -v '^ *#|^ *;|^ *$'
fi
if [ -f /etc/httpd/conf/httpd.conf ] ; then
  echo "================== HTTPD ================="
  cat /etc/httpd/conf/httpd.conf | egrep -v '^ *#|^ *$'
fi
if [ -f /etc/httpd/conf/commonhttpd.conf ] ; then
  echo "================== HTTPD COMMON  ================="
  cat /etc/httpd/conf/commonhttpd.conf | egrep -v '^ *#|^ *$'
fi
if [ -f /etc/X11/XF86Config ] ; then
  echo "=============== XF86Config ==============="
  cat /etc/X11/XF86Config | egrep -v '^ *#|^ *$' 
fi
if [ -f /etc/X11/XF86Config-4 ] ; then
  echo "============== XF86Config-4 =============="
  cat /etc/X11/XF86Config-4 | egrep -v '^ *#|^ *$'
fi

