parent
1a38a6d6a3
commit
ae42634a8e
2 changed files with 25 additions and 9 deletions
|
|
@ -45,6 +45,10 @@ KNOWN_DISK_MODELS = {
|
||||||
r'CT(250|500|1000|2000)MX500SSD(1|4)': {
|
r'CT(250|500|1000|2000)MX500SSD(1|4)': {
|
||||||
197: {'Warning': 1, 'Error': 2, 'Note': '(MX500 thresholds)',},
|
197: {'Warning': 1, 'Error': 2, 'Note': '(MX500 thresholds)',},
|
||||||
},
|
},
|
||||||
|
r'MZ(7|N)LN(128|256|512|1T0)HA(HQ|JQ|LR)-000H(1|7)': {
|
||||||
|
# Source: https://www.smartmontools.org/ticket/920
|
||||||
|
201: {'Error': 99, 'PercentageLife': True, 'Note': '(PM871b thresholds)'},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
KNOWN_RAM_VENDOR_IDS = {
|
KNOWN_RAM_VENDOR_IDS = {
|
||||||
# https://github.com/hewigovens/hewigovens.github.com/wiki/Memory-vendor-code
|
# https://github.com/hewigovens/hewigovens.github.com/wiki/Memory-vendor-code
|
||||||
|
|
|
||||||
|
|
@ -210,7 +210,10 @@ class Disk(BaseObj):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# Check attribute
|
# Check attribute
|
||||||
if err_thresh <= value['raw'] < max_thresh:
|
if known_attributes[attr].get('PercentageLife', False):
|
||||||
|
if 0 <= value['raw'] <= err_thresh:
|
||||||
|
attributes_ok = False
|
||||||
|
elif err_thresh <= value['raw'] < max_thresh:
|
||||||
attributes_ok = False
|
attributes_ok = False
|
||||||
|
|
||||||
# Done
|
# Done
|
||||||
|
|
@ -259,14 +262,23 @@ class Disk(BaseObj):
|
||||||
label = f' {label.replace("_", " "):38}'
|
label = f' {label.replace("_", " "):38}'
|
||||||
|
|
||||||
# Value color
|
# Value color
|
||||||
for threshold, color in ATTRIBUTE_COLORS:
|
if known_attributes[attr].get('PercentageLife', False):
|
||||||
threshold_val = known_attributes[attr].get(threshold, None)
|
# PercentageLife values
|
||||||
if threshold_val and value['raw'] >= threshold_val:
|
if 0 <= value['raw'] <= known_attributes[attr]['Error']:
|
||||||
value_color = color
|
value_color = 'RED'
|
||||||
if threshold == 'Error':
|
note = '(failed, % life remaining)'
|
||||||
note = '(failed)'
|
elif value['raw'] < 0 or value['raw'] > 100:
|
||||||
elif threshold == 'Maximum':
|
value_color = 'PURPLE'
|
||||||
note = '(invalid?)'
|
note = '(invalid?)'
|
||||||
|
else:
|
||||||
|
for threshold, color in ATTRIBUTE_COLORS:
|
||||||
|
threshold_val = known_attributes[attr].get(threshold, None)
|
||||||
|
if threshold_val and value['raw'] >= threshold_val:
|
||||||
|
value_color = color
|
||||||
|
if threshold == 'Error':
|
||||||
|
note = '(failed)'
|
||||||
|
elif threshold == 'Maximum':
|
||||||
|
note = '(invalid?)'
|
||||||
|
|
||||||
# 199/C7 warning
|
# 199/C7 warning
|
||||||
if str(attr) == '199' and value['raw'] > 0:
|
if str(attr) == '199' and value['raw'] > 0:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue