Skip to content

Instantly share code, notes, and snippets.

@doug-rosser
Created September 29, 2017 19:56
Show Gist options
  • Save doug-rosser/c63cf2d057a6ced07a510f9c07cbc0fd to your computer and use it in GitHub Desktop.
Save doug-rosser/c63cf2d057a6ced07a510f9c07cbc0fd to your computer and use it in GitHub Desktop.
[root@hoyt-mom ~]# cat get_compile_times.sh
#!/usr/bin/env bash
DATE="$1"
shift
for x in "$@"
do
egrep "Compiled catalog|Compiled static catalog" /var/log/puppetlabs/puppetserver/puppetserver.log | grep "^$DATE $x:" | awk '{print $16}' | python -c "import sys; print sum(float(l) for l in sys.stdin)"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment