Added Hashrate chain element

This commit is contained in:
2022-02-27 14:18:50 +08:00
parent f0ba2c2fd1
commit 989c26de60
15 changed files with 5815 additions and 5649 deletions
+21 -21
View File
@@ -1,21 +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
#!/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