Use Apache Access Log for Load testing
For load testing a CMS site just hammering /index.php using ab (Apache Bench) isn’t sufficient, more URL’s needed to be tested. I want to use the accesslog for that. Further on i want to use this as input for http_load which takes this file as base for hammering the CMS with urls that real users would access…
# cd /var/log/apache2
Get the accesslog, grep for a specific unique string that identifies my vhost/cms i want to test, split the line by space-character, return column 11, remove double-quotes:
# grep "something_unique" access_log | cut -d " " -f 11 | tr -d '"'
Example usage
The customers CMS runs under customer-cms.example.com:
# grep "customer-cms.example.com" access_log | cut -d " " -f 11 | tr -d '"' > customer-cms.http_load.log