Hardware Log Retrieval
======================

What this package does

This package will retrieve all the possible logs from the system for
investigation of a hardware problem.  The logs are collected into a single zip
file containing primarily text files which can be viewed by anyone wishing to
inspect them.

The following log files are collected:
* /var/log/messages maintained by the Linux OS
* logs, configuration and status information from the RAID controller
* logs and status information from the HDDs
* logs and status from BMC (including both a raw representation and text
  represenation of some files)
* status information about the hardware visible to the Linux OS
* information about this scripts performance
* any notes provided


Instructions for retrieving hardware logs

1. Copy the zip file to a target system (scp, usb, ftp etc.) to e.g. /root
2. Unpack the zip file "unzip getlogs.zip"
3. Run the script to gather the logs
   "/root/getlogs/getlogs.sh"
   to create a logfile with a named based on the system serial number, or
   "/root/getlogs/getlogs.sh /root/filename.zip"
   (replacing the word "filename" with something that distinguishes this
   system from others)
4. Provide any additional information (such as escalation number or problems
   observed) when prompted
5. Copy the zip file containing the logs back to your technical support
   representative.


Log File Content

The following files may be present within the logs bundle. Not every
system will contain every log file.

cpuinfo.txt                     - details about the CPUs in the system
cpufreq.txt                     - details about CPU frequency control
cputhermal.txt                  - details about CPU temperature management
date.txt                        - times when the logs were taken
dmesg.txt                       - debug log from the kernel
dmidecode.txt                   - hardware details from the BIOS
fdisk.txt                       - list of partition information
hddupdate.*                     - logs from updating HDD firmware
intrushell.txt                  - Intrushield NIC dump
interrupts.txt                  - details of active interrupts
ipmi_fru.txt                    - hardware details from the BMC
ipmi_mc_info.txt                - BMC firmware version information
ipmi_rmm3.txt                   - BMC indication of RMM3 presence
ipmi_coldred.txt                - PSU cold redundancy info from BMC
ipmi_featuresupport.txt         - BMC network features supported/enabled
ipmi_poh.txt                    - BMC recorded powered on hours
ipmi_sdr_dump.raw               - BMC sensor data (binary format)
ipmi_sdr_dump.raw.txt           - Output from dumping the above file
ipmi_sdr_elist.txt              - BMC sensor data
ipmi_sel.raw                    - BMC event log (binary format)
ipmi_sel.hex.txt                - BMC event log (hex dump of ipmi_sel.raw)
ipmi_sel.txt                    - BMC event log
ipmi_sensor.txt                 - BMC detailed sensor data
ipmi_si_stats.txt               - Kernel statistics for BMC KCS communication
ipmi_stats.txt                  - Kernel statistics for BMC IPMB communication
ipmi_status.txt                 - BMC system status report
ipmi_watchdog.txt               - BMC hardware watchdog status
lsmod.txt                       - List of loaded kernel modules
lspci-n.txt                     - List of PCI devices present (numeric format)
lspci-vx.txt                    - List of PCI devices present (verbose PCI dump)
lspci.txt                       - List of PCI devices present (text format)
lsusb.txt                       - List of USB devices (text format)
lsusb-v.txt                     - List of USB devices (verbose format)
mdadm.txt                       - Software RAID dump
meminfo.txt                     - Details about the memory usage of the system
notes.txt                       - Notes provided when the logs were collected
partitions.txt                  - List of partitions known to the OS
raidupdate.*                    - Logs from updating RAID controller firmware
scsi.txt                        - List of SCSI devices reported by the kernel
sel*.log                        - BMC event log dump (certain products only)
stderr.txt                      - Debug info from the getlogs script operation
summary.txt                     - Summary of useful information from other files
sys.txt                         - OS view of hardware detected and drivers in use
thermalzone.txt                 - Details of system temperature management
uname.txt                       - Details of the kernel in use
usbdevices.txt                  - Detailed USB device dump
version.txt                     - Version of getlogs package and other tools used

nic_*/                          - statistics from each of the system NICs
nic_*/coalesce.txt              - NIC frame coalescing options
nic_*/info.txt                  - NIC firmware and driver versions
nic_*/offload.txt               - NIC checksum offload configuration
nic_*/pause.txt                 - NIC pause frame configuration
nic_*/ring.txt                  - NIC ring buffer configuration
nic_*/stats.txt                 - NIC statistics
nic_*/status.txt                - NIC link details
nic-summary.txt                - NIC model, serial/MAC, link, and SFP details

host*/                          - drive details from each storage host in the system
                                - contents depend on the storage adapter type
host*/controller.txt            - Indication of which type of controller this is

All adapter types, for each HDD:
host*/linuxdev.*.txt            - Drive details from the OS
host*/smartctl_a.*.txt          - SMART data summary
host*/smartctl_background.*.txt - SMART HDD background test results
host*/smartctl_directory.*.txt  - SMART data index
host*/smartctl_gplog.*.*.txt    - SMART generic data dump
host*/smartctl_sataphy.*.txt    - SMART HDD connection data
host*/smartctl_scterc.*.txt     - SMART HDD error recovery control
host*/smartctl_selftest.*.txt   - SMART HDD self test results
host*/smartctl_sasphy.*.txt     - SMART HDD connection data
host*/smartctl_xerror.*.txt     - SMART HDD extended error log
host*/smartctl_scttemp.*.txt    - SMART HDD temperature log
host*/smartctl_devstat.*.txt    - SMART HDD device statistics counters
host*/smartctl_ssd.*.txt        - SMART SSD information
host*/firmware_check.txt        - Status of whether firmware requires updating

MegaRAID adapters
host*/adpalilog.txt             - Adapter tech support log
host*/adpallinfo.txt            - Adapter firmware and config details
host*/bbucapinfo.txt            - Backup battery capacity information
host*/bbudesigninfo.txt         - Backup battery design capacity information
host*/bbuproperties.txt         - Backup battery properties
host*/bbustatus.txt             - Backup battery status
host*/cfgdsply.txt              - Adapter configuration detail
host*/cfgforeign.txt            - Details of config found on drives not in use
host*/eventlog2.txt             - Adapter verbose event log
host*/eventloginfo.txt          - Adapter event log status
host*/eventlog.txt              - Output from dumping the event log
host*/fwtermlog.txt             - Adapter debug log
host*/ldpdinfo.txt              - Logical disk and associated physical disk information
host*/pdinfo.txt                - Information about all physical disks
host*/pdmissing.txt             - Details of configured disks which are missing
host*/phyerrorcounters.txt      - Low level error counters from the adapter
host*/phyinfo.*.txt             - Details about the adapter connections
host*/drivesummary.csv          - HDD summary information
host*/sense_decode.txt          - Decode of any sense codes found in adpalilog.txt

MPT Adapters
host*/mpt-status.txt            - Adapter summary
host*/mptsas.txt                - OS driver status
host*/sasflash.txt              - Adapter firmware information

MPT2 Adapters
host*/mpt2-status.txt            - Adapter summary

i910 SSD cards - as for MPT2 adapters, plus:
host*/fwrev.txt                  - Adapter firmware revision
host*/serial.txt                 - Adapter serial number
host*/isdct_inquiry.*.txt        - Device inquiry information
host*/isdct_log.*.txt            - Device log information

Intel 3xxx series SSDs
host*/isdct_all.*.txt            - basic drive information
host*/isdct_identify.*.txt       - device identify structures
host*/isdct_sensor.*.txt         - device health sensor properties
host*/isdct_smart.*.txt          - device SMART attributes
host*/isdct_performance.*.txt    - device performance metrics

nitro/*                         - SIEM log files


If the logs are captured from a product OS, then the following files may
contain data from the operation of the product, which could contain data that
could be deemed sensitive.  If there is a concern over sensitivity of this
data, then these files should be reviewed and any information deemed sensitive
should be redacted or the files removed.  If the files are removed then this
may hamper the diagnosis of any issue.  All other files contain data about the
hardware and do not contain data regarding the operation of the product itself.

If the logs are captured from a bootable LDT image, then all logs collected
will be in the context of the bootable image, and no data will be retrieved
from the product OS.

messages.*.txt                  - OS event log
last.txt                        - List of logins, shutdowns and reboots
ipmi_lan1.txt                   - BMC LOM configuration details
                                  (contains IP address information)
ipmi_lan3.txt                   - BMC dedicated NIC (RMM3) configuration details
                                  (contains IP address information)
