The Storage Command Line Tool (StorCLI) is the command line management software designed for the MegaRAID® product line.In other articles, I showed you commands related to drive, virtual drive, battery etc.. In this article, I'll show you Storcli commands to check MegaRAID card event log info:

storcli /cx delete events

This command deletes all records in the event log.
Example:

# storcli64 /c0 delete events
Controller = 0
Status = Success
Description = None


Controller Properties :
=====================

----------------------------------------
Ctrl Status  Method       ErrMsg  ErrCd
----------------------------------------
   0 Success DeleteEvents Success     0
----------------------------------------

storcli /cx delete termlog

This command clears the TTY (firmware log for issue troubleshooting) logs.

# storcli64 /c0 delete termlog                   
Controller = 0
Status = Success
Description = None


Controller Properties :
=====================

----------------------------
Ctrl Method Result          
----------------------------
   0 Delete Termlog deleted
----------------------------

storcli /cx show events file=<absolute path>

This command prints the system log to a text file and saves the file in the specified location.

storcli64 /c0 show events file=/home/Ctrl0_event.log
Controller = 0
Status = Success
Description = None

Events = GETEVENTS

Controller Properties :
=====================

------------------------------------------
Ctrl Status  Method          ErrMsg ErrCd
------------------------------------------
   0 Success handleSuboption Events     0
------------------------------------------

storcli /cx show eventloginfo

This command shows the history of log files generated.

# storcli64 /c0 show eventloginfo                      
Controller = 0
Status = Success
Description = None

Newest Sequence Number = 0x0000775d
Oldest Sequence Number = 0x00000001
Clear Sequence Number = 0x00001026
Shutdown Sequence Number = 0x00003c58
Reboot Sequence Number = 0x00003c59

Controller Properties :
=====================

----------------------------------------
Ctrl Status  Method       ErrMsg  ErrCd
----------------------------------------
   0 Success EventLogInfo Success     0
----------------------------------------

storcli /cx show termlog type=config|contents

This command shows the firmware logs. The config option shows the term log configuration (settings of TTY BBU
buffering), the contents option shows the term log.The contents option is the default.
Example1:

# storcli64 /c0 show termlog type=config
Controller = 0
Status = Success
Description = None

Controller Properties :
=====================

------------------------
Ctrl Method      Result
------------------------
   0 Show Config OFF    
------------------------

Example2:

# storcli64 /c0 show termlog type=contents
Firmware Term Log Information on controller 0:
:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=52 CC running ld=2
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=53 CC running ld=3
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=54 CC running ld=1
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=55 CC running ld=1
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=56 CC running ld=3
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=57 CC running ld=1
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=58 CC running ld=3
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=59 CC running ld=2
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=5a CC running ld=2
12/08/17  8:24:47: C0:prDiskCheckOkToRun: PR cannot run on this pd=5b CC running ld=2
...