Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache historical connections log

Doe anyone know if it's possible to identify the number of connections that a server has had over a given period of time?

are there any logs that keep that kind of information?

Thanks

like image 789
Brob Avatar asked May 30 '11 19:05

Brob


People also ask

Where are Apache logs kept?

In Linux, Apache commonly writes logs to the /var/log/apache2 or /var/log/httpd directories depending on your OS and Virtual Host overrides. You can also define a LogFormat string after the filename, which will only apply the format string to this file.

What is httpd access log?

What are Apache Access Logs? As mentioned above, the Apache access log is one of several log files produced by an Apache HTTP server. This particular log file is responsible for recording data for all requests processed by the Apache server.


2 Answers

You can use "grep" to get all the lines from the access.log that contain a certain date/time (or range) (and other filter criteria) and pipe it to "wc -l" to count the number of lines, which will give you the number of requests.

like image 124
rightstuff Avatar answered Sep 28 '22 04:09

rightstuff


I not really sure, but did you have a look at access.log? Under linux its usually at /var/log/apach2/access.log. Where it is located on your system is defined in yur httpd.conf or one other parsed apache configuration.

like image 39
KingCrunch Avatar answered Sep 28 '22 04:09

KingCrunch