Skip to content

Instantly share code, notes, and snippets.

Avatar

Rafal Zdziech m00nh3ck

View GitHub Profile
View web server log analysis cheat sheet
# get total requests by status code
awk '{print $9}' /var/log/nginx/access.log | sort | uniq -c | sort -rn
# get top requesters by IP
awk '{print $1}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head | awk -v OFS='\t' '{"host " $2 | getline ip; print $0, ip}'
# get top requesters by user agent
awk -F'"' '{print $6}' /var/log/nginx/access.log | sort | uniq -c | sort -rn | head
# get top requests by URL
@m00nh3ck
m00nh3ck / cloudSettings
Created Aug 4, 2017
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2017-08-04T12:51:31.853Z","extensionVersion":"v2.8.2"}