dak180 / FreeNAS-Report

SMART & ZPool Status Report for FreeNAS/TrueNAS
GNU General Public License v3.0
38 stars 8 forks source link

Colorize smart test status for SAS drives #10

Closed mth309 closed 2 years ago

mth309 commented 2 years ago

I don't have any SAS drives that are currently failing self tests, but these changes work fine on my servers with healthy SAS drives. They detect the "passing" state of no LBA or KCQ listed in the self test result (i.e. "- [ - - - ]") and set the color to the normal background color. Any deviation from this expected pattern would indicate a self test failure and use the critical color instead.

I set it up to mimic the previous code on SATA drives, and to be "ready" for if json format is supported in the future.