FreeNAS-Report icon indicating copy to clipboard operation
FreeNAS-Report copied to clipboard

Last Test Age incorrect when power on time >65535 hours

Open hkorth opened this issue 3 years ago • 1 comments

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.

hkorth avatar Jul 04 '21 17:07 hkorth

Does this work in #28?

dak180 avatar Jan 10 '23 18:01 dak180