New Script

This commit is contained in:
3err0
2019-06-03 13:24:11 +08:00
parent b514c686dd
commit f7d37e060a
2 changed files with 22 additions and 0 deletions
Executable
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
up=`/usr/bin/fping -c1 -t300 $1 &> /dev/null ; echo $?`
if [ $up = 0 ]; then
set -o errexit
set -o nounset
ADDRESS=$1
PORT=$2
stats_raw=`echo '{"id":0,"jsonrpc":"2.0","method":"miner_getstat1"}' | nc $ADDRESS $PORT | tr -d '\0\n'`
stats_raw=$(sed 's/}{/\},{/' <<< "$stats_raw")
#STATS=$(jq '.STATS' <<< "$stats_raw")
#echo $STATS
echo $stats_raw
fi
+1
View File
@@ -4,3 +4,4 @@
* AntMinerGetAllstats - Feech asic status JSON information * AntMinerGetAllstats - Feech asic status JSON information
* AntMinerGetAllpool - Feech asic pools JSON information * AntMinerGetAllpool - Feech asic pools JSON information
* rebootasic - Reboot asic wihtout ssh * rebootasic - Reboot asic wihtout ssh
* FarmGetstats - Get Claymor GPU Farm json information