diff --git a/lib/Site/ZpoolScrub.pm b/lib/Site/ZpoolScrub.pm index e7e56b87b7b2f925083fa028d52971d6c0165fc9..47e18b171ac4a9ccc7e67c99c6bd9cc12f02b398 100644 --- a/lib/Site/ZpoolScrub.pm +++ b/lib/Site/ZpoolScrub.pm @@ -90,6 +90,8 @@ sub handler { scan: scrub repaired 0 in 78h6m with 0 errors on Tue Mar 29 00:16:48 2016 - or - scan: scrub repaired 0B in 0 days 09:55:51 with 0 errors on Thu Mar 7 01:46:05 2019 + - or - + scan: scrub repaired 0B in 14:02:48 with 0 errors on Fri Oct 1 16:02:50 2021 - or - scan: scrub in progress since Tue Mar 29 19:09:47 2016 14.3G scanned out of 47.0G at 172M/s, 0h3m to go @@ -127,8 +129,8 @@ sub handler { $when += 60*$howlong; $repaired += $errors if $repaired < $errors; } - elsif (/^\s*scan:\s+scrub\s+repaired\s+(\d*)\s+in\s+(\d*)h(\d*)m\s+with\s+(\d*)\s+errors\s+on\s+(.+)$/){ - ($repaired,$h,$m,$errors,$when) = ($1,$2,$3,$4,$5); + elsif (/^\s*scan:\s+scrub\s+repaired\s+(\d*B*)\s+in\s+(\d*)[h\:](\d*)[m\:](\d*)\s+with\s+(\d*)\s+errors\s+on\s+(.+)$/){ + ($repaired,$h,$m,$s,$errors,$when) = ($1,$2,$3,$4,$5,$6); $when = `$DATE '+%s'` - `$DATE '+%s' -d "$when"`; $howlong = 60*$h+$m; $when += 60*$howlong;