Created
December 9, 2011 00:37
-
-
Save jpetazzo/1449496 to your computer and use it in GitHub Desktop.
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
# Find all minutes during which there was at least one "502" status code: | |
grep ' 502 ' http.log | awk '{print $4}' | cut -d: -f1-3 | uniq | |
# Find all minutes during which there were valid requests (excluding 502 and 400 status codes): | |
grep -v ' 502 ' http.log | grep -v ' 400 ' | awk '{print $4}' | cut -d: -f1-3 | uniq | |
# If you want hours instead of minutes, replace f1-3 by f1-2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment