Last active
August 29, 2015 14:16
-
-
Save iolloyd/8019890bae5a1a322711 to your computer and use it in GitHub Desktop.
Find number of hits, size of max request and average size of requests
This file contains hidden or 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
cat /var/log/nginx/access.log | | |
awk '/200/ { | |
sum += $10; n++; if (m < $10) m = $10 | |
} END { | |
print sprintf("Entries %d, Max %dM, Ave %dM", n, m/1024, sum/n/1024); | |
}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment