Created
August 5, 2023 21:24
-
-
Save naamahdaemon/e54f9a249671825e904eaccc4fad47fa to your computer and use it in GitHub Desktop.
Check and highlight uptime problems with your mina bloc producer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
journalctl --user-unit mina -f -S "72h ago" | sed -E 's/.*: (.*)/\1/g; s/(.* Uptime service will attempt to send a block and SNARK work.*)/\x1b[37m\x1b[48;5;22m\1\x1b[0m/g; s/(.*Sent block with state.*)/\x1b[48;5;52m\1\x1b[0m/g; s/(.* Uptime service did not get a produced block within.*)/\x1b[1;37;41m\1\x1b[0m/g; /.*[0-9]+-[0-9]+-[0-9]+ [0-9]+:[0-9]+:[0-9]+/!d; /.* Duplicate producer and slot.*/d; /.*Received a block from \$sender.*/d; /.*time service.*/!d;;' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Really simple bash script to display and hightlight specific uptime problems with your Mina node.
You can also just launch the command line from your shell prompt :
You can also change the time frame of 72h for something that better suits your needs.
Usage
Result
Colored output of uptime highligthing request/response from the uptime server.
Example - Normal Output (no problem)
Example 2 - Recoverable / temporary Error
Example 3 - Unrecoverable error