Created
September 14, 2020 15:30
-
-
Save dansku/97d4cbdd55416633348d4672c1bbc019 to your computer and use it in GitHub Desktop.
helium gatewau height checker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do | |
miner01=$(docker exec miner001 miner info height | awk '{print $2}') | |
miner02=$(docker exec miner002 miner info height | awk '{print $2}') | |
miner03=$(docker exec miner003 miner info height | awk '{print $2}') | |
folder01=$(du -hs minerdata001 | awk '{print $1}') | |
folder02=$(du -hs minerdata002 | awk '{print $1}') | |
folder03=$(du -hs minerdata003 | awk '{print $1}') | |
bloop=$(curl https://api.helium.io/v1/blocks/height) | |
blah=$(echo $bloop | rev | cut -d":" -f1 | rev) | |
actual=$(echo $blah | rev |cut -b 3- | rev) | |
clear | |
echo " " | |
echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-= " | |
date | |
echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-= " | |
echo " " | |
echo "Miner01 Height: $miner01 / $folder01" | |
echo "Miner02 Height: $miner02 / $folder02" | |
echo "Miner03 Height: $miner03 / $folder03" | |
echo " " | |
echo "Actual Height: $actual" | |
echo " " | |
echo "-=-=-=-=-=-=-=-=-=-=-=-=-=-= " | |
echo " " | |
sleep 600 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment