
UserParameter=megacli.adp.discover,sudo /usr/sbin/megacli -AdpAllInfo -aALL -NoLog | grep '^Adapter #' | sed -e 's/^Adapter #//' | /bin/sed -e '$ ! s/\(.*\)/{"{#ADPNUM}":"\1"},/' | sed -e '$  s/\(.*\)/{"{#ADPNUM}":"\1"}]}/' | /bin/sed -e '1 i { \"data\":['

UserParameter=megacli.adp.Product_Name[*],sudo /usr/sbin/megacli -AdpAllInfo -a$1 -NoLog | egrep '^Product Name\s+: '| sed -re 's/^Product Name\s+: //'
UserParameter=megacli.adp.FW[*],sudo /usr/sbin/megacli -AdpAllInfo -a$1 -NoLog | egrep '^FW Package Build: '| sed -re 's/^FW Package Build: //'
UserParameter=megacli.adp.virtual_drives[*],sudo /usr/sbin/megacli -AdpAllInfo -a$1 -NoLog | egrep '^Virtual Drives\s+: '| sed -re 's/^Virtual Drives\s+: //'
UserParameter=megacli.adp.virtual_degraded[*],sudo /usr/sbin/megacli -AdpAllInfo -a$1 -NoLog | egrep '^  Degraded\s+: '| sed -re 's/^  Degraded\s+: //'
UserParameter=megacli.adp.virtual_offline[*],sudo /usr/sbin/megacli -AdpAllInfo -a$1 -NoLog | egrep '^  Offline\s+: '| sed -re 's/^  Offline\s+: //'
UserParameter=megacli.adp.critical_PD[*],sudo /usr/sbin/megacli -AdpAllInfo -a$1 -NoLog | egrep '^  Critical Disks\s+: '| sed -re 's/^  Critical Disks\s+: //'
UserParameter=megacli.adp.failed_PD[*],sudo /usr/sbin/megacli -AdpAllInfo -a$1 -NoLog | egrep '^  Failed Disks\s+: '| sed -re 's/^  Failed Disks\s+: //'
