Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Daniel-VDM/26787c9ab1c41293d0fdf5ce0d4d8800 to your computer and use it in GitHub Desktop.
Save Daniel-VDM/26787c9ab1c41293d0fdf5ce0d4d8800 to your computer and use it in GitHub Desktop.
node stats
./hmy --node=https://api.s0.os.hmny.io blockchain validator all | grep one1 | tr -d '",' > all
for x in `cat all`; do ./hmy --node=https://api.s0.os.hmny.io blockchain validator information $x | python -c 'import sys, json; print json.dumps(json.load(sys.stdin))'; done > info
< info python -c $'import sys, json\nfor x in sys.stdin:\n x = json.loads(x)["result"]["validator"]; y = x["availability"]; print "\t".join([x["name"], x["epos-eligibility-status"], str(y["num-blocks-signed"]), str(y["num-blocks-to-sign"]), x["website"], x["details"], x["address"]])' > info.tsv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment