Dell Perc6/i RAID Monitoring Script using MegaCli
http://www.bxtra.net/articles/2008-09-16/Dell-Perc6i-RAID-Monitoring-Script-using-MegaCli-LSI-CentOS-52-64-bitsI got a Dell Perc6/i Integrated RAID card a few days ago. By usingit with CentOS 5.2 64 bits without GUI, I'm looking the way to monitorRAID status. I then, found that I can use MegaCLI from LSI to do thetask. (Dell Perc6/i uses LSI Chip)
First, get MegaCLI from LSI website -> MegaCLI 2.00.11 for Linux
Unzip it, and install it by RPM.Files will place at /opt/MegaRAID/MegaCli. However, since I use 64 bits version, the file I got is MegaCli64. (32 bits OS will get MegaCli instead.
I, then, followed what said on this website (Most information came from that website.)
1. Created a file called "analysis.awk" in the /opt/MegaRAID/MegaCli directory with the following contents:
<div class="codeblock"># This is a little AWK program that interprets MegaCLI output
/Device Id/ { counter += 1; device = $3 }
/Firmware state/ { state_drive = $3 }
/Inquiry/ { name_drive = $3 " " $4 " " $5 " " $6 }
END {
for (i=1; i<=counter; i+=1) printf ( "Device %02d (%s) status is: %s<br/>\n", device, name_drive, state_drive); }
页:
[1]