Skip to content

Instantly share code, notes, and snippets.

@Adawin-net
Adawin-net / jormon.sh
Created January 11, 2020 14:54 — forked from michaeljfazio/jormon.sh
Jormungandr Node Monitor
#!/bin/bash
#
# Author: Michael Fazio (sandstone.io)
#
# This script monitors a Jormungandr node for "liveness" and executes a shutdown if the node is determined
# to be "stuck". A node is "stuck" if the time elapsed since last block exceeds the sync tolerance
# threshold. The script does NOT perform a restart on the Jormungandr node. Instead we rely on process
# managers such as systemd to perform restarts.
POLLING_INTERVAL_SECONDS=30