Closed ymartin-ovh closed 1 year ago
User given value ovetake 90% default value:
./check_smart.pl --skip-load-cycles -l -i auto -g '/dev/{sdb,sda}' -w Percent_Lifetime_Remain=85
OK: [/dev/sdb] - Device is clean [/dev/sdb] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 85) --- [/dev/sda] - Device is clean [/dev/sda] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 85)|
./check_smart.pl --skip-load-cycles -l -i auto -g '/dev/{sdb,sda}' -w Percent_Lifetime_Remain=95
OK: [/dev/sdb] - Device is clean [/dev/sdb] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 95) --- [/dev/sda] - Device is clean [/dev/sda] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 95)|
Default threshold is set to 90:
./check_smart.pl --skip-load-cycles -l -i auto -g '/dev/{sdb,sda}'
OK: [/dev/sdb] - Device is clean [/dev/sdb] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 90) --- [/dev/sda] - Device is clean [/dev/sda] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 90)|
If -w is given with an another threshold, default value is still set to 90:
./check_smart.pl --skip-load-cycles -l -i auto -g '/dev/{sdb,sda}' -w toto=2
OK: [/dev/sdb] - Device is clean [/dev/sdb] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 90) --- [/dev/sda] - Device is clean [/dev/sda] - Percent_Lifetime_Remain is non-zero (2) (but less than threshold 90)|
…en (issue #92)
Address issue when threshold is not set in the following case: check_smart -i auto -g '/dev/sda' -w Reallocated_Sector_Ct=250 -l
Instead of 90, the threshold is 0 when -w is given without Percent_Lifetime_Remain threshold.