Last active
May 6, 2017 16:49
-
-
Save elhoyos/2f3d762a3d446716bc6bac6f51746d5f to your computer and use it in GitHub Desktop.
Print useful SEO info from webserver 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
# Given a log file with entries of the following form: | |
# 2017-05-06T16:42:54.392Z 66.249.64.58 200 GET /path/to-somewhere 27.020 ms - - "-" | |
# Print all slow Google bot requests | |
tail -f web-server.log | awk '{ip=$2; status=$3; time=$6; path=$5; if (ip ~ /66\.249\.64/ && time > 150) print time " (" status ") " path}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment