mirror of
https://github.com/eLvErDe/hwraid.git
synced 2025-07-25 14:54:22 +02:00
Very minor bugfixes (Rev 1.34)
This commit is contained in:
parent
3c4ebf4e91
commit
6822f88764
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# $Id: megaclisas-status,v 1.33 2015/04/11 17:29:38 root Exp $
|
# $Id: megaclisas-status,v 1.34 2015/04/11 17:36:45 root Exp $
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -407,18 +407,17 @@ if printcontroller:
|
|||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
if printarray:
|
if printarray:
|
||||||
controllerid = 0
|
|
||||||
|
|
||||||
print '-- Array information --'
|
print '-- Array information --'
|
||||||
|
|
||||||
|
controllerid = 0
|
||||||
i = 0
|
i = 0
|
||||||
|
mlen = 0
|
||||||
|
rlen = 0
|
||||||
while controllerid < controllernumber:
|
while controllerid < controllernumber:
|
||||||
arrayid = 0
|
arrayid = 0
|
||||||
cmd = '%s -LDInfo -lall -a%d -NoLog' % (megaclipath, controllerid)
|
cmd = '%s -LDInfo -lall -a%d -NoLog' % (megaclipath, controllerid)
|
||||||
output = getOutput(cmd)
|
output = getOutput(cmd)
|
||||||
arraynumber = returnArrayNumber(output)
|
arraynumber = returnArrayNumber(output)
|
||||||
mlen = 0
|
|
||||||
rlen = 0
|
|
||||||
# We need to explore each HBA to look for gaps in LD's
|
# We need to explore each HBA to look for gaps in LD's
|
||||||
ldid = 0 ; ldcount = 0
|
ldid = 0 ; ldcount = 0
|
||||||
while ldcount < arraynumber:
|
while ldcount < arraynumber:
|
||||||
@ -442,13 +441,19 @@ if printarray:
|
|||||||
if ( len(arrayinfo[1]) > rlen):
|
if ( len(arrayinfo[1]) > rlen):
|
||||||
rlen = len(arrayinfo[1])
|
rlen = len(arrayinfo[1])
|
||||||
arrayid += 1
|
arrayid += 1
|
||||||
arrayid = 0
|
controllerid += 1
|
||||||
|
|
||||||
|
controllerid = 0
|
||||||
|
while controllerid < controllernumber:
|
||||||
|
arrayid = 0
|
||||||
|
cmd = '%s -LDInfo -lall -a%d -NoLog' % (megaclipath, controllerid)
|
||||||
|
output = getOutput(cmd)
|
||||||
|
arraynumber = returnArrayNumber(output)
|
||||||
while arrayid < arraynumber:
|
while arrayid < arraynumber:
|
||||||
ldid = LDTable[controllerid][arrayid]
|
ldid = LDTable[controllerid][arrayid]
|
||||||
cmd = '%s -LDInfo -l%d -a%d -NoLog' % (megaclipath, ldid, controllerid)
|
cmd = '%s -LDInfo -l%d -a%d -NoLog' % (megaclipath, ldid, controllerid)
|
||||||
output = getOutput(cmd)
|
output = getOutput(cmd)
|
||||||
arrayinfo = returnArrayInfo(output,controllerid, LDTable[controllerid][arrayid])
|
arrayinfo = returnArrayInfo(output,controllerid, ldid)
|
||||||
ldfmt = str('%-5s | %-'+str(rlen)+'s | %7s | %7s | %'+str(mlen)+'s | %8s | %-7s | %-12s ')
|
ldfmt = str('%-5s | %-'+str(rlen)+'s | %7s | %7s | %'+str(mlen)+'s | %8s | %-7s | %-12s ')
|
||||||
# Header
|
# Header
|
||||||
if ( i == 0 ):
|
if ( i == 0 ):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user