Collect all diag info for controller into hostname tar
storclis.sh
/opt/MegaRAID/storcli/storcli64 -ShowSummary -aAll > ShowSummary.txt
/opt/MegaRAID/storcli/storcli64 -AdpAllInfo -aALL > AdpAllInfo.txt
/opt/MegaRAID/storcli/storcli64 -CfgDsply -aALL > CfgDsply.txt
/opt/MegaRAID/storcli/storcli64 -PDList -aALL > PDList.txt
/opt/MegaRAID/storcli/storcli64 -adpbbucmd -aALL > adpbbucmd.txt
/opt/MegaRAID/storcli/storcli64 -FwTermLog -dsply -aALL > FwTermLog.txt
/opt/MegaRAID/storcli/storcli64 -PhyErrorCounters -aALL > PhyErrorCounters.txt
 
tar --transform='s,^,output/,' -cvzf `hostname`.MegaRAID.output.tar.gz ShowSummary.txt AdpAllInfo.txt CfgDsply.txt PDList.txt adpbbucmd.txt FwTermLog.txt PhyErrorCounters.txt
Command Action
./MegaCli64 -FwTermLog -Dsply -aALL > /tmp/ttylog.txt/
Creates the RAID controller log (ttylog)
./MegaCli64 -PDList -aALL > /tmp/disks.txt
Creates a list with information about the RAID controllers, virtual disks and hard disks installed
./MegaCli64 -LDInfo -LALL -aALL > /tmp/LDinfo.txt
Creates a list with information about existing RAID volumes and configurations
./MegaCli64 -AdpAllInfo -aALL > /tmp/Adapterinfo.txt 
Creates a list with information about RAID controller settings
./MegaCli64 -AdpBbuCmd -aALL > /tmp/Battery.txt 
Creates a detailed list of the battery status of the RAID controller (state of charge, learning cycle, etc.)
./MegaCli64 -AdpEventLog -IncludeDeleted -f deleted.txt -aALL 
Creates the RAID controller log (ttylog) with all information since very first controller initialization (Note: This file will always be saved in the MegaCLI root folder)