mirror of
https://github.com/eLvErDe/hwraid.git
synced 2025-07-25 23:04:44 +02:00
Very minor bugfixes (Rev 1.22)
This commit is contained in:
parent
5cc2dac181
commit
d37cb2451b
@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/python
|
#!/usr/bin/python
|
||||||
# $Id: megaclisas-status,v 1.21 2015/03/27 03:21:08 root Exp $
|
# $Id: megaclisas-status,v 1.22 2015/03/27 13:27:18 root Exp $
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
@ -423,10 +423,10 @@ if totalunconfdrivenumber:
|
|||||||
mlen = 0
|
mlen = 0
|
||||||
flen = 0
|
flen = 0
|
||||||
for array in arraydisk:
|
for array in arraydisk:
|
||||||
if( len(array[3]) >= mlen):
|
if( len(array[1]) >= mlen):
|
||||||
mlen = len(array[3])
|
mlen = len(array[1])
|
||||||
if( len(array[5]) >= flen):
|
if( len(array[3]) >= flen):
|
||||||
flen = len(array[5])
|
flen = len(array[3])
|
||||||
# Adjust print format with widths computed above
|
# Adjust print format with widths computed above
|
||||||
drvfmt = "%-8s | %-4s | %-"+str(mlen)+"s | %-8s | %-"+str(flen)+"s | %-8s | %-4s | %-8s | %-8s"
|
drvfmt = "%-8s | %-4s | %-"+str(mlen)+"s | %-8s | %-"+str(flen)+"s | %-8s | %-4s | %-8s | %-8s"
|
||||||
i = 0
|
i = 0
|
||||||
@ -437,13 +437,15 @@ if totalunconfdrivenumber:
|
|||||||
"-- ID", "Type", "Drive Model", "Size", "Status", "Speed", "Temp", "Slot ID", "LSI Device ID")
|
"-- ID", "Type", "Drive Model", "Size", "Status", "Speed", "Temp", "Slot ID", "LSI Device ID")
|
||||||
# Drive information
|
# Drive information
|
||||||
print drvfmt % (
|
print drvfmt % (
|
||||||
str('c'+str(controllerid)+'uXpY\t| '+array[0]), # cXpY
|
str('c'+str(controllerid)+'uXpY'), # cXpY
|
||||||
array[1], # HDD/SDD
|
array[0], # HDD/SDD
|
||||||
array[2], # Model Information (Variable len)
|
array[1], # Model Information (Variable len)
|
||||||
array[3], # Size
|
array[2], # Size
|
||||||
array[4], # Status (Variable len)
|
array[3], # Status (Variable len)
|
||||||
str('['+array[5]+':'+array[6]+']'), # Slot ID
|
array[4], # Speed
|
||||||
array[7]) # LSI ID
|
array[5], # Temp
|
||||||
|
str('['+array[6]+':'+array[7]+']'), # Slot ID
|
||||||
|
array[8]) # LSI ID
|
||||||
i = i + 1
|
i = i + 1
|
||||||
controllerid += 1
|
controllerid += 1
|
||||||
print ''
|
print ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user