Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NOW=$(date +"%m_%d_%y")
- log=/c/MO_log_$NOW.txt
- amtDue=$(eval "curl https://api.moneroocean.stream/miner/MYWALLET/stats | jq '.amtDue'")
- XMRdue=`echo print $amtDue/1000000000000 | perl`
- Hashrate=$(eval "curl https://api.moneroocean.stream/miner/MYWALLET/stats | jq '.hash2'")
- Poolhr=$(eval "curl https://api.moneroocean.stream/pool/stats | jq '.pool_statistics.hashRate'")
- Pending=$(eval "curl https://api.moneroocean.stream/pool/stats | jq '.pool_statistics.pending'")
- Netdiff=$(eval curl https://api.moneroocean.stream/network/stats | jq '.["18081"].difficulty')
- Nethr=`echo print $Netdiff/120 | perl`
- Blockreward=$(eval curl https://api.moneroocean.stream/network/stats | jq '.["18081"].value')
- BlockXMR=`echo print $Blockreward/1000000000000 | perl`
- #myHRpercent=`echo print $Hashrate/$Poolhr | perl`
- #myPending=`echo print $Pending*$myHRpercent | perl`
- histHR=$(eval "curl https://api.moneroocean.stream/miner/MYWALLET/chart/hashrate | jq '.' > hashrate.json")
- #echo histHR
- totalHR=0
- Poolblocks=$(eval "curl https://api.moneroocean.stream/pool/blocks | jq '.' > poolblocks.json")
- shares=0
- diff=0
- for((i=0;i<12;i++))
- do
- # echo $i
- shares=`echo print $shares+$(eval "cat poolblocks.json | jq '.[$i].shares'") | perl`
- # echo shares:$shares
- diff=`echo print $diff+$(eval "cat poolblocks.json | jq '.[$i].diff'") | perl`
- # echo diff:$diff
- done
- effort=`echo print $shares/$diff*100 | perl`
- for((i=1;i<479;i++))
- do
- # echo $i
- totalHR=`echo print $totalHR+$(eval "cat hashrate.json | jq '.[$i].hs2'") | perl`
- # echo totalHR:$totalHR
- # echo avgHR:$avgHR
- done
- avgHR=`echo print $totalHR/$i | perl`
- myHRpercent=`echo print $avgHR/$Poolhr | perl`
- myPending=`echo print $Pending*$myHRpercent | perl`
- echo i:$i
- echo avgHR:$avgHR
- echo amtDue:$amtDue
- echo XMRdue:$XMRdue
- echo Hashrate:$Hashrate
- echo Poolhr:$Poolhr
- echo Pending:$Pending
- echo myHRpercent:$myHRpercent
- echo myPending:$myPending
- echo Nethr:$Nethr
- echo BlockXMR:$BlockXMR
- echo effort:$effort
- date +"%H:%M" >> $log
- 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