Skip to content

simple node monitoring

walkjivefly edited this page Nov 18, 2022 · 4 revisions

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:

Screenshot_2022-11-18_14-15-19

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.

Screenshot_2022-11-11_20-44-29

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.

Clone this wiki locally