mirror of https://github.com/eLvErDe/hwraid.git
Added some more information.. (Rev 1.8)
This commit is contained in:
parent
220b20bfcd
commit
ab1e5e0169
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python
|
||||
# $Id: megaclisas-status,v 1.7 2013/04/04 16:42:14 root Exp $
|
||||
# $Id: megaclisas-status,v 1.8 2014/01/16 17:59:00 root Exp $
|
||||
|
||||
import os
|
||||
import re
|
||||
|
@ -38,6 +38,16 @@ def returnControllerModel(output):
|
|||
if re.match(r'^Product Name.*$',line.strip()):
|
||||
return line.split(':')[1].strip()
|
||||
|
||||
def returnMemorySize(output):
|
||||
for line in output:
|
||||
if re.match(r'^Memory Size.*$',line.strip()):
|
||||
return line.split(':')[1].strip()
|
||||
|
||||
def returnFirmwareVersion(output):
|
||||
for line in output:
|
||||
if re.match(r'^FW Package Build.*$',line.strip()):
|
||||
return line.split(':')[1].strip()
|
||||
|
||||
def returnArrayNumber(output):
|
||||
i = 0
|
||||
for line in output:
|
||||
|
@ -134,7 +144,9 @@ if printcontroller:
|
|||
cmd = 'megacli -AdpAllInfo -a'+str(controllerid)+' -NoLog'
|
||||
output = getOutput(cmd)
|
||||
controllermodel = returnControllerModel(output)
|
||||
print 'c'+str(controllerid)+' | '+controllermodel
|
||||
controllerram = returnMemorySize(output)
|
||||
controllerrev = returnFirmwareVersion(output)
|
||||
print 'c'+str(controllerid)+' | '+controllermodel+' ('+controllerram+') FW: '+controllerrev
|
||||
controllerid += 1
|
||||
print ''
|
||||
|
||||
|
|
Loading…
Reference in New Issue