|
|
@ -24,17 +24,19 @@ while getopts "h" opt; do |
|
|
|
esac |
|
|
|
esac |
|
|
|
done |
|
|
|
done |
|
|
|
|
|
|
|
|
|
|
|
#cd $HOME |
|
|
|
currentBlockHeight="otherHeight" |
|
|
|
#check if you're in snych |
|
|
|
myBlockChainHeight="myHeight" |
|
|
|
heightStatus=$(grep otherHeight ./latest/validator*.log | egrep -o "myHeight(.*)([0-9]+)," | tail -n 1) |
|
|
|
|
|
|
|
|
|
|
|
heightStatus=$(grep $currentBlockHeight ./latest/validator*.log | egrep -o $myBlockChainHeight"(.*)([0-9]+)," | tail -n 1) |
|
|
|
|
|
|
|
|
|
|
|
# Which Shard |
|
|
|
# Which Shard |
|
|
|
my_shard=$(egrep -o "shard\/[0-9]+" ./latest/validator*.log | tail -n 1) |
|
|
|
my_shard=$(egrep -o "shardID\"\:[0-9]+" ./latest/validator*.log | tail -n 1 | cut -f2 -d ":") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Which IP |
|
|
|
# Which IP |
|
|
|
ip=$(curl http://169.254.169.254/latest/meta-data/public-ipv4) |
|
|
|
ip=$(curl -s http://169.254.169.254/latest/meta-data/public-ipv4) |
|
|
|
|
|
|
|
|
|
|
|
bingos=$(grep -c "BINGO" ./latest/*log) |
|
|
|
bingos=$(grep -c "BINGO" ./latest/validator*log) |
|
|
|
|
|
|
|
|
|
|
|
# balances=$(./wallet.sh balances) |
|
|
|
# balances=$(./wallet.sh balances) |
|
|
|
|
|
|
|
|
|
|
@ -42,6 +44,7 @@ status=$(tac ./latest/* | egrep -m1 'BINGO|HOORAY' | \ |
|
|
|
grep ViewID | \ |
|
|
|
grep ViewID | \ |
|
|
|
python -c $'import datetime, sys, json;\nfor x in sys.stdin:\n y = json.loads(x); print "%10s %s %s" % (y.get("ViewID", "*" + str(y.get("myViewID", 0))), datetime.datetime.strftime(datetime.datetime.strptime(y["t"][:-4], "%Y-%m-%dT%H:%M:%S.%f") + datetime.timedelta(hours=-7), "%m/%d %H:%M:%S.%f"), y["ip"])') |
|
|
|
python -c $'import datetime, sys, json;\nfor x in sys.stdin:\n y = json.loads(x); print "%10s %s %s" % (y.get("ViewID", "*" + str(y.get("myViewID", 0))), datetime.datetime.strftime(datetime.datetime.strptime(y["t"][:-4], "%Y-%m-%dT%H:%M:%S.%f") + datetime.timedelta(hours=-7), "%m/%d %H:%M:%S.%f"), y["ip"])') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
lengthOfChain=$(cat $status | cut -f1 -d " ") |
|
|
|
#sudo /sbin/ldconfig -v |
|
|
|
#sudo /sbin/ldconfig -v |
|
|
|
#nodeVersion=$(LD_LIBRARY_PATH=$(pwd) ./harmony -version) |
|
|
|
#nodeVersion=$(LD_LIBRARY_PATH=$(pwd) ./harmony -version) |
|
|
|
|
|
|
|
|
|
|
@ -51,11 +54,11 @@ status=$(tac ./latest/* | egrep -m1 'BINGO|HOORAY' | \ |
|
|
|
|
|
|
|
|
|
|
|
#echo "Your Node Version : " |
|
|
|
#echo "Your Node Version : " |
|
|
|
LD_LIBRARY_PATH=$(pwd) ./harmony -version |
|
|
|
LD_LIBRARY_PATH=$(pwd) ./harmony -version |
|
|
|
echo "Your System Status : "$status |
|
|
|
echo "Current Length of Chain : "$lengthOfChain |
|
|
|
echo "Your Sync Status : "$heightStatus |
|
|
|
echo "Your Sync Status : "$heightStatus |
|
|
|
echo "Your Shard : " $my_shard |
|
|
|
echo "Your Shard : " $my_shard |
|
|
|
echo "Your IP: " $ip |
|
|
|
echo "Your IP: " $ip |
|
|
|
echo "Blocks Received : " $bingos |
|
|
|
echo "Total Blocks Received After Syncing: " $bingos |
|
|
|
echo "Your Rewards: " |
|
|
|
echo "Your Rewards: " |
|
|
|
./wallet.sh balances |
|
|
|
./wallet.sh balances |
|
|
|
|
|
|
|
|