Skip to content

Instantly share code, notes, and snippets.

@dansku
Created September 14, 2020 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dansku/97d4cbdd55416633348d4672c1bbc019 to your computer and use it in GitHub Desktop.
Save dansku/97d4cbdd55416633348d4672c1bbc019 to your computer and use it in GitHub Desktop.
helium gatewau height checker
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