Advertisement
fydel

drk_hashrate

Jul 26th, 2014
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.70 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. PATH=/usr/sbin:/usr/bin:/sbin:/bin
  4.  
  5. /usr/bin/wget -q http://happymining.de:7903/global_stats -O /tmp/global_stats.json
  6.  
  7. v_pool=`/usr/local/bin/jshon -Q -e pool_hash_rate < /tmp/global_stats.json`
  8. v_network=`/usr/local/bin/jshon -Q -e network_hashrate  < /tmp/global_stats.json`
  9. v_diff=`/usr/local/bin/jshon -Q -e network_block_difficulty  < /tmp/global_stats.json`
  10.  
  11. case $1 in
  12.    config)
  13.         cat <<'EOM'
  14. graph_category p2pool
  15. graph_vlabel hashrate
  16. graph_args --logarithmic
  17. graph_scale yes
  18. pool.label network hashrate
  19. network.label global hashrate
  20. graph_title network and global pool hashrate
  21. EOM
  22.  
  23.         exit 0;;
  24. esac
  25.  
  26. echo "pool.value" $v_pool
  27. echo "network.value" $v_network
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement