---
title: MegaCLI commands
url: https://www.broadcom.com/support/knowledgebase/1211161496959/megacli-commands
description: MegaCLI commands
---

# MegaCLI commands

## Question
MegaCLI commands

## Answer
MegaCLI commands

The [MegaRAID SAS Software User Guide](https://docs.broadcom.com/docs/12353236) has the MegaCLI commands.

[Cross reference MegaCLI commands to StorCLI commands](https://www.broadcom.com/support/knowledgebase/1211161499760/lsi-command-line-interface-cross-reference-megacli-vs-twcli-vs-s).

[DimmerSwitch power savings commands](https://www.broadcom.com/support/knowledgebase/1211161495594/what-are-the-megacli-command-line-options-for-the-dimmer-switchf):

[Maintain PD Fail History](https://www.broadcom.com/support/knowledgebase/1211161496893/megaraid-3ware-and-hba-support-for-various-raid-levels-and-jbod-).

**Adapter's Auto Rebuild Settings**

|  |  |  |  |
| --- | --- | --- | --- |
| Command Type | .telerik-reTable-3 { border-collapse: collapse; border: solid 0px; font-family: Tahoma; } .telerik-reTable-3 tr.telerik-reTableHeaderRow-3 { margin: 10px; padding: 10px; color: #3a4663; text-align: left; font-size: 10pt; font-style: normal; font-family: Verdana; text-transform: capitalize; font-weight: normal; border-spacing: 10px; vertical-align: top; background-color: #C4D1E3; } .telerik-reTable-3 td.telerik-reTableHeaderFirstCol-3 { padding: 0in 5.4pt 0in 5.4pt; color: #3a4663; line-height: 14pt; } .telerik-reTable-3 td.telerik-reTableHeaderLastCol-3 { padding: 0in 5.4pt 0in 5.4pt; color: #3a4663; line-height: 14pt; } .telerik-reTable-3 td.telerik-reTableHeaderOddCol-3 { padding: 0in 5.4pt 0in 5.4pt; color: #3a4663; line-height: 14pt; } .telerik-reTable-3 td.telerik-reTableHeaderEvenCol-3 { padding: 0in 5.4pt 0in 5.4pt; color: #3a4663; line-height: 14pt; } .telerik-reTable-3 tr.telerik-reTableOddRow-3 { color:#666666; vertical-align: top; font-size: 10pt; } .telerik-reTable-3 tr.telerik-reTableEvenRow-3 { color:#666666; vertical-align: top; font-size: 10pt; } .telerik-reTable-3 td.telerik-reTableFirstCol-3 { padding: 0in 5.4pt 0in 5.4pt; background-color: #E7EBF7; } .telerik-reTable-3 td.telerik-reTableLastCol-3 { padding: 0in 5.4pt 0in 5.4pt; background-color:#E7EBF7; } .telerik-reTable-3 td.telerik-reTableOddCol-3 { padding: 0in 5.4pt 0in 5.4pt; background-color:#F7F3F7; } .telerik-reTable-3 td.telerik-reTableEvenCol-3 { padding: 0in 5.4pt 0in 5.4pt; background-color:#E7EBF7 } .telerik-reTable-3 tr.telerik-reTableFooterRow-3 { background-color: #C4D1E3; color: #3a4663; font-weight: normal; font-size: 10pt; font-family: Verdana; line-height: 11pt; } .telerik-reTable-3 td.telerik-reTableFooterFirstCol-3 { padding: 0in 5.4pt 0in 5.4pt; text-align: left; } .telerik-reTable-3 td.telerik-reTableFooterLastCol-3 { padding: 0in 5.4pt 0in 5.4pt; text-align: left; } .telerik-reTable-3 td.telerik-reTableFooterOddCol-3 { padding: 0in 5.4pt 0in 5.4pt; text-align: left; } .telerik-reTable-3 td.telerik-reTableFooterEvenCol-3 { padding: 0in 5.4pt 0in 5.4pt; text-align: left; } | Description | MegaCLI Command |
| Server / System | Show system overview | Displays a summary of all the controllers that are present in the server. | MegaCLI adpCount |
|  | Download firmware | CLI will attempt to download fw to all compatible controllers that supports the image. By default CLI with check signature and version. | MegaCli AdpFwFlash f filename [NoSigChk] [NoVerChk] aN\|a0,1,2\|aALL |
|  | Flash FW in Mode 0 with ROM file | Flashes the firmware in Mode 0 with the ROM file listed. For Mode 0 flash, the adapter number<br>is not valid. | MegaCli AdpM0Flash f filename |
| Controller | Display Controller / Adapter Properties | Displays information about the adapter, such as cluster state, BIOS, alarm, firmware<br>version, etc. | MegaCli AdpAllInfo aN\|a0,1,2\|aALL |
|  | Set Controller / Adapter Properties | Sets the properties on the selected adapter(s). See note below. | MegaCli AdpSetProp {CacheFlushInterval val} \| { RebuildRate val} \| {PatrolReadRate val} \| {BgiRate val} \| {CCRate val}\| {ReconRate val} \| \| {CoercionMode \| {ClusterEnable val} \| {PredFailPollInterval val} \| {BatWarnDsbl val} \| {EccBucketSize val} \| {EccBucketLeakRate val} val} \| {AbortCCOnError val} \| AlarmEnbl \| AlarmDsbl \| AlarmSilence \| {SMARTCpyBkEnbl val} \| {SSDSMARTCpyBkEnbl val} \| NCQEnbl \| NCQDsbl \| {MaintainPdFailHistoryEnbl val} \| {RstrHotSpareOnInsert val} \| {SpinupDriveCount val} \| {SpinupDelay val} \| {EnblSpinDownUnConfigDrvs val} \| {EnblSSDPatrolRead val} \| {DisableOCR val} \| {BootWithPinnedCache val}\| AutoEnhancedImportEnbl \| AutoEnhancedImportDsbl \| {ExposeEnclDevicesEnbl val} \| {SpinDownTime val} aN\|a0,1,2\|aALL |
|  | Display Specfied Controller / Adapter Properties | Displays the specified properties on the selected adapter(s).<br>For MegaRAID command, see Note (2) below for specific parameters. | MegaCli AdpGetProp CacheFlushInterval \| RebuildRate \| PatrolReadRate\|<br>BgiRate \| CCRate \| ReconRate \| SpinupDriveCount \| SpinupDelay \|<br>CoercionMode \| PredFailPollInterval \| ClusterEnable \| BatWarnDsbl \|<br>EccBucketSize \| EccBucketLeakRate \| EccBucketCount \| AlarmDsply aN\|<br>a0,1,2\|aALL |
|  | Flash Firmware | If issued at server level without controller option, cli will attempt to<br>download fw to all compatible controllers that supports the image | MegaCli AdpFwFlash f filename [NoSigChk] [NoVerChk] aN\|a0,1,2\|aALL |
|  | Set Factory Defaults | Sets the factory defaults on the selected controller/adapter. | MegaCli AdpFacDefSet aN |
|  | Set SAS Address | Sets the adapters SAS address. This string must be a 64digit hexadecimal number. | MegaCli AdpSetSASA str[064] aN |
|  | Set Time and Date | Sets the time and date on the adapter. See note 3 below. | AdpSetTime yyyymmdd HH:mm:ss aN\|a0,1,2\|aALL |
|  | Display Time and Date | Displays the time and date on the adapter. | AdpGetTime aN |
| Patrol Read | Show Patro |  |  |

|  |  |  |  |
| --- | --- | --- | --- |
| Command | Syntax | Proven |  |
| View Version | MegaCli v | MegaCli v |  |
| Help | MegaCli help\|h\|? | MegaCli ? |  |
| **Set Adapter Properties** |  |  |  |
| Cache Flush Interval | MegaCli AdpSetProp {CacheFlushInterval val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp CacheFlushInterval 2 a0 |  |
| Rebuild Rate | MegaCli AdpSetProp {RebuildRate val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp RebuildRate 75 a0 |  |
| Patrol Read Rate | MegaCli AdpSetProp {PatrolReadRate val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp PatrolReadRate 38 a0 |  |
| BGI (BackGround Interval) Rate | MegaCli AdpSetProp {BgiRate val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp BgiRate 92 a0 |  |
| CC (Consistency Check) Rate | MegaCli AdpSetProp {CCRate val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp CCRate 23 a0 |  |
| Reconstruction Rate | MegaCli AdpSetProp {ReconRate val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp ReconRate 15 a0 |  |
| Spinup Drive Count | MegaCli AdpSetProp {SpinupDriveCount val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp SpinupDriveCount 2 a0 |  |
| Spinup Delay | MegaCli AdpSetProp {SpinupDelay val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp SpinupDelay 10 a0 |  |
| Coercion Mode | MegaCli AdpSetProp {CoercionMode val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp CoercionMode 0 a0 |  |
| Predictive Failure Poll Interval | MegaCli AdpSetProp {PredFailPollInterval val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp PredFailPollInterval 20 a0 |  |
| Battery Warning Enable/Disable | MegaCli AdpSetProp {BatWarnDsbl val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp BatWarnDsbl 0 a0 |  |
| ECC Bucket Size | MegaCli AdpSetProp {EccBucketSize val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp EccBucketSize 128 a0 |  |
| ECC Bucket Leak Rate | MegaCli AdpSetProp {EccBucketLeakRate val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp EccBucketLeakRate 64 a0 |  |
| Abort Check Consistency on Error | MegaCli AdpSetProp {AbortCCOnError val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp AbortCCOnError 0 a0 |  |
| Enable SMART Copyback | MegaCli AdpSetProp {SMARTCpyBkEnbl val} aN\|a0,1,2\|aALL | MegaCli AdpSetProp SMARTCpyBkEnbl 0 a0 |  |
| Enable SSD SMART Copyback | MegaCli AdpSetProp {SSDSMARTCpyBkEnbl val} aN\|a0,1,2\|aALL | MegaCLI AdpSetProp SSDSMARTCpyBkEnble 0 a0 |  |
| Enable NCQ | MegaCli AdpSetProp {NCQEnbl} aN\|a0,1,2\|aALL | MegaCli AdpSetProp NCQEnbl a0 |  |
| Disable NCQ | MegaCli AdpSetProp {NCQDsbl} aN\|a0,1,2\|aALL | MegaCli AdpSetProp NCQDsbl a0 |  |
|  |  |  |  |
| **Alarm Control** |  |  |  |
| Alarm Enable | MegaCli AdpSetProp AlarmEnbl aN\|a0,1,2\|aALL | MegaCli AdpSetProp AlarmEnbl a0 |  |
| Alarm Disable | MegaCli AdpSetProp AlarmDsbl aN\|a0,1,2\|aALL | MegaCli AdpSetProp AlarmDsbl a0 |  |
| Alarm Silence | MegaCli AdpSetProp AlarmSilence aN\|a0,1,2\|aALL | MegaCli AdpSetProp NCQDsbl a0 |  |
|  |  |  |  |
| **View Adapter Properties** |  |  |  |
| View number of adapters | MegaCli adpcount | MegaCli adpcount |  |
| Cache Flush Interval | MegaCli AdpGetProp CacheFlushInterval aN\|a0,1,2\|aALL | MegaCli AdpGetProp CacheFlushInterval a0 |  |
| Rebuild Rate | MegaCli AdpGetProp RebuildRate aN\|a0,1,2\|aALL | MegaCli AdpGetProp RebuildRate a0 |  |
| Patrol Read Rate | MegaCli AdpGetProp PatrolReadRate aN\|a0,1,2\|aALL | MegaCli AdpGetProp PatrolReadRate a0 |  |
| BGI (BackGround Interval) Rate | MegaCli AdpGetProp BgiRate aN\|a0,1,2\|aALL | MegaCli AdpGetProp BgiRate a0 |  |
| CC (Consistency Check) Rate | MegaCli AdpGetProp CCRate aN\|a0,1,2\|aALL | MegaCli AdpGetProp CCRate a0 |  |
| Reconstruction Rate | MegaCli AdpGetProp ReconRate aN\|a0,1,2\|aALL | MegaCli AdpGetProp ReconRate a0 |  |
| Spinup Drive Count | MegaCli AdpGetProp SpinupDriveCount aN\|a0,1,2\|aALL | MegaCli AdpGetProp SpinupDriveCount a0 |  |
| Spinup Delay | MegaCli AdpGetProp SpinupDelay aN\|a0,1,2\|aALL | MegaCli AdpGetProp SpinupDelay a0 |  |
| Coercion Mode | MegaCli AdpGetProp CoercionMode aN\|a0,1,2\|aALL | MegaCli AdpGetProp CoercionMode a0 |  |
| Predictive Failure Poll Interval | MegaCli AdpGetProp PredFailPollInterval aN\|a0,1,2\|aALL | MegaCli AdpGetProp PredFailPollInterval a0 |  |
| Battery Warning Enable/Disable | MegaCli AdpGetProp BatWarnDsbl aN\|a0,1,2\|aALL | MegaCli AdpGetProp BatWarnDsbl a0 |  |
| ECC Bucket Size | MegaCli AdpGetProp EccBucketSize aN\|a0,1,2\|aALL | MegaCli AdpGetProp EccBucketSize a0 |  |
| ECC Bucket Leak Rate | MegaCli AdpGetProp EccBucketLeakRate aN\|a0,1,2\|aALL | MegaCli AdpGetProp EccBucketLeakRate a0 |  |
| Abort Check Consistency on Error (CC) | MegaCli AdpGetProp AbortCCOnError aN\|a0,1,2\|aALL | MegaCli AdpGetProp AbortCCOnError a0 |  |
| Alarm Status (Enabled/Disabled/<br>Silenced) | MegaCli AdpGetProp AlarmDsply aN\|a0,1,2\|aALL | MegaCli AdpGetProp AlarmDsply a0 |  |
| All Adapter Information | MegaCli AdpAllInfo aN\|a0,1,2\|aALL | MegaCli AdpAllInfo a0 |  |
| Get Adapter Time | MegaCli AdpGetTime aN\|a0,1,2\|aALL | MegaCli AdpGetTime a0 |  |
| Set Adapter Time | MegaCli AdpSetTime yyyymmdd hh:mm:ss aN | MegaCli AdpSetTime 20071210 9:33:00 a0 |  |
| Adapter Set Verify | MegaCli AdpSetTime yyyymmdd hh:mm:ss aN | MegaCli AdpSetTime 20071210 9:33:00 a0 |  |
|  |  |  |  |
| **Adapter BIOS State / Boot Options** |  |  |  |
| Enable BIOS | MegaCli AdpBIOS Enbl aN\|a0,1,2\|aALL | MegaCli AdpBIOS Enbl a0 |  |
| Disable BIOS | MegaCli AdpBIOS Dsbl aN\|a0,1,2\|aALL | MegaCli AdpBIOS Dsbl a0 |  |
| Set BIOS to Stop on Error | MegaCli AdpBIOS SOE aN\|a0,1,2\|aALL | MegaCli AdpBIOS SOE a0 |  |
| Set BIOS to Bypass Error | MegaCli AdpBIOS BE aN\|a0,1,2\|aALL | MegaCli AdpBIOS BE a0 |  |
| Display BIOS State | MegaCli AdpBIOS Dsply aN\|a0,1,2\|aALL | MegaCli AdpBIOS Dsply a0 |  |
| Set Boot Drive | MegaCli AdpBootDrive {Set Lx} aN\|a0,1,2\|aALL | MegaCli AdpBIOS Dsply a0 |  |
| Display Boot Drive | MegaCli AdpBootDrive Get aN\|a0,1,2\|aALL | MegaCli AdpBootDrive Get a0 |  |
|  |  |  |  |
| **Adapter's Auto Rebuild Settings** |  |  |  |
|  |  |  |  |
