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