edgarsuit / FreeNAS-Report

SMART & ZPool Status Report for FreeNAS
GNU General Public License v3.0
113 stars 45 forks source link

Last Test Age incorrect when power on time >65535 hours #30

Open hkorth opened 3 years ago

hkorth commented 3 years ago

The "Last Test Age (days)" is reported incorrectly in the SMART report table when the power on time >65535 hours. This seems to be because the life time hours reported by smartctl test table is a 16 bit value and rolls over at 65536 while the power on time does not. So math goes bad. This seems to be a limitation on smartctl. Perhaps there is not much one can do about this other than assuming that the most recent test is more recent than 65535 hours and then subtract multiple of this from the power on time and use the remainder.

dak180 commented 1 year ago

Does this work in #28?