Last active
December 5, 2017 05:05
-
-
Save avoronkin/529927664a861ac3a9de332ac0faf575 to your computer and use it in GitHub Desktop.
nginx requests count
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
grep "05/Dec" /var/log/nginx/access.log | grep GET | cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":00"}' | sort -n | uniq -c |
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
grep "05/Dec/2017:07" /var/log/nginx/access.log| cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":"$3}' | sort -nk1 -nk2 | uniq -c | awk '{ if ($1 > 10) print $0}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment