New Script
This commit is contained in:
Executable
+21
@@ -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
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user