-
Notifications
You must be signed in to change notification settings - Fork 6
simple node monitoring
This is a script I use in conjunction with the watch
command to keep an eye on the status of a masternode/systemnode. I call it monitor
and create it in $HOME/bin
so it's in the default $PATH in the recommended VPS setup. Then I leave an ssh session connected to each node and leave the script running by
watch -n15 monitor
It continuously displays:
- the node status,
- its current block height,
- the explorer block height (can be disabled if the explorer is known to be down),
- how many stakepointers it has,
- the node uptime (in seconds),
- and IP addresses of its peers.
For example:
If you have more than one node you can tile windows to make it easy to compare block heights across nodes and help spot ones which may be unsynced or experiencing other problems. In the following example (from an earlier version and a different genesis block) one node is 25 blocks adrift from its companions and should be investigated.
If the explorer is known to be down I start the script by
watch -n15 monitor noex
so that it doesn't experience a long timeout trying to get the explorer block height.