Analyze Basic Workload information of a Server through Web Server Logs
One of the easiest and simplest ways to analyze the work load information of a server is through the analysis of web server HTTP access logs. A web server's HTTP access log can contain information like Date-Time stamp, Client-IP, Request-URL, Status Code, Time-Taken (Processing Time), Cookie information etc. (these fields can change with the different logging formats).
-Date Time : the time stamp at which request arrives.
-Client-IP : the IP-Address of the machine from which the request came.
-Request-URL : the page URL requested by the client.
-Status Code : an entry which indicates whether the request is successfully served or not.
-Processing-Time : the time taken by the server to process a given URL request.
-Cookies field : the cookie information.
An example for web server log generated by Apache server is given below.
##IPADDRESS## - - [29/Jun/2010:03:23:51 +0000] "GET /MyApp/SignUp.jsf HTTP/1.1" 200 661
##IPADDRESS## - - [29/Jun/2010:03:25:31 +0000] "POST /MyApp/SearchCompany.jsf HTTP/1.1" 200 14088
##IPADDRESS## - - [29/Jun/2010:03:26:28 +0000] "POST /MyApp/SelectCompany.jsf HTTP/1.1" 200 2155
##IPADDRESS## - - [29/Jun/2010:03:26:32 +0000] "POST /MyApp/CompanyDetail.jsf HTTP/1.1" 200 2355
To examine the number of request processed by the server, Date-Time field is required in log file. With the help of web log analysis tool (like Microsoft Log Parser 2.2, Sawmill, Lizard Log parser etc.) we will be able to find out the number of request coming to the server over a period of time. One can achieve this by querying the number of entries in the log file at any point of time against the Date-Time field. These results can be further analyzed to figure out the request arrival rate across different sampling time interval (per Second, Minute, and Hour etc.). The arrival rate clearly defines the time duration when the server is busy and server is idle. This helps in identifying the core hours and non-core hours for the particular application.
Thus by analyzing the web server logs for a particular server, one can easily identify the work load handled by each server.