Forum Moderators: DixonJones

Message Too Old, No Replies

Log files

How to read the log files?

         

genny

7:24 am on Apr 12, 2005 (gmt 0)

10+ Year Member



Hi,

Can someone help me as how to read these raw data of log files.Please see the data below and please explain whats depicts what.

203.200.166.161 - - [10/Apr/2005:04:07:53 -0600] "GET / HTTP/1.1" 200 81867

Reid

7:33 am on Apr 12, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



203.200.166.161 - - [10/Apr/2005:04:07:53 -0600] "GET / HTTP/1.1" 200 81867

That's not really complete.

203.200.166.161 - - (10 apr ect) = IP date and time of requesting user-agent

"GET / HTTP/1.1" = user agent is asking for / (homepage) user-agent asking for HTTP 1.1 file

200 = server response 200 file found (not sure what the 81867 means)

after that you should see the referer string = user agent id string and referring url

Romeo

8:19 am on Apr 12, 2005 (gmt 0)

10+ Year Member



203.200.x.x - - [10/Apr/2005:04:07:53 -0600] "GET / HTTP/1.1" 200 81867

203.200.x.x = The IP address of the client visiting your http server

- = depends on your log definition, empty field in this request

- = depends on your log definition, empty field in this request

[10/Apr/2005:04:07:53 -0600] = server date:time stamp, -0600 is the time zone offset of your server's clock to UTC

"GET / HTTP/1.1" = visitor is asking for the file "/" (homepage), using the GET method and using the HTTP/1.1 protocol

200 = server status code 200: file found

81867 = server delivered 81867 bytes to the visitor for this GET request

If you have control over your web server's log configuration, you may redefine and add fields for the UA (user agent software) and referrer and other interesting things to the log record.

Regards,
R.

genny

8:42 am on Apr 12, 2005 (gmt 0)

10+ Year Member



Hi,

Thanks a lot for the quick response.What are the other records that can be tracked from the log files?Can it be configured for "from which search engine and using what keywords did we receive the traffic."If its possible then how? Please help.

Romeo

9:51 am on Apr 12, 2005 (gmt 0)

10+ Year Member



what you most likely have is what is called the standard "common log file format" with the format
remotehost rfc931user authuser [date] "request" status bytes
which is defined as
%h %l %u %t "%r" %>s %b

To add the user-agent and referral information to the end of a log record, you may state
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{user-agent}i\" \"%{referer}i\""

For more information, you may look into the Apache's documentation [httpd.apache.org...] or search Google for "apache common log file definition" or similar.

Regards,
R.