Posts Tagged ‘Log files’

Server log files

Sunday, September 21st, 2008

In today competitive world it has become necessary to keep track of our visitors. As a business policy you should know :

* Who is visiting our Web site * What browsers do they use?
* Where do they go in the site * What pages do they look at?
* How long they stay at our site? etc.

The answers to these questions would be found in  Server log files

A server log is a file (or several files) automatically created and maintained by a server.
Your Web server log files contain much useful information such as :

  • Which pages get the most traffic – and the least.
  • What sites are referring visitors to you.
  • Which pages visitors look at.
  • What browsers and operating systems are most popular with visitors.
  • When search engine spiders and directory editors visit.

This information often helps webmasters to figure out problems on our web site. Using log file we get detail information of our visitors. Once we know from where we are getting targeted traffic then it becomes easy for us to take necessary steps for maintaining and improving traffic from particular search engine.

The server stores visitor information in files with the .log extension, nearly all of the major Web servers use a common format for this log files. These log files contain information such as the IP address of the remote host, the document that was requested, and a timestamp.

The syntax for each line of a log file is:

site logName fullName [date:time GMToffset] “req file proto” status length

Each of the eleven items listed in the above syntax and example are described in the following list.

  • site-either an IP address or the symbolic name of the site making the HTTP request
  • logName - login name of the user who owns the account that is making the HTTP request. Most remote sites don’t give out this information for security reasons. If this field is disabled by the host, you see a dash (-) instead of the login name.
  • fullName - full name of the user who owns the account that is making the HTTP request. Most remote sites don’t give out this information for security reasons. If this field is disabled by the host, you see a dash (-) instead of the full name. If your server requires a user id in order to fulfill an HTTP request, the user id will be placed in this field.
  • Date - date of the HTTP request.
  • Time - time of the HTTP request. The time will be presented in 24-hour format.
  • GMToffset - signed offset from Greenwich Mean Time. GMT is the international time reference.
  • req - HTTP command. For WWW page requests, this field will always start with the GET command.
  • file-path and filename of the requested file.
  • proto-type of protocol used for the request.
  • status-status code generated by the request.
  • length-length of requested document.

These data can be combined into a single file, or separated into distinct logs, such as an access log, error log, or referrer log. However, server logs typically do not collect user-specific information.

These files are usually not accessible to general Internet users, only to the webmaster or other administrative person. A statistical analysis of the server log may be used to examine traffic patterns by time of day, day of week, referrer, or user agent.

Technorati Tags:

Understanding Log files

Wednesday, September 10th, 2008

Every Web servers maintain some sort of system that stores information about which pages, images, and files are requested, who requests them, and how many bytes are transferred etc in a file called log file. With log file analysis tools, it’s possible to get a good idea about your visitors such as were they are coming from, how often they return, and how they navigate through your site, which pages are most visited etc.

These log files are used by administrator for effectively managing web server, getting feedback about performance of servers etc.

You can open and read log files in any text editor; for more user-friendly view you can use some stand-alone software or browser-based viewer which will give you more precise data in form of charts/graphs/tables.

The format of the common log file line has the following fields separated by a space:

Remotehost rfc931 authuser [date] “request” status bytes

151.99.190.27 – – [09/Jan/2007:13:06:51] “GET /~bacusHTTP/1.0? 301 13276

For the above example:

remotrhost : 151.99.190.27
authuser : -
frc931 : -
[date] : [09/Jan/200713:06:51 -0600]
” request ” : ” GET /~bacuslab HTTP/1.0?
status: 301
bytes : 13276

Understanding log fields :

remotehost : Remote hostname or IP address number if DNS hostname is not available.

rfc931 : The remote login name of the user. (If not available a minus sign is typically placed in the field)

authuser :The username as which the user has authenticated himself. (If not available a minus sign is typically placed in the field)

[date] : Date and time of the request.

“request” : The request line exactly as it came from the client. (i.e., the file name, and the method used to retrieve it [typically GET])

status : The HTTP response code returned to the client. Indicates whether or not the file was successfully retrieved, and if not, what error message was returned.

bytes : The number of bytes transferred.

Technorati Tags: