Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am naamahdaemon on github.
  • I am naamahdaemon (https://keybase.io/naamahdaemon) on keybase.
  • I have a public key ASBK_it3h0Kd7L7v0AFn4cO7ulumfES43uYMaIof1ygXBAo

To claim this, I am signing this object:

@naamahdaemon
naamahdaemon / check_mina_uptime.sh
Created August 5, 2023 21:24
Check and highlight uptime problems with your mina bloc producer
#!/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;;'
@naamahdaemon
naamahdaemon / check_mina_logs.sh
Last active August 6, 2023 13:23
Get colored logs from mina logs
#!/bin/bash
# Default values for optional arguments
start_date="1 day ago"
end_date=""
fulllog=false
blockonly=false
block=""
log=""
live=false
mtail=""