The Storage Command Line Tool (StorCLI) is a command line interface that is designed to be easy to use, consistent, and easy to script. It also manages MegaRAID controller card BBU(Battery Backup Unit).

In this article, I'll show you Storcli BBU commands examples:

The Storcli BBU commands

storcli /cx/cv set SCAPVPD file=<input file path> VPDPage=<SCapVPDFixed>
storcli /cx/cv show
storcli /cx/cv show all
storcli /cx/cv show status
storcli /cx/cv show learn
storcli /cx/cv show SCAPVPD file=<output file path> VPDPage=<SCapVPDFixed>
storcli /cx/cv start learn

Storcli Show Battery Status commands

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

Cachevault_Info :
===============
---------------------------------------------------------
Model  State   Temp Mode MfgDate    Next Learn          
---------------------------------------------------------
CVPM02 Optimal 36C  -    2016/07/27 2017/12/14  03:53:35
---------------------------------------------------------

With 'all' option,show command list all battery property values

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

Cachevault_Info :
===============

--------------------
Property    Value  
--------------------
Type        CVPM02 
Temperature 36 C   
State       Optimal
--------------------


Firmware_Status :
===============

---------------------------------------
Property                         Value
---------------------------------------
Replacement required             No   
No space to cache offload        No   
Module microcode update required No   
---------------------------------------

GasGaugeStatus :
==============

------------------------------
Property                Value
------------------------------
Pack Energy             240 J
Capacitance             100 %
Remaining Reserve Space 0    
------------------------------

Design_Info :
===========
------------------------------------
Property                 Value     
------------------------------------
Date of Manufacture      27/07/2016
Serial Number            9262      
Manufacture Name         LSI       
Design Capacity          288 J     
Device Name              CVPM02    
tmmFru                   N/A       
CacheVault Flash Size    4.0 GB    
tmmBatversionNo          0x07      
tmmSerialNo              0xa143    
tmm Date of Manufacture  17/03/2016
tmmPcbAssmNo             022544411A
tmmPCBversionNo          0x03      
tmmBatPackAssmNo         49571-15C 
scapBatversionNo         0x00      
scapSerialNo             0x242e    
scap Date of Manufacture 27/07/2016
scapPcbAssmNo            1700154483
scapPCBversionNo         0x E      
scapBatPackAssmNo        49571-15C 
Module Version           6071-04A  
------------------------------------

Properties :
==========

--------------------------------------------------------------
Property             Value                                   
--------------------------------------------------------------
Auto Learn Period    27d (2412000 seconds)                   
Next Learn time      2017/12/14  03:53:35 (566538815 seconds)
Learn Delay Interval 0 hour(s)                               
Auto-Learn Mode      Transparent                             
--------------------------------------------------------------

Storcli command to show Battery learn modes

# storcli64 /c0/cv show learn
Controller = 0
Status = Success
Description = Get Cachevault Learn Succeeded.


Cachevault Learn :
================

------------------------------------------------------
Property           Value                              
------------------------------------------------------
Auto Learn Mode    Transparent                        
Schedule Time      THU, December 14, 2017 at 03:53:35
Interval           3 Weeks                            
Learn Cycle Active No                                 
------------------------------------------------------

Storcli command to show Battery status

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

Cachevault_Info :
===============

--------------------
Property Value
--------------------
Type CVPM02
Temperature 36 C
State Optimal
--------------------

Firmware_Status :
===============

---------------------------------------
Property Value
---------------------------------------
Replacement required No
No space to cache offload No
Module microcode update required No
---------------------------------------

GasGaugeStatus :
==============

------------------------------
Property Value
------------------------------
Pack Energy 240 J
Capacitance 100 %
Remaining Reserve Space 0
------------------------------

Storcli command to start learn

# storcli64 /c0/cv start learn

There is another command set for BBU(Battery Backup Unit)

storcli /cx/bbu show
storcli /cx/bbu show all
storcli /cx/bbu set bbuMode=<value>
storcli /cx/bbu set learndelayinterval=<value>
storcli /cx/bbu set powermode=sleep
storcli /cx/bbu set writeaceess=sealed
storcli /cx/bbu show modes
storcli /cx/bbu show properties
storcli /cx/bbu show status
storcli /cx/bbu start learn

storcli /cx/bbu show

This command shows the summary information for the BBU of a controller.
Example:

storcli /c0/bbu show
storcli /cx/bbu show all

storcli /cx/bbu set BBU mode

This command sets the BBU mode for the BBU. The following table shows the various BBU modes:

Example:

storcli /c0/bbu set bbuMode=2

Mode Description

0 48 hours of retentiona at 60 °C, 1-year Service Life.
a. Indicates how long the battery can hold data in the controller's memory in case of accidental system shutdown.
1 12 hours of retention at 45 °C, 5-year Service Life, transparent learn.b
b. The controller's performance is not affected during the battery's learn cycle.
2 12 hours of retention at 55 °C, 3-year Service Life, transparent learn.
3 24 hours of retention at 45 °C, 3-year Service Life, transparent learn.
4 48 hours of retention at 45 °C, 3-year Service Life.
5 48 hours of retention at 55 °C, 1-year Service Life.
6 Same as the description for BBU mode 5. The BBU mode 6 enables you to receive events when the battery
capacity reaches suboptimal and critical thresholds.

Storcli set BBU learn delay interval

This command sets the learn delay interval for the BBU in hours. The value must be between 0 to 168 hours (7 days).
Example:

storcli /c0/bbu set learnDelayInterval=30

Storcli Set power mode

This command places the battery in low-power storage mode. The battery automatically exits this state after 5 seconds.
Example:

storcli /c0/bbu set powermode=sleep

Storcli Seals gas gauge

This command seals the gas gauge EEPROM write access.
Example:

storcli /c0/bbu set writeaccess=sealed

NOTE Use the set writeaccess=sealed command at manufacturing time.

Storcli BBU show modes

This command shows the bbu mode information that includes the bbu mode number, retention time, service life,
maximum temperature, and battery learn information.
Example:

storcli /c0/bbu show properties

Storcli show BBU status

This command shows the battery information, firmware status, and the gas gauge status.
Example:

storcli /c0/bbu show status

Storcli Start learn BBU

This command starts the BBU learning cycle. The battery learn cycle is immediately started and no other parameters are required for this command.
Example:

storcli /c0/bbu start learn