I was running a parity sync and had an issue with one of my off-line drives which caused the web gui to stop responding. I found this post helpful in confirming that the parity check was still running. Thank you all. I anticipated not being able to access the gui for the duration of the sync, so I took the details from this thread and produced a bash script that replicates the information provided in the web gui:
#!/bin/bash
status=$(mdcmd status | sed -n 's/mdState=//p')
size=$(mdcmd status | sed -n 's/mdResync=//p')
pos=$(mdcmd status | sed -n 's/mdResyncPos=//p')
dt=$(mdcmd status | sed -n 's/mdResyncDt=//p')
db=$(mdcmd status | sed -n 's/mdResyncDb=//p')
gbsize=$(awk "BEGIN{ printf \"%.0f\",$size * 1024 / 1000^3}")
gbpos=$(awk "BEGIN{ printf \"%.0f\",$pos * 1024 / 1000^3}")
progress=$(awk "BEGIN{ printf \"%.1f\",($pos / $size) * 100}")
speed=$(awk "BEGIN{ printf \"%.1f\",($db/$dt) * 1024 / 1000^2}")
finish=$(awk "BEGIN{ m=(($dt*(($size-$pos)/($db/100+1)))/100)/60
print int(m/60) \"h \" int(m%60) \"m\"
}")
echo "Status: $status"
echo "Progress: $gbpos GB of $gbsize GB (${progress}%)"
echo "Speed: $speed MB/sec"
echo "Finish: $finish"
You can create this from the console using nano or vi. I saved as /boot/syncstatus, and made executable with `chmod +x /boot/syncstatus`
If you run this once it will output the current status:
Status: STARTED
Progress: 1101 GB of 4001 GB (27.5%)
Speed: 138.3 MB/sec
Finish: 5h 49m
If you want the information to continually update then you can use the `watch` command:
watch /boot/syncstatus
This will print the sync information and refresh the information every 2 seconds. You can change the polling period using the -n option (`watch -n 10 /boot/syncstatus` for every 10 seconds).