Created
April 2, 2015 02:39
-
-
Save baldur/e5432c2650e10c42f7d9 to your computer and use it in GitHub Desktop.
quick data gathering from logs
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
if [ "$1" != "" ]; then | |
format=$1 | |
else | |
format=mapbox | |
fi | |
echo "count for zoom" | |
cat *.log | grep -e "304\|200$" | grep "\.$format" | grep -v "_healthcheck" | awk -F"/" ' { print $(NF - 2) }' | sort | uniq -c | sort -n | |
echo "top paths" | |
cat *.log | grep -e "304\|200$" | grep "\.$format" | grep -v "_healthcheck" | awk '{ print $(NF -1) }' | sort | uniq -c | sort -n | tail -n 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment