User Tools

Site Tools


log_hits

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
log_hits [2016/08/02 18:51] luke7858log_hits [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 61: Line 61:
 **Note:** Change date range and log file locationg **Note:** Change date range and log file locationg
 <sxh bash> <sxh bash>
-LC_ALL=C awk '/09\/Jun\/2016/ && $0 !~ /(.js|.png|.jpg|.css|.ico) HTTP/' /var/log/httpd/lukeslinux.co.uk | cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":00"}' | sort -n | uniq -c+LC_ALL=C awk '/02\/Aug\/2016/ && $0 !~ /(.js|.png|.jpg|.css|.ico) HTTP|.*Monitoring/' /var/log/nginx/exampledomain.com | cut -d[ -f2 | cut -d] -f1 | awk -F: '{print $2":00"}' | sort -n | uniq -c
 </sxh> </sxh>
 \\ \\
Line 67: Line 67:
 **Note:** Change date/time and log file location **Note:** Change date/time and log file location
 <sxh bash> <sxh bash>
-LC_ALL=C awk -F \" '/09\/Jun\/2016:(10:[12345]|11:[01])/ && $0 !~ /(.js|.png|.jpg|.css|.ico) HTTP/ {REQ[$2]++}END{for (i in REQ) print REQ[i],i}' /var/log/httpd/lukeslinux.co.uk | sort -rn | head -50+LC_ALL=C awk -F \" '/09\/Jun\/2016:(10:[12345]|11:[01])/ && $0 !~ /(.js|.png|.jpg|.css|.ico) HTTP/ {REQ[$2]++}END{for (i in REQ) print REQ[i],i}' /var/log/httpd/lexampledomain.com | sort -rn | head -50
 </sxh> </sxh>
log_hits.1470163871.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki