New script
This commit is contained in:
Executable
+20
@@ -0,0 +1,20 @@
|
|||||||
|
#!/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
|
||||||
|
|
||||||
|
pools_raw=`echo '{"command":"pools"}' | nc $ADDRESS $PORT | tr -d '\0\n'`
|
||||||
|
pools_raw=$(sed 's/}{/\},{/' <<< "$pools_raw")
|
||||||
|
POOLS=$(jq '.POOLS' <<< "$pools_raw")
|
||||||
|
|
||||||
|
#fan_num=$(jq -r '.[1].fan_num' <<< "$STATS")
|
||||||
|
|
||||||
|
echo $POOLS
|
||||||
|
fi
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
**#Antminer scripts (Antminer S9, L3 ...)**
|
**#Antminer scripts (Antminer S9, L3 ...)**
|
||||||
|
|
||||||
AntMinerGetAllstats - Feech asic JSON information
|
AntMinerGetAllstats - Feech asic status JSON information
|
||||||
|
|
||||||
|
AntMinerGetAllpool - Feech asic pools JSON information
|
||||||
|
|
||||||
rebootasic - Reboot asic wihtout ssh
|
rebootasic - Reboot asic wihtout ssh
|
||||||
|
|||||||
Reference in New Issue
Block a user