Skip to main content

Linux tips

check if ports are open

nc -vz <host> <port>

see cpu frequencies

lscpu --all --extended

get more disk space by limiting reserved space for root

tune2fs -m0 /dev/<disk>

get disk space information

du -sh /home/polkadot/*
df -h

rotatekeys

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_rotateKeys", "params":[]}' http://localhost:9900 > session.key

check session keys

curl -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "author_hasSessionKeys", "params":["<session key 0x.....>"]}' http://localhost:<rpc port>