Added Sync Errors to parity history

This commit is contained in:
bergware
2016-10-29 11:44:22 +02:00
parent fb69a23201
commit 4bf7fd559b
6 changed files with 21 additions and 20 deletions
+2 -1
View File
@@ -380,8 +380,9 @@ case 'parity':
$duration = $var['sbSynced2'] - $var['sbSynced'];
$status = $var['sbSyncExit'];
$speed = ($status==0) ? my_scale($var['mdResyncSize']*1024/$duration,$unit,1)." $unit/s" : "Unavailable";
$error = $var['sbSyncErrs'];
$year = date('Y',$var['sbSynced2']);
if ($status==0||file_exists($log)) file_put_contents($log,"$year $timestamp|$duration|$speed|$status\n",FILE_APPEND);
if ($status==0||file_exists($log)) file_put_contents($log,"$year $timestamp|$duration|$speed|$status|$error\n",FILE_APPEND);
}
break;
}