Skip to content

Instantly share code, notes, and snippets.

@Dieterbe
Created August 14, 2015 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Dieterbe/de6d85fbef44a3c29f79 to your computer and use it in GitHub Desktop.
Save Dieterbe/de6d85fbef44a3c29f79 to your computer and use it in GitHub Desktop.
#!/bin/bash
# run this after sourcing env.sh
# the sed is to strip color escape sequences
awk '/DIETERPUBLISHED/ {print $5}' $PUB | sort -n | uniq | sed 's/\x1B\[[0-9;]*[JKmsu]//g' > pub-ids.txt
awk '/DIETER/ {print $5}' $CON $CON2 | sort -n | uniq > con-ids.txt
diff pub-ids.txt con-ids.txt
# source this
export PUB=$(ls -1tr /var/lib/docker/volumes/*/_data/grafana-dev.log | tail -n 1)
export CON=$(docker inspect $(docker ps | grep nsq_to_kairos | cut -f1 -d' ') | awk '/var\/log\/raintank.*volumes/ {print $2}' | tr -d '"')/nsq-to-kairos.log
export CON2=$(docker inspect $(docker ps | grep nsq_to_kairos | cut -f1 -d' ') | awk '/var\/log\/raintank.*volumes/ {print $2}' | tr -d '"')/nsq-to-kairos2.log
function lookfor () {
grep "$1" $PUB $CON $CON2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment