Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Helpful Linux Commands

djSiMuL edited this page Jan 23, 2019 · 5 revisions

Show Masternode's Current Block:

curl -sS -X POST --header "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":88}' 172.18.0.3:8545 | grep -Po 'result":"0x\K[^"]+' | tr [a-z] [A-Z] | echo "ibase=16; $(cat -)" | bc

Show Current Chaindata Size:

sudo du -hs /var/lib/docker/volumes/[your-node-name]_chaindata/_data/data/tomo/chaindata

Make sure you replace "[your-node-name]" with the correct name for your masternode. For example, if your node name is tomo-fomo-1, then the full path would look like this: /var/lib/docker/volumes/tomo-fomo-1_chaindata/_data/data/tomo/chaindata

Show Public IP Address:

dig +short myip.opendns.com @resolver1.opendns.com

Show All Listening Ports:

sudo netstat -ntlp | grep LISTEN