Skip to content

Instantly share code, notes, and snippets.

@nathants
Last active August 20, 2022 08:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
a small and colorful format to tail tinysnitch logs
# tinysnitch: https://github.com/nathants/tinysnitch
# color: https://gist.github.com/nathants/336bc5e501ad174aeeb7986f2b0633e4
# count-last: https://gist.github.com/nathants/f6d3f2cd4147af102c65a69a7e729b53
# The MIT License (MIT)
# Copyright (c) 2022-present Nathan Todd-Stone
# https://en.wikipedia.org/wiki/MIT_License#License_terms
# colorful snitch logs
tail -f /tmp/tinysnitch.log \
| sed -ur 's:(tcp|udp) [^ ]+ \->:\1:' \
| grep --line-buffered -v -e :51820$ -e :53$ \
| color tcp:blue udp:cyan dns:magenta icmp:yellow allow:green deny:red \
| count-last
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment