| Advertise on warmetal.nl! Click for more information about advertising here. |
Did you find this website useful? Did I save you a lot of time? |
|
This is a small howto on how to analyze the amount of data requests for a webserver using the access log.
/var/log/apache2
bunzip2 access_log-20101226.bz2
This is the command to get the requests per minute from the access log. The last sorts on the amount of requests per minute:
cat access_log | awk '{gsub("\\[",""); split($4,a,":");printf("%s:%s:%s %s\n",a[1],a[2],a[3] ,$1)}' | sort | uniq -c | sort -nk1,1
Discussion