View Realtime Requests Per Second From Log

so you want to view the number of requests to your webserver per second. here’s a quick and easy php script that you can run from command line.

    echo exec('cat /var/log/httpd/access_log | wc -l') . "n";

it isn’t perfect, but it will work for doing some basic troubleshooting. just hit ctrl+c to terminate.

and if you want to simulate a bunch of request so you can watch the num go up and down, here’s a script to help:

while(true) {

Published byJosh McGinnis

Josh is a software engineer, leader, startup advisor for the LA Chamber of Commerce and consultant residing in the Los Angeles area. Josh is passionate about helping entrepreneurs and businesses reach their maximum potential.

No Comments

Post a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.