home *** CD-ROM | disk | FTP | other *** search
/ ftp.intel.com / 2015-02-03.ftp.intel.com.tar / ftp.intel.com / Pub / sites / FPD / ibsupport / scripts / ibsupport_info_mod.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  2014-01-27  |  82KB  |  2,334 lines

  1. #!/bin/bash
  2. #####################################################################
  3. # This script attempts to gather troubleshooting information on 
  4. # a variety of Linux hosts.  Files that exist in one distribution of
  5. # Linux may not exist in another distribution (SuSE vs Red Hat).
  6. # Please ignore any errors reported about files not existing.
  7. #
  8. # Note: There may appear to be some inconsistencies where some
  9. # commands are tested by "which" and others are not.  The "which" 
  10. # tests will not generate outputs if the commands do not exist and
  11. # eventually determine which outputs get posted to the dashboard.
  12. #
  13. # --Doug Gunderson
  14. # --Intel Infiniband Technical Support
  15. # --Fabric Products Division
  16. # --TCG / DCSG / Intel Corporation
  17. #
  18. #####################################################################
  19. ScriptVER="4.05.03a"
  20. #
  21. #####################################################################
  22.  
  23. # So users can run the script using su or sudo
  24. export PATH=/bin:/sbin:/usr/bin:/usr/sbin:$PATH
  25.  
  26. ####################################################################
  27. # Test to see if run with with root permissions
  28. #####################################################################
  29. if [ `id -u` -ne 0 ]
  30. then
  31.    /bin/echo "This script must be run with root permissions.  Please rerun as root or with sudo."
  32.    exit
  33. fi
  34.  
  35. ####################################################################
  36. # Check to see if this is VMware 
  37. #####################################################################
  38. if [ -f /etc/vmware-release ]
  39. then
  40.    /bin/echo "This script is intended for RHEL or SLES distributions."
  41.    /bin/echo "It will not run successfully on VMware."
  42.    exit
  43. fi
  44.  
  45. ####################################################################
  46. # logger entry to identify start of script
  47. #####################################################################
  48. which logger > /dev/null 2>&1
  49. if [ $? -eq 0 ]
  50. then
  51.    logger "ibsupport_info.sh starting with PID $$"
  52. fi
  53.  
  54. #####################################################################
  55. # Create temporary directory using HOSTNAME-DateTime to store output
  56. #####################################################################
  57. CurDate=`/bin/date +%Y%m%d%H%M%S`
  58. HostName=`uname -n`
  59. LOGNAME="$HostName-$CurDate"
  60. LOGDIR="/tmp/$LOGNAME"
  61. /bin/echo "Log data will be stored in $LOGDIR"
  62. /bin/echo "Output results will be tar-zipped to $LOGDIR.tgz"
  63. /bin/echo
  64. mkdir $LOGDIR
  65. mkdir $LOGDIR/script
  66. cd $LOGDIR
  67. touch $LOGDIR/script/ScriptVersion.$ScriptVER
  68. mkdir $LOGDIR/OS
  69.  
  70. #####################################################################
  71. # Gather OS info
  72. #####################################################################
  73. /bin/echo -n "Gathering OS info: "
  74. OS_FILES=`ls /etc/*-release /etc/*_version 2>> $LOGDIR/script/misc_err.log`
  75. for file in $OS_FILES
  76. do
  77.    if [ -f $file ]
  78.    then
  79.       cp -p $file $LOGDIR/OS
  80.    fi
  81. done
  82.  
  83. # Files useful if we need to duplicate the host install
  84. if [ -f /root/anaconda-ks.cfg ]
  85. then
  86.    cp /root/anaconda-ks.cfg $LOGDIR/OS
  87. fi
  88. if [ -f /root/autoinst.xml ]
  89. then
  90.    cp /root/autoinst.xml $LOGDIR/OS
  91. fi
  92.  
  93. rpm -qa  > $LOGDIR/OS/rpm_list.out
  94. rpm --queryformat '[%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n]' -qa > /$LOGDIR/OS/rpm_detailed.out
  95. uname -a > $LOGDIR/OS/uname
  96.  
  97. /bin/echo "... done"
  98.  
  99. #####################################################################
  100. # Determine what hardware installed for gathering additional data
  101. #####################################################################
  102. /bin/echo -n "Gathering hardware info: "
  103. mkdir $LOGDIR/misc
  104. lspci -v                > $LOGDIR/misc/lspci.out 2>&1
  105. # More details on Intel, QLogic, Netxen, Mellanox hardware
  106. lspci -vvvxxx -d 1077:  > $LOGDIR/misc/lspci_detailed.out 2>&1
  107. lspci -vvvxxx -d 4040: >> $LOGDIR/misc/lspci_detailed.out 2>&1
  108. lspci -vvvxxx -d 1fc1: >> $LOGDIR/misc/lspci_detailed.out 2>&1
  109. lspci -vvvxxx -d 15b3: >> $LOGDIR/misc/lspci_detailed.out 2>&1
  110.  
  111. FCINSTALLED=0
  112. ISCSIINSTALLED=0
  113. ETHERINSTALLED=0
  114. IBINSTALLED=0
  115. IBAINSTALLED=0
  116. MLXINSTALLED=0
  117. FVINSTALLED=0
  118. TESTHBA=`grep QLogic $LOGDIR/misc/lspci.out|grep "Fibre Channel:"`
  119. if [ -n "$TESTHBA" ]
  120. then
  121.    FCINSTALLED=1
  122. fi
  123. TESTHBA=`grep QLogic $LOGDIR/misc/lspci.out|grep "Network controller:"`
  124. if [ -n "$TESTHBA" ]
  125. then
  126.    ISCSIINSTALLED=1
  127. fi
  128. TESTHBA=`grep QLogic $LOGDIR/misc/lspci.out|grep "Ethernet controller:"`
  129. if [ -n "$TESTHBA" ]
  130. then
  131.    ETHERINSTALLED=1
  132. fi
  133. TESTHBA=`grep NetXen $LOGDIR/misc/lspci.out|grep "Ethernet controller:"`
  134. if [ -n "$TESTHBA" ]
  135. then
  136.    ETHERINSTALLED=1
  137. fi
  138. # QLE8042 uses Intel NIC - report only if FC Installed
  139. TESTHBA=`grep "Intel Corporation 82598" $LOGDIR/misc/lspci.out|grep "Ethernet controller:"`
  140. if [ -n "$TESTHBA" -a $FCINSTALLED -eq 1 ]
  141. then
  142.    ETHERINSTALLED=1
  143. fi
  144. TESTHBA=`grep QLogic $LOGDIR/misc/lspci.out|grep "InfiniBand:"`
  145. if [ -n "$TESTHBA" ]
  146. then
  147.    IBINSTALLED=1
  148. fi
  149. TESTHBA=`grep Mellanox $LOGDIR/misc/lspci.out|egrep "InfiniBand:|Network controller:"`
  150. if [ -n "$TESTHBA" ]
  151. then
  152.    IBINSTALLED=1
  153.    MLXINSTALLED=1
  154. fi
  155.  
  156. #which iba_capture > /dev/null 2>&1
  157. #if [ $? -eq 0 ]
  158. #then
  159. #   IBAINSTALLED=1
  160. #fi
  161. /bin/echo "... done"
  162.  
  163. #####################################################################
  164. # Gather misc info
  165. #####################################################################
  166. /bin/echo -n "Gathering miscellaneous system info: "
  167. uptime                 >  $LOGDIR/misc/uptime.out 2>&1
  168. lscpu                  >  $LOGDIR/misc/lscpu.out 2>&1
  169. lstopo                 >  $LOGDIR/misc/lstopo.out 2>&1
  170. dmidecode              >  $LOGDIR/misc/dmidecode.out 2>&1
  171. fdisk -l               >  $LOGDIR/misc/fdisk.out 2>&1
  172. ps -ewf                >  $LOGDIR/misc/ps.out
  173. top -bH -n 1           >  $LOGDIR/misc/top.out 2>&1
  174.  
  175. ls -lF /usr/bin/*gcc*  >  $LOGDIR/misc/gcc.out 2>&1
  176. /bin/echo "========"   >> $LOGDIR/misc/gcc.out
  177. gcc --version          >> $LOGDIR/misc/gcc.out 2>&1
  178.  
  179. ldconfig -p            >  $LOGDIR/misc/ldconfig.out 2>&1
  180. who -r                 >  $LOGDIR/misc/who_r.out 2>&1
  181. runlevel               >  $LOGDIR/misc/runlevel.out 2>&1
  182. env                    >  $LOGDIR/misc/env.out 2>&1
  183. chkconfig --list       >  $LOGDIR/misc/chkconfig.out 2>&1
  184. ls -alRF /usr/lib/     >  $LOGDIR/misc/ls_usrlib.out
  185. if [ -d /usr/lib64 ]
  186. then
  187.    ls -alRF /usr/lib64/>  $LOGDIR/misc/ls_usrlib64.out
  188. fi
  189. which lsscsi > /dev/null 2>&1
  190. if [ $? -eq 0 ]
  191. then
  192.    lsscsi              >  $LOGDIR/misc/lsscsi.out 2>&1
  193.    lsscsi --verbose    >  $LOGDIR/misc/lsscsi_verbose.out 2>&1
  194. fi
  195. sysctl -a              >  $LOGDIR/misc/sysctl.out 2>&1
  196. # DG: Problems on RHEL 6 ???
  197. #lsof                  >  $LOGDIR/misc/lsof.out 2>&1
  198. vmstat -a              >  $LOGDIR/misc/vmstat.out 2>&1
  199. free                   >  $LOGDIR/misc/free.out 2>&1
  200. ulimit -a              >  $LOGDIR/misc/ulimit.out 2>&1
  201.  
  202. touch $LOGDIR/misc/numa_info.out
  203. echo "##################### numactl --show #####################" >> $LOGDIR/misc/numa_info.out
  204. numactl --show >> $LOGDIR/misc/numa_info.out 2>&1
  205. echo "##################### numactl --hardware #####################" >> $LOGDIR/misc/numa_info.out 2>&1
  206. numactl --hardware >> $LOGDIR/misc/numa_info.out 2>&1
  207. echo "##################### numastat #####################" >> $LOGDIR/misc/numa_info.out 2>&1
  208. numastat >> $LOGDIR/misc/numa_info.out 2>&1
  209.  
  210. /bin/echo "... done"
  211.  
  212. #####################################################################
  213. # Gather /etc data
  214. #####################################################################
  215. /bin/echo -n "Gathering /etc files: "
  216. mkdir $LOGDIR/etc
  217. mkdir $LOGDIR/etc/sysconfig
  218. ETC_FILES="/etc/modules.* \
  219. /etc/modprobe.* \
  220. /etc/qla*.conf \
  221. /etc/hba.conf \
  222. /etc/sysconfig/kernel \
  223. /etc/sysconfig/hwconf \
  224. /etc/sysctl.conf \
  225. /etc/mtab \
  226. /etc/fstab"
  227.  
  228. for file in $ETC_FILES
  229. do
  230.    if [ -f $file ]
  231.    then
  232.       cp -p $file $LOGDIR/$file
  233.    fi
  234. done
  235.  
  236. if [ -d /etc/modprobe.d ]
  237. then
  238.    ls -alRF /etc/modprobe.d > $LOGDIR/etc/ls_etc_modprobed.out
  239.    mkdir $LOGDIR/etc/modprobe.d
  240.    MODPROBE_FILES="/etc/modprobe.d/ib_qib.conf \
  241.    /etc/modprobe.d/ib_ipoib.conf \
  242.    /etc/modprobe.d/scsi_mod.conf \
  243.    /etc/modprobe.d/qla2xxx.conf \
  244.    /etc/modprobe.d/qla3xxx.conf \
  245.    /etc/modprobe.d/qla4xxx.conf \
  246.    /etc/modprobe.d/netxen_nic.conf \
  247.    /etc/modprobe.d/nx_nic.conf \
  248.    /etc/modprobe.d/qlge.conf \
  249.    /etc/modprobe.d/blacklist \
  250.    /etc/modprobe.d/blacklist.conf"
  251.    for file in $MODPROBE_FILES
  252.    do
  253.       if [ -f $file ]
  254.       then
  255.          cp -p $file $LOGDIR/$file
  256.       fi
  257.    done
  258.  
  259. fi
  260.  
  261. ls -aldF /etc/rc*    > $LOGDIR/etc/ls_etcrcd.out
  262. ls -alRF /etc/rc.d/ >> $LOGDIR/etc/ls_etcrcd.out
  263.  
  264. if [ $IBINSTALLED -eq 1 -a $IBAINSTALLED -eq 0 ]
  265. then
  266.    echo -n "... additional IB info ... "
  267.    ETC_FILES="/etc/sysconfig/ics_inic.cfg* \
  268.    /etc/sysconfig/ics_srp.cfg* \
  269.    /etc/sysconfig/ipoib.cfg* \
  270.    /etc/sysconfig/infiniband \
  271.    /etc/sysconfig/boot \
  272.    /etc/sysconfig/firstboot \
  273.    /etc/sysconfig/*config \
  274.    /etc/sysconfig/qlogic_fm.xml \
  275.    /etc/sysconfig/ifs_fm.xml \
  276.    /etc/sysconfig/opensm \
  277.    /etc/dat.conf \
  278.    /etc/tmi.conf \
  279.    /etc/hosts"
  280.    for file in $ETC_FILES
  281.    do
  282.       if [ -f $file ]
  283.       then
  284.          cp -p $file $LOGDIR/$file
  285.       fi
  286.    done
  287.    if [ -d /etc/sysconfig/network ]
  288.    then
  289.       mkdir $LOGDIR/etc/sysconfig/network
  290.       cp -p /etc/sysconfig/network/ifcfg* $LOGDIR/etc/sysconfig/network
  291.    fi
  292.    if [ -d /etc/sysconfig/network-scripts ]
  293.    then
  294.       mkdir $LOGDIR/etc/sysconfig/network-scripts
  295.       cp -p /etc/sysconfig/network-scripts/ifcfg* $LOGDIR/etc/sysconfig/network-scripts
  296.    fi
  297.    if [ -d /etc/infiniband ]
  298.    then
  299.       mkdir $LOGDIR/etc/infiniband
  300.       cp -p /etc/infiniband/* $LOGDIR/etc/infiniband
  301.    fi
  302.    if [ -d /etc/ofed ]
  303.    then
  304.       mkdir $LOGDIR/etc/ofed
  305.       cp -pR /etc/ofed/* $LOGDIR/etc/ofed
  306.    fi
  307.    # RHEL 6 "ofed stack"
  308.    if [ -d /etc/rdma ]
  309.    then
  310.       mkdir $LOGDIR/etc/rdma
  311.       cp -pR /etc/rdma/* $LOGDIR/etc/rdma
  312.    fi
  313.    # iba_capture also copies files from /etc/sysconfig/iba (but that would be missing if no Intel IB stack)
  314.    #             and /etc/security (not sure why THAT directory)
  315.    # Leaving them both out for now.  (Actually added back to workaround iba_capture hang.)
  316.    if [ -d /etc/sysconfig/iba ]
  317.    then
  318.       mkdir $LOGDIR/etc/sysconfig/iba
  319.       cp -pR /etc/sysconfig/iba/* $LOGDIR/etc/sysconfig/iba
  320.    fi
  321. fi
  322.  
  323. /bin/echo "... done"
  324.  
  325. #####################################################################
  326. # Gather /sys data
  327. #####################################################################
  328. if [ -d /sys ]
  329. then
  330.    /bin/echo -n "Gathering /sys files: "
  331.    ls -alRF /sys > $LOGDIR/OS/ls_sys.out
  332.    mkdir -p $LOGDIR/sys/class
  333.    mkdir $LOGDIR/sys/class/scsi_host
  334.    mkdir $LOGDIR/sys/class/fc_host
  335.    mkdir $LOGDIR/sys/class/iscsi_host
  336.    mkdir $LOGDIR/sys/class/net
  337.    cp -pR /sys/class/scsi_host/*/      $LOGDIR/sys/class/scsi_host      2>  $LOGDIR/sys/copy_err.log
  338.    cp -pR /sys/class/fc_host/*/        $LOGDIR/sys/class/fc_host        2>> $LOGDIR/sys/copy_err.log
  339.    cp -pR /sys/class/iscsi_host/*/     $LOGDIR/sys/class/iscsi_host     2>> $LOGDIR/sys/copy_err.log
  340.    cp -pR /sys/class/net/*/            $LOGDIR/sys/class/net            2>> $LOGDIR/sys/copy_err.log
  341.  
  342.    mkdir -p $LOGDIR/sys/module
  343.    cp -pR /sys/module/scsi*            $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  344.    cp -pR /sys/module/qis*             $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  345.    cp -pR /sys/module/qla*             $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  346.    cp -pR /sys/module/qlge             $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  347.    cp -pR /sys/module/qlcnic           $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  348.    cp -pR /sys/module/ixgbe            $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  349.    cp -pR /sys/module/nx_nic           $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  350.    cp -pR /sys/module/netxen_nic       $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  351.    cp -pR /sys/module/8021q            $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  352.    cp -pR /sys/module/bonding          $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  353.  
  354.    if [ $IBINSTALLED -eq 1 -a $IBAINSTALLED -eq 0 ]
  355.    then
  356.       IBDIRS=`ls -d /sys/class/*infiniband* 2>> $LOGDIR/script/misc_err.log`
  357.       if [ -n "$IBDIRS" ]
  358.       then
  359.          for DIR in $IBDIRS
  360.          do
  361.             mkdir $LOGDIR/$DIR
  362.             cp -pR $DIR/*/  $LOGDIR/$DIR  2>> $LOGDIR/sys/copy_err.log
  363.          done
  364.       fi
  365.       # iba_capture does the following, but leaving it out for now
  366.       #mkdir $LOGDIR/sys/class/scsi_device
  367.       #cp -pR /sys/class/scsi_device/*/ $LOGDIR/sys/class/scsi_device    2>  $LOGDIR/sys/copy_err.log
  368.  
  369.       cp -pR /sys/module/ib_*          $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  370.       cp -pR /sys/module/iw_*          $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  371.       cp -pR /sys/module/ipoib*        $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  372.       cp -pR /sys/module/mlx*          $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  373.       cp -pR /sys/module/rdma*         $LOGDIR/sys/module 2>> $LOGDIR/sys/copy_err.log
  374.    fi
  375.  
  376.    /bin/echo "... done"
  377. fi
  378.  
  379. #####################################################################
  380. # Gather /proc data
  381. #####################################################################
  382. /bin/echo -n "Gathering /proc files: "
  383. mkdir $LOGDIR/proc
  384. PROC_FILES="/proc/modules \
  385. /proc/pci \
  386. /proc/interrupts \
  387. /proc/cmdline \
  388. /proc/buddyinfo \
  389. /proc/ksyms \
  390. /proc/cpuinfo \
  391. /proc/partitions \
  392. /proc/iomem \
  393. /proc/meminfo \
  394. /proc/mtrr \
  395. /proc/devices \
  396. /proc/filesystems \
  397. /proc/ioports \
  398. /proc/version \
  399. /proc/uptime \
  400. /proc/iba \
  401. /proc/slabinfo"
  402.  
  403. for file in $PROC_FILES
  404. do
  405.    if [ -f $file ]
  406.    then
  407.       cp -p $file $LOGDIR/$file
  408.    fi
  409. done
  410.  
  411. # Make sure /proc/scsi directory exists before gathering data
  412. if [ -d /proc/scsi ]
  413. then
  414.    cd $LOGDIR/proc
  415.    cp -pR /proc/scsi $LOGDIR/proc
  416.    cd $LOGDIR
  417. fi
  418.  
  419. # Gather power management info - performance issues
  420. if [ -d /proc/acpi/processor ]
  421. then
  422.    mkdir -p $LOGDIR/proc/acpi/processor
  423.    cp -pR /proc/acpi/processor/* $LOGDIR/proc/acpi/processor
  424. fi
  425.  
  426. # Gather network info for IPoIB, FCoE and Netxen
  427. if [ $ETHERINSTALLED -eq 1 -o $IBINSTALLED -eq 1 ]
  428. then
  429.    mkdir $LOGDIR/proc/net
  430.    # Make sure /proc/net/nx_nic directory exists before gathering data
  431.    if [ -d /proc/net/nx_nic ]
  432.    then
  433.       cp -pR /proc/net/nx_nic $LOGDIR/proc/net
  434.    fi
  435.    # Make sure /proc/net/bonding directory exists before gathering data
  436.    if [ -d /proc/net/bonding ]
  437.    then
  438.       cp -pR /proc/net/bonding $LOGDIR/proc/net
  439.    fi
  440.    # Make sure /proc/net/vlan directory exists before gathering data
  441.    if [ -d /proc/net/vlan ]
  442.    then
  443.       cp -pR /proc/net/vlan $LOGDIR/proc/net
  444.    fi
  445.    # Other proc/net files
  446.    PROC_FILES="/proc/net/arp \
  447.    /proc/net/dev \
  448.    /proc/net/dev_mcast \
  449.    /proc/net/route \
  450.    /proc/net/rt_cache"
  451.    for file in $PROC_FILES
  452.    do
  453.       if [ -f $file ]
  454.       then
  455.          cp -p $file $LOGDIR/$file
  456.       fi
  457.    done
  458. fi
  459.  
  460. # proc/driver files (mostly IB related)
  461. if [ $IBINSTALLED -eq 1 -a $IBAINSTALLED -eq 0 ]
  462. then
  463.    mkdir $LOGDIR/proc/driver
  464.    PROC_FILES="/proc/driver/ics_dsc \
  465.    /proc/driver/dev \
  466.    /proc/driver/ics_inic \
  467.    /proc/driver/ics_srp \
  468.    /proc/driver/ipoib \
  469.    /proc/driver/sdp \
  470.    /proc/driver/ics_offload \
  471.    /proc/driver/ics_sdp \
  472.    /proc/driver/rds"
  473.    for file in $PROC_FILES
  474.    do
  475.       if [ -f $file ]
  476.       then
  477.          cp -p $file $LOGDIR/$file
  478.       fi
  479.    done
  480. fi
  481. /bin/echo "... done"
  482.  
  483. #####################################################################
  484. # Gather module info
  485. #####################################################################
  486. /bin/echo -n "Gathering module information: "
  487. mkdir $LOGDIR/modules
  488. KERN_VER=`uname -r`
  489. MAJ_VER=`/bin/echo $KERN_VER | head -c3`
  490. if [ $MAJ_VER = "2.4" ]
  491. then
  492.    EXT=".o"
  493. fi
  494. if [ $MAJ_VER = "2.6" ]
  495. then
  496.    EXT=".ko"
  497. fi
  498.  
  499. find /lib/modules/$KERN_VER/ -name qla\*$EXT -print \
  500.   -exec modinfo {} \; -exec /bin/echo \; > $LOGDIR/modules/modinfo.out 2>&1
  501.  
  502. find /lib/modules/$KERN_VER/ -name qisioctl\*$EXT -print \
  503.   -exec modinfo {} \; -exec /bin/echo \; >> $LOGDIR/modules/modinfo.out 2>&1
  504. find /lib/modules/$KERN_VER/ -name qioctlmod\*$EXT -print \
  505.   -exec modinfo {} \; -exec /bin/echo \; >> $LOGDIR/modules/modinfo.out 2>&1
  506. find /lib/modules/$KERN_VER/ -name netxen\*$EXT -print \
  507.   -exec modinfo {} \; -exec /bin/echo \; >> $LOGDIR/modules/modinfo.out 2>&1
  508. find /lib/modules/$KERN_VER/ -name nx_\*$EXT -print \
  509.   -exec modinfo {} \; -exec /bin/echo \; >> $LOGDIR/modules/modinfo.out 2>&1
  510. find /lib/modules/$KERN_VER/ -name qlge\*$EXT -print \
  511.   -exec modinfo {} \; -exec /bin/echo \; >> $LOGDIR/modules/modinfo.out 2>&1
  512. find /lib/modules/$KERN_VER/ -name qlcnic\*$EXT -print \
  513.   -exec modinfo {} \; -exec /bin/echo \; >> $LOGDIR/modules/modinfo.out 2>&1
  514.  
  515. # Gather qisioctl and qioctlmod info (if installed)
  516. modinfo qisioctl  >> $LOGDIR/modules/qisioctl.out  2>> $LOGDIR/script/misc_err.log
  517. modinfo qioctlmod >> $LOGDIR/modules/qioctlmod.out 2>> $LOGDIR/script/misc_err.log
  518.  
  519.  
  520. ls -alRF /lib/modules/ > $LOGDIR/modules/ls_libmodules.out
  521.  
  522. lsmod                  > $LOGDIR/modules/lsmod.out 2>&1
  523.  
  524. #if [ $IBINSTALLED -eq 1 -a $IBAINSTALLED -eq 0 ]
  525. if [ $IBINSTALLED -eq 1 ]
  526. then
  527.    touch $LOGDIR/modules/ibmodpaths.out $LOGDIR/modules/ibmodinfo.out
  528.    for mod in ib_ipath ib_qib ipath_core ib_core ib_ipoib ib_sa ib_umad ib_mad ib_uverbs mlx4_ib ib_mthca kcopy
  529.    do 
  530.       modinfo -F filename $mod >> $LOGDIR/modules/ibmodpaths.out 2>&1
  531.       modinfo $mod             >> $LOGDIR/modules/ibmodinfo.out 2>&1
  532.       /bin/echo                >> $LOGDIR/modules/ibmodinfo.out 2>&1
  533.    done
  534.    depmod -ae > $LOGDIR/modules/depmod.out 2>&1
  535.    sort $LOGDIR/modules/lsmod.out | egrep -i "ipath_|infinipath|_ipath|ib_qib" > $LOGDIR/modules/ipath_module_list.out 2>&1
  536.    sort $LOGDIR/modules/lsmod.out | egrep -i "ib_qib|ipath_|infinipath|^ib_|[ ,]ib_|rdma_|_vnic|rds|findex" > $LOGDIR/modules/infiniband_modules.out 2>&1
  537. fi
  538.  
  539. /bin/echo "... done"
  540.  
  541. #####################################################################
  542. # Gather ethernet info
  543. #####################################################################
  544. /bin/echo -n "Gathering ethernet info: "
  545. mkdir $LOGDIR/network
  546. iptables --list > $LOGDIR/network/iptables.out 2>&1
  547. ifconfig -a     > $LOGDIR/network/ifconfig.out 2>&1
  548. ip addr show    > $LOGDIR/network/ipaddrshow.out 2>&1
  549. ip -s link show > $LOGDIR/network/iplinkshow.out 2>&1
  550. netstat -rn     > $LOGDIR/network/netstat.out
  551. which ethtool > /dev/null 2>&1
  552. if [ $? -eq 0 ]
  553. then
  554.    ETHDEVS=`grep "Link encap" $LOGDIR/network/ifconfig.out | cut -d " " -f1`
  555.    if [ $IBINSTALLED -eq 1 ]
  556.    then
  557.       IB_IF="ipoib"
  558.    else
  559.       IB_IF="ZILCH"
  560.    fi
  561.    for file in $ETHDEVS
  562.    do
  563.       DRIVER=`ethtool -i $file 2>> $LOGDIR/script/misc_err.log | egrep "nx_nic|netxen_nic|qla|ixgbe|qlge|qlcnic|$IB_IF"`
  564.       if [ $? -eq 0 ]
  565.       then
  566.          ethtool -i $file > $LOGDIR/network/ethtool-i.$file 2>&1
  567.          ethtool -k $file > $LOGDIR/network/ethtool-k.$file 2>&1
  568.          ethtool    $file > $LOGDIR/network/ethtool.$file 2>&1
  569.          ifconfig   $file > $LOGDIR/network/ifconfig.$file 2>&1
  570.       fi
  571.    done
  572. fi
  573.  
  574. /bin/echo "... done"
  575.  
  576. #####################################################################
  577. # Gather SANsurfer and driver source info
  578. #####################################################################
  579. /bin/echo -n "Gathering FC/iSCSI tools and driver source info: "
  580. mkdir $LOGDIR/Mgmt_tools
  581.  
  582. if [ -d /opt/QLogic* ]
  583. then
  584.    ls -alRF /opt/QLogic* > $LOGDIR/Mgmt_tools/ls_optQLogic.out
  585.  
  586. #   if [ -d /opt/QLogic_Corporation/FW_Dumps ]
  587. #   then
  588. #      mkdir $LOGDIR/Mgmt_tools/firmwaredumps
  589. #      cp /opt/QLogic_Corporation/FW_Dumps/* $LOGDIR/Mgmt_tools/firmwaredumps 2>> $LOGDIR/script/misc_err.log
  590. #   fi
  591.  
  592.    SS_LOC="/opt/QLogic_Corporation/SANsurfer/qlogic.jar"
  593.    SS_CLASS="com/qlogic/qms/hba/Res.class"
  594.    ISS_LOC="/opt/QLogic_Corporation/SANsurfer/skins/power/iscsi_skin.properties"
  595.    if [ -f $ISS_LOC ]
  596.    then
  597.       ISSNAME=`grep iscsi.main.application.name $ISS_LOC |cut -d " " -f3-6`
  598.       ISSVER=`grep iscsi.main.application.version $ISS_LOC |cut -d " " -f3`
  599.       /bin/echo "$ISSNAME      Version $ISSVER" > $LOGDIR/Mgmt_tools/sansurfer_iscsi_installed.txt
  600.    else
  601.       /bin/echo "iSCSI Management software not found or not installed" > $LOGDIR/Mgmt_tools/sansurfer_iscsi_installed.txt
  602.    fi
  603.    if [ -x /usr/local/bin/iqlremote ]
  604.    then
  605.       IQLREMOTE=`/usr/local/bin/iqlremote -v|grep -m1 Version`
  606.       /bin/echo "SANsurfer iSCSI Remote Agent $IQLREMOTE" >>$LOGDIR/Mgmt_tools/sansurfer_iscsi_installed.txt
  607.    else
  608.       /bin/echo "iSCSI Remote Agent not found or not installed" >>$LOGDIR/Mgmt_tools/sansurfer_iscsi_installed.txt
  609.    fi
  610.  
  611.    if [ -f $SS_LOC ]
  612.    then
  613.       SSVER=`unzip -p $SS_LOC $SS_CLASS | strings | grep Build`
  614.       /bin/echo "SANsurfer FC Manager         Version $SSVER" > $LOGDIR/Mgmt_tools/sansurfer_fc_installed.txt
  615.    else
  616.       /bin/echo "FC Management software not found or not installed" > $LOGDIR/Mgmt_tools/sansurfer_fc_installed.txt
  617.    fi
  618.    if [ -x /usr/local/bin/qlremote ]
  619.    then
  620.       QLREMOTE=`/usr/local/bin/qlremote -v|grep -m1 Version`
  621.       /bin/echo "SANsurfer FC Remote Agent    $QLREMOTE" >>$LOGDIR/Mgmt_tools/sansurfer_fc_installed.txt
  622.    else
  623.       /bin/echo "FC Remote Agent not found" >>$LOGDIR/Mgmt_tools/sansurfer_fc_installed.txt
  624.    fi
  625. else
  626.    /bin/echo "iSCSI Manager not found or not installed" > $LOGDIR/Mgmt_tools/sansurfer_iscsi_installed.txt
  627.    /bin/echo "iSCSI Remote Agent not found or not installed" >>$LOGDIR/Mgmt_tools/sansurfer_iscsi_installed.txt
  628.    /bin/echo "FC Manager not found or not installed" > $LOGDIR/Mgmt_tools/sansurfer_fc_installed.txt
  629.    /bin/echo "FC Remote Agent not found or not installed" >>$LOGDIR/Mgmt_tools/sansurfer_fc_installed.txt
  630. fi
  631.  
  632. touch $LOGDIR/Mgmt_tools/api_installed.txt
  633. APIFILES="/usr/lib/libqlsdm.so /usr/lib64/libqlsdm.so"
  634. for file in $APIFILES
  635. do
  636.    if [ -f $file ]
  637.    then
  638.       APIVER=`strings $file | grep "library version"`
  639.    else
  640.       APIVER="Not Installed"
  641.    fi
  642.    /bin/echo "API $file:   $APIVER" >> $LOGDIR/Mgmt_tools/api_installed.txt
  643. done
  644.  
  645. ls -alRF /usr/local/bin > $LOGDIR/Mgmt_tools/ls_usrlocalbin.out
  646.  
  647. if [ -d /usr/src ]
  648. then
  649.    ls -alRF /usr/src/ > $LOGDIR/Mgmt_tools/ls_usrsrc.out
  650. fi
  651.  
  652. #if [ -d /usr/src/qlogic ]
  653. #then
  654. #   cd /usr/src/qlogic
  655. #   tar cf $LOGDIR/Mgmt_tools/driver_logs.tar `find . -name \*.log -print`
  656. #   cd $LOGDIR
  657. #fi
  658.  
  659. /bin/echo "... done"
  660.  
  661. #####################################################################
  662. # Gather Fabric Viewer info
  663. #####################################################################
  664. /bin/echo -n "Gathering FabricViewer info: "
  665.  
  666. if [ -f /opt/Intel/Fabric_Viewer/FVC.jar ]
  667. then
  668.    FV_DIR="/opt/Intel/Fabric_Viewer"
  669.    FVINSTALLED=1
  670. elif [ -f /opt/QLogic_Corporation/FVC.jar ]
  671. then
  672.    FV_DIR="/opt/QLogic_Corporation"
  673.    FVINSTALLED=1
  674. fi
  675.  
  676. if [ $FVINSTALLED -eq 1 ]
  677. then
  678.    unzip -p $FV_DIR/FVC.jar|strings|grep "Fabric Viewer Version"|cut -d " " -f6 > $LOGDIR/Mgmt_tools/fv_version.txt
  679.    if [ -f $FV_DIR/out.txt ]
  680.    then
  681.       cp $FV_DIR/out.txt $LOGDIR/Mgmt_tools/fv_out.txt
  682.    fi
  683.    if [ -f $FV_DIR/preferences ]
  684.    then
  685.       cp $FV_DIR/preferences $LOGDIR/Mgmt_tools/fv_preferences
  686.    fi
  687.    if [ -f $FV_DIR/subnets.xml ]
  688.    then
  689.       cp $FV_DIR/subnets.xml $LOGDIR/Mgmt_tools/fv_subnets.xml
  690.    fi
  691.    if [ -f $FV_DIR/logs/FabricViewer.log ]
  692.    then
  693.       cp $FV_DIR/logs/FabricViewer.log $LOGDIR/Mgmt_tools/fv_FabricViewer.log
  694.    fi
  695. fi
  696.  
  697. /bin/echo "... done"
  698.  
  699. #####################################################################
  700. # Gather System Log info
  701. #####################################################################
  702. /bin/echo -n "Gathering syslog info: "
  703. mkdir $LOGDIR/logs
  704. LOG_FILES="/var/log/localmessages* \
  705. /var/log/warn* \
  706. /var/log/dmesg* \
  707. /var/log/boot*"
  708.  
  709. if [ $IBINSTALLED -eq 0 -o $IBAINSTALLED -eq 0 ]
  710. then
  711.    LOG_FILES="$LOG_FILES /var/log/messages*"
  712. fi
  713. if [ $IBINSTALLED -eq 1 -a $IBAINSTALLED -eq 0 ]
  714. then
  715.    LOG_FILES="$LOG_FILES \
  716.    /var/log/ics_* \
  717.    /var/log/iba* \
  718.    /var/log/ipath* \
  719.    /var/log/ksyms.* \
  720.    /var/log/opensm*"
  721. fi
  722.  
  723. for file in $LOG_FILES
  724. do
  725.    if [ -f $file ]
  726.    then
  727.       cp -p $file $LOGDIR/logs 2>> $LOGDIR/script/misc_err.log
  728.    fi
  729. done
  730.  
  731. dmesg > $LOGDIR/logs/dmesg.out
  732. ls -alRF /var/crash > $LOGDIR/OS/ls_varcrash.out 2>> $LOGDIR/script/misc_err.log
  733. /bin/echo "... done"
  734.  
  735. #####################################################################
  736. # Gather boot info
  737. #####################################################################
  738. /bin/echo -n "Gathering boot info: "
  739. mkdir $LOGDIR/boot
  740. BOOT_FILES="/boot/grub/grub.conf \
  741. /boot/grub/menu.lst \
  742. /boot/efi/efi/SuSE/elilo.conf \
  743. /boot/efi/efi/redhat/elilo.conf \
  744. /etc/lilo.conf \
  745. /etc/elilo.conf"
  746.  
  747. for file in $BOOT_FILES
  748. do
  749.    if [ -f $file ]
  750.    then
  751.       cp -p $file $LOGDIR/boot
  752.    fi
  753. done
  754.  
  755. if [ -f /etc/grub.conf ]
  756. then
  757.    cp -p /etc/grub.conf $LOGDIR/boot/etc_grub.conf
  758. fi
  759.  
  760. ls -alRF /boot > $LOGDIR/boot/ls_boot.out
  761. /bin/echo "... done"
  762.  
  763. #####################################################################
  764. # Gather FC CLI info
  765. #####################################################################
  766. /bin/echo -n "Searching for FC CLI tools ... "
  767. if [ -x /opt/QLogic_Corporation/SANsurferCLI/scli ]
  768. then
  769.    /bin/echo "SANsurfer FC/CNA CLI" > $LOGDIR/Mgmt_tools/scli_installed.txt
  770.    /opt/QLogic_Corporation/SANsurferCLI/scli -v 2>> $LOGDIR/script/misc_err.log |grep -m1 Build >> $LOGDIR/Mgmt_tools/scli_installed.txt
  771.    /bin/echo -n "installed ... "
  772. #   /bin/echo -n "Gathering FC configuration information ... "
  773. #   /opt/QLogic_Corporation/SANsurferCLI/scli -z > $LOGDIR/Mgmt_tools/scli.out 2>&1
  774.    /bin/echo "done"
  775. elif [ -x /opt/QLogic_Corporation/QConvergeConsoleCLI/scli ]
  776. then
  777.    /bin/echo "SANsurfer FC/CNA CLI" > $LOGDIR/Mgmt_tools/scli_installed.txt
  778.    /opt/QLogic_Corporation/QConvergeConsoleCLI/scli -v 2>> $LOGDIR/script/misc_err.log |grep -m1 Build >> $LOGDIR/Mgmt_tools/scli_installed.txt
  779.    /bin/echo -n "installed ... "
  780. #   /bin/echo -n "Gathering FC configuration information ... "
  781. #   /opt/QLogic_Corporation/QConvergeConsoleCLI/scli -z > $LOGDIR/Mgmt_tools/scli.out 2>&1
  782.    /bin/echo "done"
  783. else
  784.    /bin/echo "FC CLI not found or not installed" > $LOGDIR/Mgmt_tools/scli_installed.txt
  785.    /bin/echo "not installed"
  786. fi
  787.  
  788. #####################################################################
  789. # Gather iSCSI CLI info (if installed)
  790. #####################################################################
  791. /bin/echo -n "Searching for iSCSI CLI tools ... "
  792. if [ -x /opt/QLogic_Corporation/SANsurferiCLI/iscli ]
  793. then
  794.    /bin/echo "SANsurfer iSCSI CLI" > $LOGDIR/Mgmt_tools/iscli_installed.txt
  795.    /opt/QLogic_Corporation/SANsurferiCLI/iscli -ver |egrep "Version|MAPI" >> $LOGDIR/Mgmt_tools/iscli_installed.txt
  796.    /bin/echo -n "installed ... "
  797. #   /bin/echo -n "Gathering iSCSI configuration information ... "
  798. #   /opt/QLogic_Corporation/SANsurferiCLI/iscli -z > $LOGDIR/Mgmt_tools/iscli.out 2>&1
  799.    /bin/echo "done"
  800. elif [ -x /opt/QLogic_Corporation/QConvergeConsoleCLI/iscli ]
  801. then
  802.    /bin/echo "SANsurfer iSCSI CLI" > $LOGDIR/Mgmt_tools/iscli_installed.txt
  803.    /opt/QLogic_Corporation/QConvergeConsoleCLI/iscli -ver |egrep "Version|MAPI" >> $LOGDIR/Mgmt_tools/iscli_installed.txt
  804.    /bin/echo -n "installed ... "
  805. #   /bin/echo -n "Gathering iSCSI configuration information ... "
  806. #   /opt/QLogic_Corporation/QConvergeConsoleCLI/iscli -z > $LOGDIR/Mgmt_tools/iscli.out 2>&1
  807.    /bin/echo "done"
  808. else
  809.    /bin/echo "iSCSI CLI not found or not installed" > $LOGDIR/Mgmt_tools/iscli_installed.txt
  810.    /bin/echo "not installed!"
  811. fi
  812.  
  813. #####################################################################
  814. # Gather netscli info (if installed)
  815. #####################################################################
  816. /bin/echo -n "Searching for CNA network tools  ... "
  817. if [ -x /opt/QLogic_Corporation/QConvergeConsoleCLI/netscli ]
  818. then
  819.    /bin/echo "SANsurfer CNA Networking CLI" > $LOGDIR/Mgmt_tools/netscli_installed.txt
  820.    /opt/QLogic_Corporation/QConvergeConsoleCLI/netscli -ver |egrep "version|MAPI" >> $LOGDIR/Mgmt_tools/netscli_installed.txt
  821.    /bin/echo -n "installed ... "
  822. #   /bin/echo -n "Gathering CNA Networking configuration information ... "
  823. #   /opt/QLogic_Corporation/QConvergeConsoleCLI/netscli -z > $LOGDIR/Mgmt_tools/netscli.out 2>&1
  824.    /bin/echo "done"
  825. else
  826.    /bin/echo "CNA Networking CLI not found or not installed" > $LOGDIR/Mgmt_tools/netscli_installed.txt
  827.    /bin/echo "not installed!"
  828. fi
  829.  
  830. #####################################################################
  831. # Gather Infiniband info
  832. #
  833. #####################################################################
  834. if [ $IBINSTALLED -eq 1 ]
  835. then
  836.    /bin/echo -n "Gathering Infiniband info: "
  837.    mkdir $LOGDIR/infiniband
  838.    rpm -qa --qf \
  839.         '%{NAME}-%{VERSION}-%{RELEASE} Vendor=%{VENDOR} %{URL} Built=%{BUILDTIME:date}\n' | \
  840.         egrep -i openib\|openfabrics\|intel\|qlogic\|pathscale\|silverstorm | sort > $LOGDIR/infiniband/ib_rpms.out
  841.  
  842.    if [ -d /opt/iba ]
  843.    then
  844.       ls -alRF /opt/iba > $LOGDIR/infiniband/ls_opt_iba.out
  845.    fi
  846.    if [ -d /opt/infinipath ]
  847.    then
  848.       ls -alRF /opt/infinipath > $LOGDIR/infiniband/ls_opt_infinipath.out
  849.    fi
  850.    if [ -d /opt/qlogic_ofed ]
  851.    then
  852.       ls -alRF /opt/qlogic_ofed > $LOGDIR/infiniband/ls_opt_qlogic_ofed.out
  853.    fi
  854.    if [ -d /opt/qlogic_fm ]
  855.    then
  856.       ls -alRF /opt/qlogic_fm > $LOGDIR/infiniband/ls_opt_qlogic_fm.out
  857.    fi
  858.    if [ -d /opt/ifs_fm ]
  859.    then
  860.       ls -alRF /opt/ifs_fm > $LOGDIR/infiniband/ls_opt_ifs_fm.out
  861.    fi
  862.    if [ -d /opt/intel ]
  863.    then
  864.       ls -alRF /opt/intel > $LOGDIR/infiniband/ls_opt_intel.out
  865.    fi
  866.    if [ -d /opt/Intel ]
  867.    then
  868.       ls -alRF /opt/Intel > $LOGDIR/infiniband/ls_opt_Intel.out
  869.    fi
  870.  
  871.    ls -lF /dev/ipath* /dev/infiniband > $LOGDIR/infiniband/ls_dev_info.out 2>&1
  872.    egrep infiniband\|ipath /etc/udev*/* /etc/udev*/*/* 2>/dev/null | grep -v multipath > $LOGDIR/infiniband/udev_info.out
  873.  
  874.    if [ -d /usr/mpi ]
  875.    then
  876.       ls -alRF /usr/mpi > $LOGDIR/infiniband/ls_usr_mpi.out
  877.    fi
  878.    which mpi-selector > /dev/null 2>&1
  879.    if [ $? -eq 0 ]
  880.    then
  881.       /bin/echo "MPI List:"   >  $LOGDIR/infiniband/mpi-selector.out 2>&1
  882.       mpi-selector --list     >> $LOGDIR/infiniband/mpi-selector.out 2>&1
  883.       /bin/echo "Active MPI:" >> $LOGDIR/infiniband/mpi-selector.out 2>&1
  884.       mpi-selector --query    >> $LOGDIR/infiniband/mpi-selector.out 2>&1
  885.    fi
  886.  
  887.    if [ -f /opt/iba/src/mpi_apps/.prefix ]
  888.    then
  889.       cp /opt/iba/src/mpi_apps/.prefix $LOGDIR/infiniband/mpi_apps.prefix
  890.    fi
  891.  
  892.    /bin/echo -n " ... adapter info "
  893.    which ibv_devinfo > /dev/null 2>&1
  894.    if [ $? -eq 0 ]
  895.    then
  896.       ibv_devinfo -v > $LOGDIR/infiniband/ibv_devinfo.out 2>&1
  897.    fi
  898.    which ibv_devices > /dev/null 2>&1
  899.    if [ $? -eq 0 ]
  900.    then
  901.       ibv_devices    > $LOGDIR/infiniband/ibv_devices.out 2>&1
  902.    fi
  903.    which ibstatus > /dev/null 2>&1
  904.    if [ $? -eq 0 ]
  905.    then
  906.       ibstatus       > $LOGDIR/infiniband/ibstatus.out 2>&1
  907.    fi
  908.    which ibstat > /dev/null 2>&1
  909.    if [ $? -eq 0 ]
  910.    then
  911.       ibstat         > $LOGDIR/infiniband/ibstat.out 2>&1
  912.    fi
  913.    which perfquery > /dev/null 2>&1
  914.    if [ $? -eq 0 ]
  915.    then
  916.       perfquery      > $LOGDIR/infiniband/perfquery.out 2>&1
  917.    fi
  918.  
  919.    if [ $MLXINSTALLED -eq 1 ]
  920.    then
  921. #      HCAS=`grep InfiniBand $LOGDIR/misc/lspci.out | grep -vi bridge | grep -vi QLogic | cut -d\  -f1`
  922.       HCAS=`grep Mellanox $LOGDIR/misc/lspci.out | grep -vi bridge | cut -d\  -f1`
  923.       if [ -n "$HCAS" ]
  924.       then
  925.          for HCA in $HCAS
  926.          do
  927.             touch $LOGDIR/infiniband/mlx_hca_info.out
  928.             echo "#####################" >> $LOGDIR/infiniband/mlx_hca_info.out
  929.             mstvpd $HCA                  >> $LOGDIR/infiniband/mlx_hca_info.out 2>&1
  930.             mstflint -d $HCA dc          >> $LOGDIR/infiniband/mlx_hca_info.out 2>&1
  931.             mstflint -d $HCA q           >> $LOGDIR/infiniband/mlx_hca_info.out 2>&1
  932.             mstflint -d $HCA v           >> $LOGDIR/infiniband/mlx_hca_info.out 2>&1
  933.             echo "#####################" >> $LOGDIR/infiniband/mlx_hca_info.out
  934.          done
  935.       fi
  936.    else
  937.       which ipath_control > /dev/null 2>&1
  938.       if [ $? -eq 0 ]
  939.       then
  940.          ipath_control -iv > $LOGDIR/infiniband/ipath_control.out 2>&1
  941.       fi
  942.    fi
  943.  
  944.    ADAPTERSTATUS=`grep -i state $LOGDIR/infiniband/ibstat.out $LOGDIR/infiniband/ibv_devinfo.out 2> $LOGDIR/script/misc_err.log|grep -i active`
  945.    if [ $? -eq 0 ]
  946.    then
  947.       /bin/echo -n " ... fabric info "
  948.       which ibnodes > /dev/null 2>&1
  949.       if [ $? -eq 0 ]
  950.       then
  951.          ibnodes > $LOGDIR/infiniband/ibnodes.out 2>&1
  952.       fi
  953.       which iblinkinfo > /dev/null 2>&1
  954.       if [ $? -eq 0 ]
  955.       then
  956.          iblinkinfo > $LOGDIR/infiniband/iblinkinfo.out 2>&1
  957.       else
  958.          which iblinkinfo.pl > /dev/null 2>&1
  959.          if [ $? -eq 0 ]
  960.          then
  961.             iblinkinfo.pl > $LOGDIR/infiniband/iblinkinfo.out 2>&1
  962.          fi
  963.       fi
  964.       ibnetdiscover -p > $LOGDIR/infiniband/ibnetdiscover.out 2>&1
  965.       which ibqueryerrors > /dev/null 2>&1
  966.       if [ $? -eq 0 ]
  967.       then
  968.          ibqueryerrors -r > $LOGDIR/infiniband/ibqueryerrors.out 2>&1
  969.       else
  970.          ibqueryerrors.pl -r > $LOGDIR/infiniband/ibqueryerrors.out 2>&1
  971.       fi
  972.       which sminfo > /dev/null 2>&1
  973.       if [ $? -eq 0 ]
  974.       then
  975.          sminfo > $LOGDIR/infiniband/sminfo.out 2>&1
  976.       fi
  977.       which saquery > /dev/null 2>&1
  978.       if [ $? -eq 0 ]
  979.       then
  980.          saquery      > $LOGDIR/infiniband/saquery.out 2>&1
  981.          saquery LR   > $LOGDIR/infiniband/saquery_links.out 2>&1
  982. # DG: PIR option is not what is expected with RHEL 5.4 and SLES 11
  983.          saquery PIR  > $LOGDIR/infiniband/saquery_verbose.out 2>&1
  984.          saquery -s  >> $LOGDIR/infiniband/sminfo.out 2>&1
  985.       fi
  986.       which fabric_info > /dev/null 2>&1
  987.       if [ $? -eq 0 ]
  988.       then
  989.          /sbin/fabric_info > $LOGDIR/infiniband/fabric_info.out 2>&1
  990.       fi
  991.    else
  992.       /bin/echo -n " ... no adapter status, skipping fabric info "
  993.    fi
  994.  
  995.    /bin/echo "... done"
  996.  
  997.    if [ $IBAINSTALLED -eq 1 ]
  998.    then
  999.       /bin/echo "Running iba_capture ..."
  1000.       iba_capture -d 3 $LOGDIR/infiniband/iba_capture.tgz |grep -v iba_capture
  1001.    elif [ $MLXINSTALLED -eq 0 ]
  1002.    then
  1003.       which ipathstats > /dev/null 2>&1
  1004.       if [ $? -eq 0 ]
  1005.       then
  1006.          ipathstats > $LOGDIR/infiniband/ipathstats.out 2>&1
  1007.          /bin/echo >> $LOGDIR/infiniband/ipathstats.out 2>&1
  1008.          ipathstats -e >> $LOGDIR/infiniband/ipathstats.out 2>&1
  1009.       fi
  1010.       which ipath_trace > /dev/null 2>&1
  1011.       if [ $? -eq 0 ]
  1012.       then
  1013.          ipath_trace -d > $LOGDIR/infiniband/ipath_trace.out 2>&1
  1014.       fi
  1015.    fi
  1016. fi
  1017.  
  1018. #####################################################################
  1019. # Place holder below for dashboard.sh
  1020. #####################################################################
  1021. # Start of dashboard.sh
  1022. #####################################################################
  1023. # Post-process script output into pdeudo-meaningful html
  1024. #####################################################################
  1025.  
  1026. # The next line (LOGDIR=$1) must be removed before merging in with 
  1027. # the main data gathering script
  1028. cd $LOGDIR
  1029.  
  1030. #####################################################################
  1031. # Create revisionhistory.txt for the script output
  1032. #####################################################################
  1033. cat > $LOGDIR/script/revisionhistory.txt <<!
  1034. Intel Infiniband Information Gathering Script - Revision History
  1035.  
  1036.  Revision History
  1037.   Rev  4.05.03a 2014/01/28
  1038.       - Temporary work-around for iba_capture hang
  1039.   Rev  4.05.03 2013/07/24
  1040.       - Added Intel Compiler and MPI listing
  1041.       - Added lscpu & lstopo commands
  1042.   Rev  4.05.02 2013/07/24
  1043.       - Added Fabric Viewer Info
  1044.   Rev  4.05.01 2013/04/05
  1045.       - Added files for Intel release of IFS/OFED+ software stack.
  1046.   Rev  4.05.00 2012/10/19
  1047.       - Convert information to Intel.  Change Dashboard plus other cleanups.
  1048.       - Added /var/log/ipath_perf_tuning.log
  1049.       - Script renamed to ibsupport_info.sh 
  1050.   Rev  4.04.11 2012/06/26
  1051.       - Add numa utilities to query numa support
  1052.       - Removed sosreport (RHEL) and supportconfig (SLES)
  1053.   Rev  4.04.10 2012/04/25
  1054.       - Minor mod for dashboard to scan correct file for FC Link state
  1055.   Rev  4.04.09 2012/02/07
  1056.       - Added netscli
  1057.   Rev  4.04.08 2011/11/29
  1058.       - Rather than trying to guess /sbin, /usr/sbin paths, just fix $PATH
  1059.       - Added "ip cmd show" to report address and link info (ifconfig deprecated)
  1060.       - Finally (so we hope) got rid of the duplicate driver params in the dashboard
  1061.   Rev  4.04.07 2011/10/05
  1062.       - Changes to include new path for fc/iscsi/nic cli tools
  1063.   Rev  4.04.06 2011/09/23
  1064.       - Added "top" output
  1065.       - Added /etc/modprobe.d/scsi_mod.conf (RHEL 6.x)
  1066.   Rev  4.04.05 2011/09/08
  1067.       - Tweaks to address Mellanox LOM 
  1068.       - Added /sbin and /usr/sbin for commands "hidden" by sudo
  1069.   Rev  4.04.04  2011/09/01
  1070.       - Changes to include /etc/modprobe.d/<module>.conf files
  1071.   Rev  4.04.03  2011/06/14
  1072.       - Added MPI queries
  1073.       - Temporarily removed "df" command due to some problems on RHEL 6
  1074.       - Started other changes for RHEL 6 issues
  1075.       - Added anaconda to sosreport and ~/anaconda-ks.cfg (RHEL) ~/autoinstall.xml (SLES) files
  1076.   Rev  4.04.02  2011/05/04
  1077.       - Added Rocks version to dashboard
  1078.       - Only gather IB fabric information if adapter state is active
  1079.       - "pulled" ibdiagnet because it has shown problems on some fabrics
  1080.   Rev  4.04.01  2011/04/13
  1081.       - Barely out of the box and have to make a change ...
  1082.       - Added /etc/tmi.conf
  1083.   Rev  4.04.00  2011/04/12
  1084.       - Major changes to include Infiniband host and fabric information
  1085.       - Restructure of qla_linux_info.sh to query QLogic hardware before querying
  1086.         product-related info
  1087.       - New script is qla_linux_ibinfo.sh
  1088.   Rev  4.02.08  2011/03/04
  1089.       - Added /opt/QLogic_Corporation/FW_Dumps/*
  1090.       - Added sosreport (RHEL) and supportconfig (SLES)
  1091.       - Added FC driver version check to detect RAMDISK mismatch
  1092.   Rev  4.02.07a 2010/05/17
  1093.       - Added some minor changes to capture more IB goodies
  1094.   Rev  4.02.07  2010/04/22
  1095.       - Added /etc/sysctl.conf for collection
  1096.   Rev  4.02.06  2010/04/02
  1097.       - Removed VMware info to new qla_vmware_info.sh script
  1098.       - Added a few Infiniband goodies in lieu of a major overhaul of the IB script
  1099.       - Minor tweaks to remove some more errors introduced with the new changes
  1100.   Rev  4.02.05  2010/03/05
  1101.       - Added ls /var/crash
  1102.       - Added a few more VMware goodies until qla_vmware_info.sh is complete
  1103.   Rev  4.02.04  2010/02/19
  1104.       - Minor fixes to remove error messages
  1105.       - Moved OS stuff to the front to check for VMware
  1106.       - Plans (commented for now) to check for VMware and exit when separate VMWare script done
  1107.       - Added esx and vmk commands if VMware 
  1108.   Rev  4.02.03  2010/01/19
  1109.       - Added vmware logs
  1110.   Rev  4.02.02  2009/11/24
  1111.       - Added ethtool -k to get offload info on QLogic NICs and CNAs.
  1112.       - Changed where we look to get scli information (go directly to /opt)
  1113.   Rev  4.02.01  2009/11/13
  1114.       - Minor fix to the "which xxx" commands.  Some OSes did not like the redirect.
  1115.       - Add /proc/net/bonding and /proc/net/vlan for FCoE and Netxen.
  1116.       - Modified sysfs gathering due to changes with SLES 11.
  1117.       - Finally got rid of index.html.
  1118.       - Added modinfo for qioctlmod module
  1119.   Rev  4.02.00  2009/09/02
  1120.       - Significant modifications to restructure dashboard and gather additional data
  1121.       - Added more FC info from /sys for inbox driver
  1122.       - Added separate modinfo query for qisioctl to more easily add to dashboard
  1123.       - Integrated SANsurfer / agent / [i]scli / API version info into mgmt tools section
  1124.       - Added section for ethernet info (FCoE and NetXen NICs)
  1125.       - Moved dashboard.html and details.html to root directory of tgz file and deprecated index.html
  1126.   Rev  4.01.01  2009/07/14
  1127.       - Fixed serious bug -NOT- changed title from Windows to Linux (can't be having that!)
  1128.       - Changed reference from "Readme" to "Details" (readme.html is now details.html)
  1129.   Rev  4.01.00  2009/05/14
  1130.       - Significant modifications to gather additional data (and clear the RFE stack)
  1131.       - Added logger entry for script start (pointless to do one at the end of the script)
  1132.       - Added more files collected from /proc directory
  1133.       - Added modinfo for qisioctl module
  1134.       - Added temporary tgz fix for /sys files causing extraction errors
  1135.       - Added version query for /usr/lib[64]/libqlsdm.so (API)
  1136.       - Added more command queries (lsscsi lsof free vmstat sysctl)
  1137.   Rev  4.00.06  2009/03/12
  1138.       - Added check for script run with root permissions
  1139.       - Added /etc/*-release /etc/*_version to verify supported distributions
  1140.   Rev  4.00.05  2009/01/27
  1141.       - Added dmidecode output
  1142.       - Changed datecode on the tgz filename from MMDDYY to YYMMDD
  1143.   Rev  4.00.04  2008/11/10
  1144.       - Added driver & scsi parameters to dashboard
  1145.   Rev  4.00.03  2008/10/27
  1146.       - Added GCC version to dashboard
  1147.   Rev  4.00.02  2008/08/13
  1148.       - Fix directory listing of 32-bit and 64-bit loadable libraries
  1149.   Rev  4.00.01  2008/08/06
  1150.       - Add directory listing of 32-bit and 64-bit loadable libraries
  1151.   Rev  4.00.00  2007/12/07
  1152.       - Major restructuring to add html dashboard
  1153.       - added /proc/cpuinfo
  1154.   Rev  3.00.01  2007/08/23
  1155.       - Add driver_logs.tar to capture driver installation logs
  1156.       - Change iscli to use the new "-z" option
  1157.   Rev  3.00.00  2007/01/18
  1158.       - Change output directory and tgz name to assure uniqueness
  1159.       - Add iscli_info.sh script to this script
  1160.   Rev  2.00.03  2006/12/18
  1161.       - Add uptime
  1162.   Rev  2.00.02  2006/04/19
  1163.       - Add gcc info
  1164.   Rev  2.00.01  2006/03/23
  1165.       - Add ls -alRF /sys
  1166.   Rev  2.00.00  2006/03/16
  1167.       - Major restructuring to remove OS-specific errors
  1168.   Rev  1.00.04  2006/12/06
  1169.       - Add ifconfig info
  1170.       - Add ls -alR /etc/rc.d/ /opt/QLogic* /usr/local/bin
  1171.       - Add chkconfig to list configured daemons
  1172.   Rev  1.00.03  2005/05/20
  1173.       - Add SuSE ia64 goodies
  1174.       - Add /etc/qla2xxx.conf
  1175.   Rev  1.00.02  2005/03/28
  1176.       - Add lspci -v (hwconf info)
  1177.       - Add scli -z all (if installed)
  1178.       - Add qla4xxx for QLA4010 on 2.6 kernel
  1179.       - Add dmesg command when no /var/log/dmesg file
  1180.   Rev  1.00.01  2005/03/28
  1181.       - Start of Revision History
  1182. !
  1183.  
  1184. #####################################################################
  1185. # Create dashboard.html for the script output
  1186. #####################################################################
  1187. DBH=$LOGDIR/dashboard.html
  1188. #
  1189. # Header
  1190. #
  1191. cat > $DBH <<!
  1192. <head><title>$LOGNAME Dashboard</title></head> 
  1193. <body> 
  1194. <font face="Courier New"> 
  1195.  <a id="top"></a> 
  1196. <div align="center"> 
  1197. <b>Intel Infiniband Information Gathering Script Dashboard</b><br> 
  1198. !
  1199. /bin/echo `date` >> $DBH
  1200. /bin/echo "<hr><hr></div>" >> $DBH
  1201.  
  1202. #
  1203. # Header
  1204. #
  1205. cat >> $DBH <<!
  1206. <pre>Script Version $ScriptVER
  1207. <b>Index:</b><hr> 
  1208. Dashboard Links:                                      Key File Links:
  1209. !
  1210. /bin/echo -n "<a href=\"#systeminfo\">System Information</a>                                    " >> $DBH
  1211. /bin/echo    "<a href=\"details.html\">details.html</a>  - detailed information on collected files" >> $DBH
  1212. /bin/echo -n "<a href=\"#mgmtinfo\">Management Tools Information</a>                          " >> $DBH
  1213. /bin/echo    "<a href=\"misc/lspci.out\">lspci.out</a>     - list of installed PCI/PCIe hardware" >> $DBH
  1214. #
  1215. # DG: Eventually remove comments on "if [ $xxxINSTALLED" blocks to "compartmentalize" the dashboard
  1216. #
  1217. #if [ $FCINSTALLED -eq 1 ]
  1218. #then
  1219.    /bin/echo -n "<a href=\"#fcinfo\">Fibre Channel Information</a>                             " >> $DBH
  1220.    if [ -f Mgmt_tools/scli.out ]
  1221.       then
  1222.          /bin/echo "<a href=\"Mgmt_tools/scli.out\">scli.out</a>      - scli output" >> $DBH
  1223.       else
  1224.          /bin/echo "scli.out      - scli output (Not Installed)" >> $DBH
  1225.    fi
  1226. #fi
  1227. #if [ $ISCSIINSTALLED -eq 1 ]
  1228. #then
  1229.    /bin/echo -n "<a href=\"#iscsiinfo\">iSCSI Information</a>                                     " >> $DBH
  1230.    if [ -f Mgmt_tools/iscli.out ]
  1231.       then
  1232.          /bin/echo "<a href=\"Mgmt_tools/iscli.out\">iscli.out</a>     - iscli output" >> $DBH
  1233.       else
  1234.          /bin/echo "iscli.out     - iscli output (Not Installed)" >> $DBH
  1235.    fi
  1236. #fi
  1237. #if [ $ETHERINSTALLED -eq 1 ]
  1238. #then
  1239.    /bin/echo -n "<a href=\"#etherinfo\">Ethernet Information</a>                                  " >> $DBH
  1240.    /bin/echo    "<a href=\"modules/lsmod.out\">lsmod.out</a>     - list of loaded modules" >> $DBH
  1241. #fi
  1242. #if [ $IBINSTALLED -eq 1 ]
  1243. #then
  1244.    /bin/echo -n "<a href=\"#ibinfo\">Infiniband Information</a>                                " >> $DBH
  1245.    if [ -f infiniband/iba_capture.tgz ]
  1246.       then
  1247.          /bin/echo "<a href=\"infiniband/iba_capture.tgz\">iba_capture</a>   - iba_capture tgz output" >> $DBH
  1248.       else
  1249.          /bin/echo "iba_capture   - iba_capture tgz output (IFS Not Installed)" >> $DBH
  1250.    fi
  1251. #fi
  1252. #if [ $FCINSTALLED -eq 1 ]
  1253. #then
  1254.    /bin/echo -n "<a href=\"#fclogs\">Fibre Channel Message Logs</a>                            " >> $DBH
  1255.    if [ -f misc/lsscsi.out ]
  1256.       then
  1257.          /bin/echo "<a href=\"misc/lsscsi.out\">lsscsi.out</a>    - list of scsi devices" >> $DBH
  1258.       elif [ -f proc/scsi/scsi ]
  1259.       then
  1260.          /bin/echo "<a href=\"proc/scsi/scsi\">scsi</a>          - list of scsi devices (/proc/scsi/scsi)" >> $DBH
  1261.       else
  1262.          /bin/echo "scsi          - No SCSI information found" >> $DBH
  1263.    fi
  1264. #fi
  1265. #if [ $ISCSIINSTALLED -eq 1 ]
  1266. #then
  1267.    /bin/echo -n "<a href=\"#iscsilogs\">iSCSI Message Logs</a>                                    " >> $DBH
  1268.    if [ -f etc/modprobe.conf.local ]
  1269.       then
  1270.          /bin/echo "<a href=\"etc/modprobe.conf.local\">modprobe.conf</a> - list of module parameters (modprobe.conf.local)" >> $DBH
  1271.       elif [ -f etc/modprobe.conf ]
  1272.       then
  1273.          /bin/echo "<a href=\"etc/modprobe.conf\">modprobe.conf</a> - list of module parameters" >> $DBH
  1274.       else
  1275.          /bin/echo "<a href=\"etc/modules.conf\">modules.conf</a>  - list of module parameters" >> $DBH
  1276.    fi
  1277. #fi
  1278. #if [ $ETHERINSTALLED -eq 1 ]
  1279. #then
  1280.    /bin/echo -n "<a href=\"#etherlogs\">Ethernet Message Logs</a>                                 " >> $DBH
  1281.    /bin/echo    "<a href=\"network/ifconfig.out\">ifconfig.out</a>  - list of network interfaces" >> $DBH
  1282. #fi
  1283. #if [ $IBINSTALLED -eq 1 ]
  1284. #then
  1285.    /bin/echo "<a href=\"#iblogs\">Infiniband Message Logs</a><br>" >> $DBH 
  1286. #fi
  1287.  
  1288. #
  1289. # System Information
  1290. #
  1291. cat >> $DBH <<!
  1292. <hr><a id="systeminfo"></a><b><a href="details.html#osfiles">System Information:</a></b>     <a href="#top">top</a><hr> 
  1293. !
  1294. HOSTNAME=`cut -d " " -f2 < $LOGDIR/OS/uname`
  1295. /bin/echo "Host Name:                 $HOSTNAME" >> $DBH
  1296. if [ -f $LOGDIR/OS/redhat-release ]
  1297. then
  1298.    OSNAME=`cat $LOGDIR/OS/redhat-release`
  1299.    if [ -f $LOGDIR/OS/rocks-release ]
  1300.    then
  1301.       OSNAME="$OSNAME / `cat $LOGDIR/OS/rocks-release`"
  1302.    fi
  1303. elif [ -f $LOGDIR/OS/SuSE-release ]
  1304. then
  1305.    OSNAME=`grep -i suse $LOGDIR/OS/SuSE-release`
  1306.    OSVER=`grep VERSION $LOGDIR/OS/SuSE-release`
  1307.    OSPATCH=`grep -h PATCH $LOGDIR/OS/*release`
  1308. else
  1309.    OSNAME="unknown"
  1310. fi
  1311. /bin/echo "OS Name:                   $OSNAME" >> $DBH
  1312. if [ -f $LOGDIR/OS/SuSE-release ]
  1313. then
  1314.    /bin/echo "OS Version:                $OSVER,   $OSPATCH" >> $DBH
  1315. fi
  1316. KERNELVERSION=`cut -d " " -f3 < $LOGDIR/OS/uname`
  1317. /bin/echo "Kernel Version:            $KERNELVERSION" >> $DBH
  1318. /bin/echo "GCC Version:               `grep "gcc (" $LOGDIR/misc/gcc.out`" >> $DBH
  1319. /bin/echo "System Up Time:           `cat $LOGDIR/misc/uptime.out`" >> $DBH
  1320. PRODNAME=`sed -n '/System Information/,/Handle/p' $LOGDIR/misc/dmidecode.out |grep "Product Name" | cut -d ":" -f2`
  1321. MFGRNAME=`sed -n '/System Information/,/Handle/p' $LOGDIR/misc/dmidecode.out |grep "Manufacturer" | cut -d ":" -f2`
  1322. if [ -z "$PRODNAME" -o -z "$MFGRNAME" ]
  1323. then
  1324. PRODNAME=`sed -n '/Base Board Information/,/Handle/p' $LOGDIR/misc/dmidecode.out |grep "Product Name" | cut -d ":" -f2`
  1325. MFGRNAME=`sed -n '/Base Board Information/,/Handle/p' $LOGDIR/misc/dmidecode.out |grep "Manufacturer" | cut -d ":" -f2`
  1326. fi
  1327. /bin/echo "System Manufacturer:      $MFGRNAME" >> $DBH
  1328. /bin/echo "System Model:             $PRODNAME" >> $DBH
  1329. CPUMODEL=`grep "model name" $LOGDIR/proc/cpuinfo |uniq |cut -d " " -f3-9`
  1330. CPUCOUNT=`grep -c "model name" $LOGDIR/proc/cpuinfo`
  1331. CPUSPEED=`grep "cpu MHz" $LOGDIR/proc/cpuinfo |uniq |cut -d " " -f3-9`
  1332. /bin/echo "CPU Info:                  (x$CPUCOUNT) $CPUMODEL, $CPUSPEED MHz" >> $DBH
  1333. BIOSVEND=`sed -n '/BIOS Information/,/Handle/p' $LOGDIR/misc/dmidecode.out |grep "Vendor" | cut -d ":" -f2`
  1334. BIOSVERS=`sed -n '/BIOS Information/,/Handle/p' $LOGDIR/misc/dmidecode.out |grep "Version" | cut -d ":" -f2`
  1335. BIOSDATE=`sed -n '/BIOS Information/,/Handle/p' $LOGDIR/misc/dmidecode.out |grep "Release Date" | cut -d ":" -f2`
  1336. /bin/echo "BIOS Version:             $BIOSVEND  Version $BIOSVERS  $BIOSDATE" >> $DBH
  1337. /bin/echo >> $DBH
  1338.  
  1339. /bin/echo "<B>FC Driver Parameters:</B>" >> $DBH
  1340. if [ -f $LOGDIR/etc/modprobe.conf.local ]
  1341. then
  1342.    grep -h "options qla2" $LOGDIR/etc/modprobe.conf.local >> $DBH
  1343. fi
  1344. if [ -f $LOGDIR/etc/modprobe.conf ]
  1345. then
  1346.    grep -h "options qla2" $LOGDIR/etc/modprobe.conf >> $DBH
  1347. fi
  1348. if [ -f $LOGDIR/etc/modprobe.d/qla2xxx.conf ]
  1349. then
  1350.    grep -h "options qla2" $LOGDIR/etc/modprobe.d/qla2xxx.conf >> $DBH
  1351. fi
  1352.  
  1353. /bin/echo "<B>iSCSI Driver Parameters:</B>" >> $DBH
  1354. if [ -f $LOGDIR/etc/modprobe.conf.local ]
  1355. then
  1356.    grep -h "options qla4" $LOGDIR/etc/modprobe.conf.local >> $DBH
  1357. fi
  1358. if [ -f $LOGDIR/etc/modprobe.conf ]
  1359. then
  1360.    grep -h "options qla4" $LOGDIR/etc/modprobe.conf >> $DBH
  1361. fi
  1362. if [ -f $LOGDIR/etc/modprobe.d/qla4xxx.conf ]
  1363. then
  1364.    grep -h "options qla4" $LOGDIR/etc/modprobe.d/qla4xxx.conf >> $DBH
  1365. fi
  1366.  
  1367. /bin/echo "<B>Ethernet Module Parameters:</B>" >> $DBH
  1368. if [ -f $LOGDIR/etc/modprobe.conf.local ]
  1369. then
  1370.    grep -h options $LOGDIR/etc/modprobe.conf.local | egrep "qla3|qlge|qlcnic|nx_nic|netxen_nic" >> $DBH
  1371. fi
  1372. if [ -f $LOGDIR/etc/modprobe.conf ]
  1373. then
  1374.    grep -h options $LOGDIR/etc/modprobe.conf | egrep "qla3|qlge|qlcnic|nx_nic|netxen_nic" >> $DBH
  1375. fi
  1376. if [ -f $LOGDIR/etc/modprobe.d/qla3xxx.conf ]
  1377. then
  1378.    grep -h "options qla3" $LOGDIR/etc/modprobe.d/qla3xxx.conf >> $DBH
  1379. fi
  1380. if [ -f $LOGDIR/etc/modprobe.d/qlge.conf ]
  1381. then
  1382.    grep -h "options qlge" $LOGDIR/etc/modprobe.d/qlge.conf >> $DBH
  1383. fi
  1384. if [ -f $LOGDIR/etc/modprobe.d/qlcnic.conf ]
  1385. then
  1386.    grep -h "options qlcnic" $LOGDIR/etc/modprobe.d/qlcnic.conf >> $DBH
  1387. fi
  1388. if [ -f $LOGDIR/etc/modprobe.d/nx_nic.conf ]
  1389. then
  1390.    grep -h "options nx_nic" $LOGDIR/etc/modprobe.d/nx_nic.conf >> $DBH
  1391. fi
  1392. if [ -f $LOGDIR/etc/modprobe.d/netxen_nic.conf ]
  1393. then
  1394.    grep -h "options netxen_nic" $LOGDIR/etc/modprobe.d/netxen_nic.conf >> $DBH
  1395. fi
  1396.  
  1397. /bin/echo "<B>SCSI Module Parameters:</B>" >> $DBH
  1398. if [ -f $LOGDIR/etc/modprobe.conf.local ]
  1399. then
  1400.    grep -h "options scsi" $LOGDIR/etc/modprobe.conf.local >> $DBH
  1401. fi
  1402. if [ -f $LOGDIR/etc/modprobe.conf ]
  1403. then
  1404.    grep -h "options scsi" $LOGDIR/etc/modprobe.conf >> $DBH
  1405. fi
  1406. if [ -f $LOGDIR/etc/modprobe.d/scsi.conf ]
  1407. then
  1408.    grep -h "options scsi" $LOGDIR/etc/modprobe.d/scsi.conf >> $DBH
  1409. fi
  1410.  
  1411. /bin/echo "<B>Infiniband Driver Parameters:</B>" >> $DBH
  1412. if [ -f $LOGDIR/etc/modprobe.conf.local ]
  1413. then
  1414.    grep -h "options ib_" $LOGDIR/etc/modprobe.conf.local >> $DBH
  1415. fi
  1416. if [ -f $LOGDIR/etc/modprobe.conf ]
  1417. then
  1418.    grep -h "options ib_" $LOGDIR/etc/modprobe.conf >> $DBH
  1419. fi
  1420. if [ -f $LOGDIR/etc/modprobe.d/ib_qib.conf ]
  1421. then
  1422.    grep -h "options ib_qib" $LOGDIR/etc/modprobe.d/ib_qib.conf >> $DBH
  1423. fi
  1424. if [ -f $LOGDIR/etc/modprobe.d/ib_ipoib.conf ]
  1425. then
  1426.    grep -h "options ib_ipoib" $LOGDIR/etc/modprobe.d/ib_ipoib.conf >> $DBH
  1427. fi
  1428. /bin/echo >> $DBH
  1429.  
  1430. /bin/echo "<B>Adapters Installed:</B>" >> $DBH
  1431. if [ $FCINSTALLED -eq 1 ]
  1432. then
  1433.    grep QLogic $LOGDIR/misc/lspci.out|grep "Fibre Channel:" >> $DBH
  1434. #else
  1435. #   /bin/echo "No Fibre Channel Adapters Installed" >> $DBH
  1436. fi
  1437. if [ $ISCSIINSTALLED -eq 1 ]
  1438. then
  1439. #   grep QLogic $LOGDIR/misc/lspci.out|grep "Network controller:" >> $DBH
  1440. #else
  1441.    /bin/echo "No iSCSI Adapters Installed" >> $DBH
  1442. fi
  1443. if [ $ETHERINSTALLED -eq 1 ]
  1444. then
  1445.    grep QLogic $LOGDIR/misc/lspci.out|grep "Ethernet controller:" >> $DBH
  1446.    grep NetXen $LOGDIR/misc/lspci.out|grep "Ethernet controller:" >> $DBH
  1447.    # QLA8042 uses Intel NIC - report only if FC installed
  1448.    if [ $FCINSTALLED -eq 1 ]
  1449.    then
  1450.       grep "Intel Corporation 82598" $LOGDIR/misc/lspci.out|grep "Ethernet controller:" >> $DBH
  1451.    fi
  1452. #else
  1453. #   /bin/echo "No Converged Network Adapters Installed" >> $DBH
  1454. fi
  1455. if [ $IBINSTALLED -eq 1 ]
  1456. then
  1457.    grep QLogic $LOGDIR/misc/lspci.out|grep "InfiniBand:" >> $DBH
  1458.    grep Mellanox $LOGDIR/misc/lspci.out|egrep "InfiniBand:|Network controller:" >> $DBH
  1459. else
  1460.    /bin/echo "No Infiniband Adapters Installed" >> $DBH
  1461. fi
  1462. /bin/echo >> $DBH
  1463.  
  1464. #
  1465. # Management Tools Information
  1466. #
  1467. cat >> $DBH <<!
  1468. <hr><a id="mgmtinfo"></a><b><a href="details.html#Mgmt_tools">Management Tools Information:</a></b>     <a href="#top">top</a><hr> 
  1469. !
  1470. cat >> $DBH <<!
  1471. <B>FC Adapter Tools:</B>
  1472. !
  1473. if [ $FCINSTALLED -eq 1 ]
  1474. then
  1475.    cat $LOGDIR/Mgmt_tools/sansurfer_fc_installed.txt >> $DBH
  1476.    /bin/echo >> $DBH
  1477.    cat $LOGDIR/Mgmt_tools/api_installed.txt >> $DBH
  1478.    /bin/echo >> $DBH
  1479.    cat $LOGDIR/Mgmt_tools/scli_installed.txt >> $DBH
  1480. else
  1481.    /bin/echo "No FC Adapters installed" >> $DBH
  1482. fi
  1483.    /bin/echo >> $DBH
  1484.  
  1485. cat >> $DBH <<!
  1486. <B>iSCSI Adapter Tools:</B>
  1487. !
  1488. if [ $ISCSIINSTALLED -eq 1 ]
  1489. then
  1490.    cat $LOGDIR/Mgmt_tools/sansurfer_iscsi_installed.txt | sed "s///" >> $DBH
  1491.    /bin/echo >> $DBH
  1492.    cat $LOGDIR/Mgmt_tools/iscli_installed.txt >> $DBH
  1493. else
  1494.    /bin/echo "No iSCSI Adapters installed" >> $DBH
  1495. fi
  1496. /bin/echo >> $DBH
  1497.  
  1498. # Netxen and FCoE CNA Network Tools Version Information
  1499. cat >> $DBH <<!
  1500. <B>CNA Networking Tools:</B>
  1501. !
  1502. if [ $ETHERINSTALLED -eq 1 ]
  1503. then
  1504.    cat $LOGDIR/Mgmt_tools/netscli_installed.txt >> $DBH
  1505. else
  1506.    /bin/echo "No Converged Network Adapters installed" >> $DBH
  1507. fi
  1508. /bin/echo >> $DBH
  1509.  
  1510. # Infiniband Tools Version Information
  1511. cat >> $DBH <<!
  1512. <B>Infiniband Adapter Tools:</B>
  1513. !
  1514. if [ $IBINSTALLED -eq 1 ]
  1515. IBTOOLS=0
  1516. then
  1517.    if [ -f /etc/sysconfig/iba/version_ofed ]
  1518.    then
  1519.       /bin/echo -n "OFED Version:                 " >> $DBH
  1520.       cat /etc/sysconfig/iba/version_ofed >> $DBH
  1521.       IBTOOLS=1
  1522.    fi
  1523.    if [ -f /etc/sysconfig/iba/version_wrapper ]
  1524.    then
  1525.       /bin/echo -n "Intel OFED+ Version:          " >> $DBH
  1526.       cat /etc/sysconfig/iba/version_wrapper >> $DBH
  1527.       IBTOOLS=1
  1528.    fi
  1529.    if [ -f /etc/sysconfig/iba/version_ff ]
  1530.    then
  1531.       /bin/echo -n "Intel FastFabric Version:     " >> $DBH
  1532.       cat /etc/sysconfig/iba/version_ff >> $DBH
  1533.       IBTOOLS=1
  1534.    fi
  1535.    if [ -f /etc/sysconfig/iba/version_fmtools ]
  1536.    then
  1537.       /bin/echo -n "Intel Fabric Manager Version: " >> $DBH
  1538.       cat /etc/sysconfig/iba/version_fmtools >> $DBH
  1539.       IBTOOLS=1
  1540.    fi
  1541.    if [ $FVINSTALLED -eq 1 ]
  1542.    then
  1543.       /bin/echo -n "Intel Fabric Viewer Version:  " >> $DBH
  1544.       cat $LOGDIR/Mgmt_tools/fv_version.txt >> $DBH
  1545.       IBTOOLS=1
  1546.    fi
  1547.    if [ $IBTOOLS -eq 0 ]
  1548.    then
  1549.       /bin/echo "No Intel Infiniband Tools installed" >> $DBH
  1550.    fi
  1551. else
  1552.    /bin/echo "No Infiniband Adapters installed" >> $DBH
  1553. fi
  1554. /bin/echo >> $DBH
  1555.  
  1556. #
  1557. # Fibre Channel Adapter Information
  1558. #
  1559. cat >> $DBH <<!
  1560. <hr><a id="fcinfo"></a><b><a href="details.html#procinfo">Fibre Channel Adapter Information:</a></b>     <a href="#top">top</a><hr> 
  1561. !
  1562. if [ $FCINSTALLED -eq 1 ]
  1563. then
  1564.    DRV_MOD_VER=`/sbin/modinfo qla2xxx | grep "^version" | cut -d " " -f 9`
  1565.    TESTDIR=`ls $LOGDIR/proc/scsi/ 2>> $LOGDIR/script/misc_err.log |grep qla2`
  1566.    if [ -n "$TESTDIR" ]
  1567.    then
  1568.       PROCDIR=`ls $LOGDIR/proc/scsi/qla2*/[0-9]* 2>> $LOGDIR/script/misc_err.log`
  1569.       for FILE in $PROCDIR
  1570.       do
  1571.          grep Adapter $FILE|grep -v flag >> $DBH
  1572.          DRV_RUN_VER=`grep Driver $FILE | cut -d "," -f2 | sed "s/ //" | cut -d " " -f3`
  1573.          /bin/echo -n "Driver version $DRV_RUN_VER" >> $DBH
  1574.          if [ $DRV_MOD_VER = $DRV_RUN_VER -o ${DRV_MOD_VER}-fo = $DRV_RUN_VER ]
  1575.          then
  1576.             /bin/echo >> $DBH
  1577.          else
  1578.             /bin/echo "  <SPAN style='color:red'>Running driver version does not match installed driver version ($DRV_MOD_VER).  Update RAMDISK image.</SPAN>" >> $DBH
  1579.          fi
  1580. #         grep Driver $FILE | cut -d "," -f2 | sed "s/ //" >> $DBH
  1581.          grep Firmware $FILE | cut -d "," -f1 | sed "s/        //" >> $DBH
  1582.          grep Serial $FILE | cut -d "," -f2 | sed "s/ //" >> $DBH
  1583.          grep target $FILE|grep scsi >> $DBH
  1584.          /bin/echo >> $DBH
  1585.       done
  1586.    else
  1587.       TESTMOD=`grep "^qla2" $LOGDIR/modules/lsmod.out`
  1588.       if [ -n "$TESTMOD" ]
  1589.       then
  1590.          /bin/echo "No /proc information available for FC Driver" >> $DBH
  1591.          /bin/echo >> $DBH
  1592.          TESTDIR=`ls $LOGDIR/sys/class/scsi_host/ | grep host`
  1593.          if [ -n "$TESTDIR" ]
  1594.          then
  1595.             SYSDIR=`ls $LOGDIR/sys/class/scsi_host`
  1596.             for FILE in $SYSDIR
  1597.             do
  1598.                if [ -f $LOGDIR/sys/class/scsi_host/$FILE/driver_version ]
  1599.                then
  1600.                   ADAPTER=`cat $LOGDIR/sys/class/scsi_host/$FILE/model_name`
  1601.                   /bin/echo "Adapter Model: $ADAPTER" >> $DBH
  1602.                   DRV_RUN_VER=`cat $LOGDIR/sys/class/scsi_host/$FILE/driver_version`
  1603.                   /bin/echo -n "Driver Version: $DRV_RUN_VER" >> $DBH
  1604.                   if [ $DRV_MOD_VER = $DRV_RUN_VER -o ${DRV_MOD_VER}-fo = $DRV_RUN_VER ]
  1605.                   then
  1606.                      /bin/echo >> $DBH
  1607.                   else
  1608.                      /bin/echo "  <SPAN style='color:red'>Running driver version does not match installed driver version ($DRV_MOD_VER).  Update RAMDISK image.</SPAN>" >> $DBH
  1609.                   fi
  1610.                   FIRMWARE=`cat $LOGDIR/sys/class/scsi_host/$FILE/fw_version`
  1611.                   /bin/echo "Firmware Version: $FIRMWARE" >> $DBH
  1612.                   FLASHBIOS="$LOGDIR/sys/class/scsi_host/$FILE/optrom_bios_version"
  1613.                   if [ -f $FLASHBIOS ]; then /bin/echo "Flash BIOS Version: `cat $FLASHBIOS`" >> $DBH ; fi
  1614.                   FLASHEFI="$LOGDIR/sys/class/scsi_host/$FILE/optrom_efi_version"
  1615.                   if [ -f $FLASHEFI ]; then /bin/echo "Flash EFI Version: `cat $FLASHEFI`" >> $DBH ; fi
  1616.                   FLASHFCODE="$LOGDIR/sys/class/scsi_host/$FILE/optrom_fcode_version"
  1617.                   if [ -f $FLASHFCODE ]; then /bin/echo "Flash Fcode Version: `cat $FLASHFCODE`" >> $DBH ; fi
  1618.                   FLASHFW="$LOGDIR/sys/class/scsi_host/$FILE/optrom_fw_version"
  1619.                   if [ -f $FLASHFW ]; then /bin/echo "Flash Firmware Version: `cat $FLASHFW`" >> $DBH ; fi
  1620.                   MPIVER="$LOGDIR/sys/class/scsi_host/$FILE/mpi_version"
  1621.                   if [ -f $MPIVER ]; then /bin/echo "MPI Version: `cat $MPIVER`" >> $DBH ; fi
  1622.                   LINKSTATE="$LOGDIR/sys/class/scsi_host/$FILE/link_state"       # SLES uses different file than RHEL
  1623.                   if [ -f $LINKSTATE ]; then /bin/echo "Link State: `cat $LINKSTATE`" >> $DBH
  1624.                   else
  1625.                      LINKSTATE="$LOGDIR/sys/class/scsi_host/$FILE/state"
  1626.                      if [ -f $LINKSTATE ]; then /bin/echo "Link State: `cat $LINKSTATE`" >> $DBH ; fi
  1627.                   fi
  1628.                   NPIVVP="$LOGDIR/sys/class/scsi_host/$FILE/npiv_vports_inuse"
  1629.                   if [ -f $NPIVVP ]; then /bin/echo "NPIV VPorts: `cat $NPIVVP`" >> $DBH ; fi
  1630.                   VLANID="$LOGDIR/sys/class/scsi_host/$FILE/vlan_id"
  1631.                   if [ -f $VLANID ]; then /bin/echo "VLAN ID: `cat $VLANID`" >> $DBH ; fi
  1632.                   VNPORTMAC="$LOGDIR/sys/class/scsi_host/$FILE/vn_port_mac_address"
  1633.                   if [ -f $VNPORTMAC ]; then /bin/echo "VN Port MAC Address: `cat $VNPORTMAC`" >> $DBH ; fi
  1634.                   SERIAL=`cat $LOGDIR/sys/class/scsi_host/$FILE/serial_num`
  1635.                   /bin/echo "Serial #: $SERIAL" >> $DBH
  1636.                   /bin/echo >> $DBH
  1637.                fi
  1638.             done
  1639.          else
  1640.             /bin/echo "No /sys information available for FC Driver" >> $DBH
  1641.          fi
  1642.       else
  1643.          /bin/echo "Hardware present, but no FC drivers loaded" >> $DBH
  1644.          /bin/echo >> $DBH
  1645.       fi
  1646.    fi
  1647. else
  1648.    /bin/echo "No Fibre Channel Adapters detected in system" >> $DBH
  1649.    /bin/echo >> $DBH
  1650. fi
  1651.  
  1652. #
  1653. # iSCSI Adapter Information
  1654. #
  1655. cat >> $DBH <<!
  1656. <hr><a id="iscsiinfo"></a><b><a href="details.html#procinfo">iSCSI Adapter Information:</a></b>     <a href="#top">top</a><hr> 
  1657. !
  1658. if [ $ISCSIINSTALLED -eq 1 ]
  1659. then
  1660.    TESTDIR=`ls $LOGDIR/proc/scsi/ 2>> $LOGDIR/script/misc_err.log |grep qla4`
  1661.    if [ -n "$TESTDIR" ]
  1662.    then
  1663.       PROCDIR=`ls $LOGDIR/proc/scsi/qla4*/[0-9]* 2>> $LOGDIR/script/misc_err.log`
  1664.       for FILE in $PROCDIR
  1665.       do
  1666.          grep Adapter $FILE|grep -v flag >> $DBH
  1667.          grep Driver $FILE >> $DBH
  1668.          grep Firmware $FILE >> $DBH
  1669.          grep Serial $FILE >> $DBH
  1670.          grep target $FILE|grep scsi >> $DBH
  1671.          /bin/echo >> $DBH
  1672.       done
  1673.    else
  1674.       TESTMOD=`grep "^qla4" $LOGDIR/modules/lsmod.out`
  1675.       if [ -n "$TESTMOD" ]
  1676.       then
  1677.          /bin/echo "No /proc information available for iSCSI Driver" >> $DBH
  1678.          #Very slim pickings for qla4xxx information from /sys
  1679.          DRIVER="$LOGDIR/sys/module/qla4xxx/version"
  1680.          if [ -f $DRIVER ]
  1681.          then
  1682.             /bin/echo >> $DBH
  1683.             /bin/echo "iSCSI Driver Version: `cat $DRIVER`" >> $DBH
  1684.             /bin/echo "No additional /sys information available for iSCSI Driver" >> $DBH
  1685.             /bin/echo >> $DBH
  1686.          else
  1687.             /bin/echo "No /sys  information available for iSCSI Driver" >> $DBH
  1688.             /bin/echo >> $DBH
  1689.          fi
  1690.       else
  1691.          /bin/echo "Hardware present, but no iSCSI drivers loaded" >> $DBH
  1692.          /bin/echo >> $DBH
  1693.       fi
  1694.    fi
  1695. else
  1696.    /bin/echo "No iSCSI Adapters detected in system" >> $DBH
  1697.    /bin/echo >> $DBH
  1698. fi
  1699.  
  1700. #
  1701. # Ethernet Adapter Information
  1702. #
  1703. cat >> $DBH <<!
  1704. <hr><a id="etherinfo"></a><b><a href="details.html#procinfo">Ethernet Adapter Information:</a></b>     <a href="#top">top</a><hr> 
  1705. !
  1706. if [ $ETHERINSTALLED -eq 1 -o $IBINSTALLED -eq 1 ]
  1707. then
  1708.    QLETHERDRIVER=0
  1709.    ETHDEVS=`grep "Link encap" $LOGDIR/network/ifconfig.out | cut -d " " -f1`
  1710.    for file in $ETHDEVS
  1711.    do
  1712.       if [ -f $LOGDIR/network/ethtool-i.$file ]
  1713.       then
  1714.          QLETHERDRIVER=1    
  1715.          /bin/echo "Interface:        $file" >> $DBH
  1716.          /bin/echo -n "Driver Module:    " >> $DBH
  1717.          grep driver $LOGDIR/network/ethtool-i.$file | cut -d " " -f2 >> $DBH
  1718.          /bin/echo -n "Driver Version:   " >> $DBH
  1719.          grep "^version" $LOGDIR/network/ethtool-i.$file | cut -d " " -f2 >> $DBH
  1720.          /bin/echo -n "Firmware Version: " >> $DBH
  1721.          grep firmware $LOGDIR/network/ethtool-i.$file | cut -d " " -f2 >> $DBH
  1722.          /bin/echo -n "Link Detected:    " >> $DBH
  1723.          LINKSTATE=`grep Link $LOGDIR/network/ethtool.$file | cut -d " " -f3`
  1724.          if [ -n "$LINKSTATE" ]; then /bin/echo $LINKSTATE >> $DBH ; else /bin/echo >>$DBH ; fi
  1725.          /bin/echo -n "Interface State:  " >> $DBH
  1726.          grep UP $LOGDIR/network/ifconfig.$file > /dev/null
  1727.          if [ $? -eq 0 ]; then /bin/echo UP >> $DBH
  1728.          else /bin/echo DOWN >> $DBH
  1729.          fi
  1730.          /bin/echo -n "HW Address:       " >> $DBH
  1731.          grep HWaddr $LOGDIR/network/ifconfig.$file | cut -d "W" -f2|cut -d " " -f2 >> $DBH
  1732.          /bin/echo -n "Inet Address:     " >> $DBH
  1733.          INETADDR=`grep "inet addr" $LOGDIR/network/ifconfig.$file | cut -d " " -f12-16`
  1734.          if [ -n "$INETADDR" ]; then /bin/echo $INETADDR >> $DBH ; else /bin/echo "Undefined" >> $DBH; fi
  1735.          /bin/echo -n "Inet6 Address:    " >> $DBH
  1736.          INET6ADDR=`grep "inet6 addr" $LOGDIR/network/ifconfig.$file | cut -d " " -f12-14`
  1737.          if [ -n "$INET6ADDR" ]; then /bin/echo $INET6ADDR >> $DBH ; else /bin/echo "Undefined" >> $DBH ; fi
  1738.          /bin/echo >> $DBH
  1739.       fi
  1740.    done
  1741.    if [ $QLETHERDRIVER -eq 0 ]
  1742.    then
  1743.       /bin/echo "No IPoIB or Converged Network driver information available" >> $DBH
  1744.    fi
  1745. else
  1746.    /bin/echo "No IPoIB or Converged Network Adapter configuration detected in system" >> $DBH
  1747. fi
  1748.  
  1749. /bin/echo >> $DBH
  1750.  
  1751. #
  1752. # Infiniband Adapter and Fabric Information
  1753. #
  1754. cat >> $DBH <<!
  1755. <hr><a id="ibinfo"></a><b><a href="details.html#ibinfo">Infiniband Adapter and Fabric Information:</a></b>     <a href="#top">top</a><hr> 
  1756. !
  1757. if [ $IBINSTALLED -eq 1 ]
  1758. then
  1759.    cd $LOGDIR/infiniband
  1760.    if [ -f ipath_control.out ]
  1761.    then
  1762.       cat ipath_control.out >> $DBH
  1763.    fi
  1764.    if [ -f ibv_devinfo.out ]
  1765.    then
  1766.       cat ibv_devinfo.out >> $DBH
  1767.    elif [ -f ibstat.out ]
  1768.    then
  1769.       cat ibstat.out >> $DBH
  1770.    else
  1771.       /bin/echo "No Infiniband port information available" >> $DBH
  1772.    fi
  1773.    /bin/echo >> $DBH
  1774.  
  1775.    if [ -f fabric_info.out ]
  1776.    then
  1777.       cat fabric_info.out >> $DBH
  1778.    elif [ -f sminfo.out -a -f ibnodes.out -a -f saquery_links.out -a -f iblinkinfo.out ]
  1779.    then
  1780.       /bin/echo "Fabric Information:" >> $DBH
  1781.       SMINFO=`grep guid sminfo.out 2>> $LOGDIR/script/misc_err.log`
  1782.       if [ $? -eq 0 ]
  1783.       then
  1784.          /bin/echo $SMINFO >> $DBH
  1785.          grep EndPortLid sminfo.out >> $DBH
  1786.       else
  1787.          /bin/echo "SM: No SM information available" >> $DBH
  1788.       fi
  1789.       /bin/echo "Number of CAs:" `grep Adapter saquery.out |wc -l` >> $DBH
  1790.       /bin/echo "Number of Switch Chips:" `grep Switch saquery.out |wc -l` >> $DBH
  1791.       /bin/echo "Number of Links:" $(($(grep LinkRecord saquery_links.out |wc -l) / 2)) >> $DBH
  1792.       /bin/echo "Number of 1x Ports:" `grep 1X iblinkinfo.out | wc -l` >> $DBH
  1793.    else
  1794.       /bin/echo "Insufficient data to report fabric information" >> $DBH
  1795.    fi
  1796.    cd $LOGDIR
  1797. else
  1798.    /bin/echo "No Infiniband Adapters detected in system" >> $DBH
  1799. fi
  1800. /bin/echo >> $DBH
  1801.  
  1802. #
  1803. # Fibre Channel Message Logs
  1804. #
  1805. cat >> $DBH <<!
  1806. <hr><a id="fclogs"></a><b><a href="details.html#loginfo">Fibre Channel Message Logs:</a></b>     <a href="#top">top</a><hr> 
  1807. !
  1808. if [ -f $LOGDIR/logs/vmkernel ]
  1809. then
  1810.    grep qla2 $LOGDIR/logs/vmkernel* |tail -50 >> $DBH
  1811. fi
  1812. grep qla2 /var/log/messages |tail -50 >> $DBH
  1813. /bin/echo >> $DBH
  1814.  
  1815. #
  1816. # iSCSI Message Logs
  1817. #
  1818. cat >> $DBH <<!
  1819. <hr><a id="iscsilogs"></a><b><a href="details.html#loginfo">iSCSI Message Logs:</a></b>     <a href="#top">top</a><hr> 
  1820. !
  1821. if [ -f $LOGDIR/logs/vmkernel ]
  1822. then
  1823.    grep qla4 $LOGDIR/logs/vmkernel* |tail -50 >> $DBH
  1824. fi
  1825. grep qla4 /var/log/messages |tail -50 >> $DBH
  1826. /bin/echo >> $DBH
  1827.  
  1828. #
  1829. # Ethernet Message Logs
  1830. #
  1831. cat >> $DBH <<!
  1832. <hr><a id="etherlogs"></a><b><a href="details.html#loginfo">Ethernet Message Logs:</a></b>     <a href="#top">top</a><hr> 
  1833. !
  1834. if [ -f $LOGDIR/logs/vmkernel ]
  1835. then
  1836.    egrep "netxen_nic|nx_nic|qla3|qla2xip|qlge|qlcnic|ixgbe" $LOGDIR/logs/vmkernel* |tail -50 >> $DBH
  1837. fi
  1838. egrep "netxen_nic|nx_nic|qla3|qla2xip|qlge|qlcnic|ixgbe" /var/log/messages |tail -50 >> $DBH
  1839. /bin/echo >> $DBH
  1840.  
  1841. #
  1842. # Infiniband Message Logs
  1843. #
  1844. cat >> $DBH <<!
  1845. <hr><a id="iblogs"></a><b><a href="details.html#loginfo">Infiniband Message Logs:</a></b>     <a href="#top">top</a><hr> 
  1846. !
  1847. egrep "infinipath|ipath_|_ipath|ib_qib|ib_mthca|mlx" /var/log/messages |tail -50 >> $DBH
  1848. /bin/echo >> $DBH
  1849.  
  1850. #
  1851. # Wrap it up
  1852. #
  1853. # Temporary cleanup of $LOGDIR/sys to avoid extraction errors
  1854. cd $LOGDIR
  1855. if test -d ./sys
  1856. then
  1857.    tar czf $LOGDIR/OS/sys_files.tgz ./sys
  1858.    rm -rf $LOGDIR/sys
  1859. fi
  1860. # Now back to our regularly scheduled program
  1861.  
  1862. cat >> $DBH <<!
  1863. <hr><a id="bottom"></a> <a href="#top">top</a><hr> 
  1864. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> 
  1865. </pre> 
  1866. </font> 
  1867. </body>
  1868. !
  1869.  
  1870. #####################################################################
  1871. # Place holder below for details.sh
  1872. #####################################################################
  1873. # Start of details.sh
  1874. #####################################################################
  1875. # Post-process script output into pdeudo-meaningful html
  1876. #####################################################################
  1877.  
  1878. cd $LOGDIR
  1879.  
  1880. #####################################################################
  1881. # Create details.html for the script output
  1882. #####################################################################
  1883. DTL=$LOGDIR/details.html
  1884. #
  1885. # Header
  1886. #
  1887. cat > $DTL <<!
  1888. <head><title>Intel Infiniband Information Gathering Script - Details</title></head> 
  1889. <body> 
  1890. <font face="Courier New"> 
  1891.  <a id="top"></a> 
  1892. <div align="center"> 
  1893. <b>Intel Infiniband Information Gathering Script Details</b><br> 
  1894. !
  1895. /bin/echo `date` >> $DTL
  1896. /bin/echo "<hr><hr></div>" >> $DTL
  1897.  
  1898. #
  1899. # Index
  1900. #
  1901. cat >> $DTL <<!
  1902. <pre>
  1903. <b>Index:</b><hr>
  1904. <a href="#about">About</a>
  1905. <a href="#osfiles">OS Information Files</a>
  1906. <a href="#etcfiles">/etc Information</a>
  1907. <a href="#modules">Module Information</a>
  1908. <a href="#procinfo">/proc Information</a>
  1909. <a href="#etherinfo">Ethernet Information</a>
  1910. <a href="#Mgmt_tools">Management Tools Information</a>
  1911. <a href="#ibinfo">Infiniband Information</a>
  1912. <a href="#loginfo">System Log Information</a>
  1913. <a href="#miscinfo">Miscellaneous Information</a><br>
  1914. !
  1915.  
  1916. #
  1917. # About
  1918. #
  1919. cat >> $DTL <<!
  1920. <hr><a id="about"></a><b><a href="details.html">About:</a></b>     <a href="#top">top</a><hr>
  1921. This details file will walk through the information gathered by the information gathering script.
  1922.  
  1923. <a href="dashboard.html">dashboard.html</a>
  1924. This file is the starting place for all your basic troubleshooting needs.  It displays an overview
  1925. of the server, reports Adapter driver / firmware versions, and identifies installed management applications.
  1926.  
  1927. <a href="details.html">details.html</a>
  1928. This file.
  1929.  
  1930. <a href="script/revisionhistory.txt">revisionhistory.txt</a>
  1931. This file contains the revision history for the Linux Information Gathering script.
  1932.  
  1933. !
  1934.  
  1935. #
  1936. # OS Information Files
  1937. #
  1938. cat >> $DTL <<!
  1939. <hr><a id="osfiles"></a><b><a href="details.html">OS Information Files:</a></b>     <a href="#top">top</a><hr>
  1940. !
  1941. OS_FILES=`ls OS/*release OS/*version OS/uname 2>> $LOGDIR/script/misc_err.log`
  1942. for FILE in $OS_FILES
  1943. do
  1944.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  1945. done
  1946. /bin/echo >> $DTL
  1947. /bin/echo "The files listed above include the OS release version and the running kernel version (uname)." >> $DTL
  1948. /bin/echo >> $DTL
  1949. OS_FILES=`ls OS/rpm*  2>> $LOGDIR/script/misc_err.log`
  1950. for FILE in $OS_FILES
  1951. do
  1952.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  1953. done
  1954. /bin/echo >> $DTL
  1955. /bin/echo "The file(s) above include the installed RPMs." >> $DTL
  1956. /bin/echo >> $DTL
  1957. OS_FILES=`ls OS/ls_* OS/sys_files.tgz  2>> $LOGDIR/script/misc_err.log`
  1958. for FILE in $OS_FILES
  1959. do
  1960.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  1961. done
  1962. /bin/echo >> $DTL
  1963. /bin/echo "The files above include the output of ls -alRF for /sys and /var/crash as well as a tar/zip" >> $DTL
  1964. /bin/echo "of the collected files from /sys." >> $DTL
  1965. /bin/echo >> $DTL
  1966.  
  1967. #
  1968. # Boot files
  1969. #
  1970. BOOTFILES=`ls boot`
  1971. for FILE in $BOOTFILES
  1972. do
  1973.    /bin/echo -n "<a href=\"boot/$FILE\">boot/$FILE</a>    " >> $DTL
  1974. done
  1975. /bin/echo >> $DTL
  1976. /bin/echo "The above files include boot configuration files and a list of files in the /boot directory." >> $DTL
  1977. /bin/echo >> $DTL
  1978.  
  1979. #
  1980. # /etc Information
  1981. #
  1982. cat >> $DTL <<!
  1983. <hr><a id="etcfiles"></a><b><a href="details.html">/etc Information:</a></b>     <a href="#top">top</a><hr>
  1984. !
  1985. ETC_FILES="etc/modprobe.conf etc/modprobe.conf.local etc/modprobe.conf.dist etc/modules.conf etc/modules.conf.local etc/sysconfig/kernel"
  1986. for FILE in $ETC_FILES
  1987. do
  1988.    if [ -f $FILE ]
  1989.    then
  1990.       /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  1991.    fi
  1992. done
  1993. /bin/echo >> $DTL
  1994. /bin/echo "The files above are used to determine the order modules are loaded, specify optional module parameters," >> $DTL
  1995. /bin/echo "and determine which modules are included in the ramdisk image during bootup (SLES uses /etc/sysconfig/kernel)." >> $DTL
  1996. /bin/echo >> $DTL
  1997.  
  1998. ETC_FILES="etc/qla2xxx.conf etc/qla2300.conf etc/qla2200.conf etc/hba.conf"
  1999. ATLEASTONEFILE=0
  2000. for FILE in $ETC_FILES
  2001. do
  2002.    if [ -f $FILE ]
  2003.    then
  2004.       ATLEASTONEFILE=1
  2005.       /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2006.    fi
  2007. done
  2008. if [ $ATLEASTONEFILE -eq 1 ]
  2009. then
  2010.    /bin/echo >> $DTL
  2011.    /bin/echo "The file qla*.conf, if present, is used to store an ascii representation of persistent binding and" >> $DTL
  2012.    /bin/echo "LUN masking as defined by SANsurfer or scli.  The file hba.conf, if present, points to the proper " >> $DTL
  2013.    /bin/echo "dynamic loadable library for the SNIA API (HBAAPI)." >> $DTL
  2014.    /bin/echo >> $DTL
  2015. fi
  2016.  
  2017. ETC_FILES="etc/fstab etc/mtab"
  2018. for FILE in $ETC_FILES
  2019. do
  2020.    if [ -f $FILE ]
  2021.    then
  2022.       /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2023.    fi
  2024. done
  2025. /bin/echo >> $DTL
  2026. /bin/echo "The files above identify static and dynamic filesystem mount information." >> $DTL
  2027. /bin/echo >> $DTL
  2028.  
  2029. /bin/echo -n "<a href=\"etc/ls_etcrcd.out\">etc/ls_etcrcd.out</a>    " >> $DTL
  2030. /bin/echo >> $DTL
  2031. /bin/echo "Directory listing of all startup files executed at various runlevels at boot/shutdown" >> $DTL
  2032. /bin/echo >> $DTL
  2033.  
  2034. if [ -f etc/sysctl.conf ]
  2035. then
  2036.    /bin/echo -n "<a href=\"etc/sysctl.conf\">etc/sysctl.conf</a>    " >> $DTL
  2037.    /bin/echo >> $DTL
  2038.    /bin/echo "Kernel tuning configuration file." >> $DTL
  2039.    /bin/echo >> $DTL
  2040. fi
  2041.  
  2042. if [ -f etc/sysconfig/hwconf ]
  2043. then
  2044.    /bin/echo -n "<a href=\"etc/sysconfig/hwconf\">etc/sysconfig/hwconf</a>    " >> $DTL
  2045.    /bin/echo >> $DTL
  2046.    /bin/echo "List of installed hardware including PCI bus, vendor and driver module information." >> $DTL
  2047.    /bin/echo >> $DTL
  2048. fi
  2049. # DG: Major rework needed to list and describe files that are IB-specific
  2050. if [ $IBINSTALLED -eq 1 -a $IBAINSTALLED -eq 0 ]
  2051. then
  2052.    /bin/echo "Files listed below are additional files gathered for Infiniband troubleshooting." >> $DTL
  2053.    /bin/echo >> $DTL
  2054. fi
  2055.  
  2056. #
  2057. # Module Information
  2058. #
  2059. cat >> $DTL <<!
  2060. <hr><a id="modules"></a><b><a href="details.html">Module Information:</a></b>     <a href="#top">top</a><hr>
  2061. !
  2062. MODFILES="modules/ls_libmodules.out modules/lsmod.out modules/modinfo.out modules/qisioctl.out modules/qioctlmod.out"
  2063. for FILE in $MODFILES
  2064. do
  2065.    if test -f $FILE
  2066.    then
  2067.       /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2068.    fi
  2069. done
  2070. /bin/echo >> $DTL
  2071. /bin/echo "The file ls_libmodules.out is a list of all modules for the current running kernel.  The file " >> $DTL
  2072. /bin/echo "lsmod.out is a list of all currently loaded modules.  The file modinfo.out is a list of modinfo" >> $DTL
  2073. /bin/echo "output of all FC, iSCSI, CNA and Infiniband modules in the current running kernel." >> $DTL
  2074. /bin/echo >> $DTL
  2075.  
  2076. #
  2077. # /proc Information
  2078. #
  2079. cat >> $DTL <<!
  2080. <hr><a id="procinfo"></a><b><a href="details.html">/proc Information:</a></b>     <a href="#top">top</a><hr>
  2081. !
  2082. PROCFILES=`ls proc`
  2083. for FILE in $PROCFILES
  2084. do
  2085.    if test -f proc/$FILE
  2086.    then
  2087.       /bin/echo -n "<a href=\"proc/$FILE\">proc/$FILE</a>    " >> $DTL
  2088.    fi
  2089. done
  2090. /bin/echo >> $DTL
  2091. /bin/echo "These files include CPU information, running modules, and (optionally) pci information as     " >> $DTL
  2092. /bin/echo "reported in the /proc filesystem.                                                             " >> $DTL
  2093. /bin/echo >> $DTL
  2094.  
  2095. if test -d proc/scsi
  2096. then
  2097.    if test -f proc/scsi/scsi
  2098.    then
  2099.       /bin/echo "<a href=\"proc/scsi/scsi\">proc/scsi/scsi</a>    " >> $DTL
  2100.       /bin/echo "This is a list of all devices scanned by the SCSI module as reported in the /proc filesystem. " >> $DTL
  2101.       /bin/echo >> $DTL
  2102.    fi
  2103.    TESTDIR=`ls proc/scsi/|grep qla2`
  2104.    if test -n "$TESTDIR"
  2105.    then
  2106.       for DIR in $TESTDIR
  2107.       do
  2108.          QLAFILE=`ls proc/scsi/$DIR/[0-9]*`
  2109.          for FILE in $QLAFILE
  2110.          do
  2111.             /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2112.          done
  2113.          /bin/echo >> $DTL
  2114.       done
  2115.       /bin/echo "FC driver instance files." >>$DTL
  2116.       /bin/echo >> $DTL
  2117.    else
  2118.       /bin/echo "No FC driver info found in /proc filesystem." >> $DTL
  2119.       /bin/echo >> $DTL
  2120.    fi
  2121.    TESTDIR=`ls proc/scsi/|grep qla4`
  2122.    if test -n "$TESTDIR"
  2123.    then
  2124.       for DIR in $TESTDIR
  2125.       do
  2126.          QLAFILE=`ls proc/scsi/$DIR/[0-9]*`
  2127.          for FILE in $QLAFILE
  2128.          do
  2129.             /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2130.          done
  2131.          /bin/echo >> $DTL
  2132.       done
  2133.       /bin/echo "iSCSI driver instance files." >>$DTL
  2134.       /bin/echo >> $DTL
  2135.    else
  2136.       /bin/echo "No iSCSI driver info found in /proc filesystem." >> $DTL
  2137.       /bin/echo >> $DTL
  2138.    fi
  2139. else
  2140.    /bin/echo "No SCSI info found in /proc filesystem." >> $DTL
  2141.    /bin/echo >> $DTL
  2142. fi
  2143.  
  2144. #
  2145. # Ethernet Information
  2146. #
  2147. cat >> $DTL <<!
  2148. <hr><a id="etherinfo"></a><b><a href="details.html">Ethernet Information:</a></b>     <a href="#top">top</a><hr>
  2149. !
  2150. /bin/echo -n "<a href=\"network/ifconfig.out\">network/ifconfig.out</a>  " >> $DTL
  2151. /bin/echo -n "<a href=\"network/netstat.out\">network/netstat.out</a>  " >> $DTL
  2152. /bin/echo "<a href=\"network/iptables.out\">network/iptables.out</a>" >> $DTL
  2153. /bin/echo "These files include network interface configurations and interface routing information." >> $DTL
  2154. /bin/echo >> $DTL
  2155. if test $ETHERINSTALLED -eq 1
  2156. then
  2157.    QLETHERDRIVER=0
  2158.    ETHDEVS=`grep "Link encap" $LOGDIR/network/ifconfig.out | cut -d " " -f1`
  2159.    for file in $ETHDEVS
  2160.    do
  2161.       if test -f $LOGDIR/network/ethtool-i.$file
  2162.       then
  2163.          QLETHERDRIVER=1    
  2164.          /bin/echo -n "<a href=\"network/ifconfig.$file\">network/ifconfig.$file</a>  " >> $DTL
  2165.          /bin/echo -n "<a href=\"network/ethtool-i.$file\">network/ethtool-i.$file</a>  " >> $DTL
  2166.          /bin/echo -n "<a href=\"network/ethtool-k.$file\">network/ethtool-k.$file</a>  " >> $DTL
  2167.          /bin/echo "<a href=\"network/ethtool.$file\">network/ethtool.$file</a>" >> $DTL
  2168.       fi
  2169.    done
  2170.    if test $QLETHERDRIVER -eq 1
  2171.    then
  2172.       /bin/echo "These files include details about specific FC/iSCSI/CNA and IPoIB network interfaces." >> $DTL
  2173.    else
  2174.       /bin/echo "No FC/iSCSI/CNA/IPoIB ethernet driver information available" >> $DTL
  2175.    fi
  2176. else
  2177.    /bin/echo "No IPoIB or Converged Network Adapters detected in system" >> $DTL
  2178. fi 
  2179. /bin/echo >> $DTL
  2180.  
  2181. #
  2182. # Management Tools Info
  2183. #
  2184. cat >> $DTL <<!
  2185. <hr><a id="Mgmt_tools"></a><b><a href="details.html">Management Tools Information:</a></b>     <a href="#top">top</a><hr>
  2186. !
  2187. SMSINSTALL=`ls Mgmt_tools/sansurfer*`
  2188. for FILE in $SMSINSTALL
  2189. do
  2190.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2191. done
  2192. /bin/echo >> $DTL
  2193. /bin/echo "Management GUI installation status and version information" >> $DTL
  2194. /bin/echo >> $DTL
  2195.  
  2196. SMSINSTALL=`ls Mgmt_tools/*scli_install*`
  2197. for FILE in $SMSINSTALL
  2198. do
  2199.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2200. done
  2201. /bin/echo >> $DTL
  2202. /bin/echo "Management CLI installation status and version information" >> $DTL
  2203. /bin/echo >> $DTL
  2204.  
  2205. SMSLISTS=`ls Mgmt_tools/ls_*`
  2206. for FILE in $SMSLISTS
  2207. do
  2208.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2209. done
  2210. /bin/echo >> $DTL
  2211. /bin/echo "Directory listing of default Management GUI/CLI locations" >> $DTL
  2212. /bin/echo >> $DTL
  2213.  
  2214. if test -f Mgmt_tools/scli.out
  2215. then
  2216.    /bin/echo -n "<a href=\"Mgmt_tools/scli.out\">Mgmt_tools/scli.out</a>    " >> $DTL
  2217.    /bin/echo " CLI output for all FC Adapters." >> $DTL
  2218.    /bin/echo >> $DTL
  2219. fi
  2220. if test -f Mgmt_tools/iscli.out
  2221. then
  2222.    /bin/echo -n "<a href=\"Mgmt_tools/iscli.out\">Mgmt_tools/iscli.out</a>    " >> $DTL
  2223.    /bin/echo " CLI output for all iSCSI Adapters." >> $DTL
  2224.    /bin/echo >> $DTL
  2225. fi
  2226.  
  2227. #
  2228. # System Log Information
  2229. #
  2230. cat >> $DTL <<!
  2231. <hr><a id="loginfo"></a><b><a href="details.html">System Log Information:</a></b>     <a href="#top">top</a><hr>
  2232. !
  2233. BOOTFILES=`ls logs/boot*`
  2234. for FILE in $BOOTFILES
  2235. do
  2236.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2237. done
  2238. /bin/echo >> $DTL
  2239. /bin/echo "Boot logs" >> $DTL
  2240. /bin/echo >> $DTL
  2241. MSGFILES=`ls logs/message* 2>> $LOGDIR/script/misc_err.log`
  2242. for FILE in $MSGFILES
  2243. do
  2244.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2245. done
  2246. /bin/echo >> $DTL
  2247. /bin/echo "System messages files" >> $DTL
  2248. /bin/echo >> $DTL
  2249. MSGFILES=`ls logs/* | grep -v "logs/message" | grep -v boot`
  2250. for FILE in $MSGFILES
  2251. do
  2252.    /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2253. done
  2254. /bin/echo >> $DTL
  2255. /bin/echo "Other log files" >> $DTL
  2256. /bin/echo >> $DTL
  2257.  
  2258. #
  2259. # Misc Information
  2260. #
  2261. cat >> $DTL <<!
  2262. <hr><a id="miscinfo"></a><b><a href="details.html">Miscellaneous Information:</a></b>     <a href="#top">top</a><hr>
  2263. !
  2264. /bin/echo -n "<a href=\"misc/fdisk.out\">misc/fdisk.out</a>     " >> $DTL
  2265. /bin/echo "<a href=\"misc/df.out\">misc/df.out</a>" >> $DTL
  2266. /bin/echo "List of devices recognized by the OS SCSI disk module and list of mounted disks." >> $DTL
  2267. /bin/echo >> $DTL
  2268. /bin/echo -n "<a href=\"misc/chkconfig.out\">misc/chkconfig.out</a>   " >> $DTL
  2269. /bin/echo "System runlevel configuration." >> $DTL
  2270. /bin/echo -n "<a href=\"misc/gcc.out\">misc/gcc.out</a>         " >> $DTL
  2271. /bin/echo "List of installed gcc binaries and version information." >> $DTL
  2272. /bin/echo -n "<a href=\"misc/lspci.out\">misc/lspci.out</a>       " >> $DTL
  2273. /bin/echo "List of hardware installed as recognized by <i>lspci -v</i>" >> $DTL
  2274. /bin/echo -n "<a href=\"misc/dmidecode.out\">misc/dmidecode.out</a>   " >> $DTL
  2275. /bin/echo "Lists Motherboard and BIOS information as recognized by <i>dmidecode</i>" >> $DTL
  2276. /bin/echo -n "<a href=\"misc/ps.out\">misc/ps.out</a>          " >> $DTL
  2277. /bin/echo "List of all running processes." >> $DTL
  2278. /bin/echo -n "<a href=\"misc/uptime.out\">misc/uptime.out</a>      " >> $DTL
  2279. /bin/echo "System uptime." >> $DTL
  2280. /bin/echo -n "<a href=\"misc/ls_usrlib.out\">misc/ls_usrlib.out</a>   " >> $DTL
  2281. /bin/echo "32-bit Loadable libraries" >> $DTL
  2282. if test -f misc/ls_usrlib64.out
  2283. then
  2284.    /bin/echo -n "<a href=\"misc/ls_usrlib64.out\">misc/ls_usrlib64.out</a> " >> $DTL
  2285.    /bin/echo "64-bit Loadable libraries" >> $DTL
  2286. fi
  2287. /bin/echo >> $DTL
  2288. OTHERMISCFILES="misc/lsscsi.out misc/lsscsi_verbose.out misc/sysctl.out misc/vmstat.out misc/free.out misc/lsof.out"
  2289. for FILE in $OTHERMISCFILES
  2290. do
  2291.    if test -f $FILE
  2292.    then
  2293.       /bin/echo -n "<a href=\"$FILE\">$FILE</a>    " >> $DTL
  2294.    fi
  2295. done
  2296. /bin/echo >> $DTL
  2297. /bin/echo "Other miscellaneous files listing various system resources." >> $DTL
  2298. /bin/echo >> $DTL
  2299.  
  2300. #
  2301. # Wrap it up
  2302. #
  2303. cat >> $DTL <<!
  2304. <hr><a id="bottom"></a> <a href="#top">top</a><hr> 
  2305. <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br> 
  2306. </pre> 
  2307. </font> 
  2308. </body>
  2309. !
  2310.  
  2311. #####################################################################
  2312. # Create compressed archive of results ... then clean up
  2313. #####################################################################
  2314. /bin/echo -n "Creating compressed archive and cleaning up ... "
  2315.  
  2316. cd /tmp
  2317. tar czf $LOGNAME.tgz ./$LOGNAME
  2318. if test $? -ne 0 
  2319. then
  2320.    /bin/echo "*!*! Error while archiving the support data."
  2321.    /bin/echo "     Please tar and compress $LOGDIR by hand"
  2322.    /bin/echo "     and Email it to ibsupport@intel.com"
  2323. else
  2324.    rm -rf /tmp/$LOGNAME
  2325.    /bin/echo "done"
  2326.    /bin/echo
  2327.    /bin/echo "Please attach the file: $LOGDIR.tgz to your case at http://www.intel.com/infiniband"
  2328. fi
  2329.  
  2330. #####################################################################
  2331. # All done ...
  2332. #####################################################################
  2333. exit
  2334.