Bash scripts for managing safe nodes on Linux

  • Identify nodes without good peers to contact, thus needing a restart.

This approach uses the log output only and probably is more reliable than counting connections.

Rocky Linux 9.4, bash

#The following is run from the logs directory of a node
cat "safenode.log" | grep -e "Skip bad_nodes check" -e "Performing"
#If the last item contains "Skip" then the number of nodes "in the RT" is "too small" and we should do a new bootstrap. A bootstrap shows up in the log as "Performing" a bootsrap.

This is incorporated in snnm v0.5.0+, which also can launch vdash by specifying a port number instead of a path and many more improvements.

4 Likes