Advertisement
Guest User

Untitled

a guest
Sep 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.27 KB | None | 0 0
  1. NOW=$(date +"%m_%d_%y")
  2.  
  3.  
  4. log=/c/MO_log_$NOW.txt
  5.  
  6.  
  7. amtDue=$(eval "curl https://api.moneroocean.stream/miner/MYWALLET/stats | jq '.amtDue'")
  8.  
  9. XMRdue=`echo print $amtDue/1000000000000 | perl`
  10.  
  11. Hashrate=$(eval "curl https://api.moneroocean.stream/miner/MYWALLET/stats | jq '.hash2'")
  12.  
  13. Poolhr=$(eval "curl https://api.moneroocean.stream/pool/stats | jq '.pool_statistics.hashRate'")
  14.  
  15. Pending=$(eval "curl https://api.moneroocean.stream/pool/stats | jq '.pool_statistics.pending'")
  16. Netdiff=$(eval curl https://api.moneroocean.stream/network/stats | jq '.["18081"].difficulty')
  17. Nethr=`echo print $Netdiff/120 | perl`
  18. Blockreward=$(eval curl https://api.moneroocean.stream/network/stats | jq '.["18081"].value')
  19. BlockXMR=`echo print $Blockreward/1000000000000 | perl`
  20.  
  21. #myHRpercent=`echo print $Hashrate/$Poolhr | perl`
  22.  
  23. #myPending=`echo print $Pending*$myHRpercent | perl`
  24.  
  25. histHR=$(eval "curl https://api.moneroocean.stream/miner/MYWALLET/chart/hashrate | jq '.' > hashrate.json")
  26.  
  27. #echo histHR
  28.  
  29. totalHR=0
  30.  
  31. Poolblocks=$(eval "curl https://api.moneroocean.stream/pool/blocks | jq '.' > poolblocks.json")
  32.  
  33. shares=0
  34. diff=0
  35.  
  36. for((i=0;i<12;i++))
  37. do
  38. # echo $i
  39. shares=`echo print $shares+$(eval "cat poolblocks.json | jq '.[$i].shares'") | perl`
  40. # echo shares:$shares
  41. diff=`echo print $diff+$(eval "cat poolblocks.json | jq '.[$i].diff'") | perl`
  42. # echo diff:$diff
  43.  
  44. done
  45.  
  46. effort=`echo print $shares/$diff*100 | perl`
  47.  
  48.  
  49. for((i=1;i<479;i++))
  50.  
  51. do
  52.  
  53. # echo $i
  54.  
  55. totalHR=`echo print $totalHR+$(eval "cat hashrate.json | jq '.[$i].hs2'") | perl`
  56.  
  57. # echo totalHR:$totalHR
  58.  
  59. # echo avgHR:$avgHR
  60.  
  61. done
  62.  
  63.  
  64. avgHR=`echo print $totalHR/$i | perl`
  65.  
  66. myHRpercent=`echo print $avgHR/$Poolhr | perl`
  67.  
  68. myPending=`echo print $Pending*$myHRpercent | perl`
  69.  
  70.  
  71.  
  72. echo i:$i
  73.  
  74. echo avgHR:$avgHR
  75.  
  76. echo amtDue:$amtDue
  77.  
  78. echo XMRdue:$XMRdue
  79.  
  80. echo Hashrate:$Hashrate
  81.  
  82. echo Poolhr:$Poolhr
  83.  
  84. echo Pending:$Pending
  85.  
  86. echo myHRpercent:$myHRpercent
  87.  
  88. echo myPending:$myPending
  89. echo Nethr:$Nethr
  90.  
  91. echo BlockXMR:$BlockXMR
  92. echo effort:$effort
  93.  
  94.  
  95. date +"%H:%M" >> $log
  96.  
  97.  
  98.  
  99. echo ' 'XMRdue: $XMRdue, Hashrate: $Hashrate, avgHR: $avgHR, Poolhr: $Poolhr, Pending: $Pending, myHRpercent: $myHRpercent, myPending: $myPending, Nethr: $Nethr, BlockXMR: $BlockXMR, effort: $effort$'\r' >> $log
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement