Web Stats and Web Logs under your cPanel hosting

    The article was added by Mihai T. at 09/28/2008.

  Submit | About | Contact & Privacy Policy

You are here: Articles Directory » Web Hosting

Bookmark and Share

cPanel automatically updates web stats information every 24 hours or however often your web host has set it to happen. Generating web stats takes a lot of server CPU time (often referred to as load).

If your website is designed to attract public attention, (as opposed to a site that you only want friends and family to visit) then you need some way to keep track of who is visiting your site and what they are doing while they are there. Knowing what pages or files are most popular and who visits them can help you improve your website layout and even increase traffic to your site. However, it isn't practical to require every visitor to register or answer a poll or survey every time they stop by your site.

Raw (Apache) Web Logs

Thankfully that is not necessary in most cases, since most visitors automatically provide your site with basic information about where they came from, how they found your site and what sort of computer they are using during this visit. These data are called web statistics. The information is stored in a special file called a raw web log. A raw web log is essentially a text file with information about every person or machine that visited your site and what they requested in the order those requests were made. This file can grow to be quite large and very difficult to interpret. The average raw web log contains entries that look something like this:

111.111.111.111 - - [31/Oct/2005:12:22:57 -0500] "GET /gallery/download/1000/movie.zip HTTP/1.0" 200 105493 "http://domain.com/gallery/download/1000/" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)"

In the above example, 111.111.111.111 is the IP address of the user that made this request followed by the date and time of the request. The request that was made of your website appears in quotes (in this case, the user is trying to get (download) a file called movie.zip from within the 1000 directory on your site). The status code is listed next (200). A status code lets you know what happened with this request. In this case, 200 tells us that the file was successfully downloaded. If you would like to know what a status code means, you can view the full list with explanations at http://w3.org/Protocols/rfc2616/rfc2616-sec10.html.

The size of the downloaded file is listed in bytes (1,024 bytes = 1 Kb). The exact URL request is listed next. Finally, some information about the user's web browser and computer platform is listed. There will be one of these lines in the raw web log for every click (commonly referred to in web logs as a hit) a user makes while visiting your site. There may be hundreds or even thousands of hits for each visit a user makes to your website (often called a session).

You can download the raw web log for your website by clicking on Raw Access Log in cPanel. You will be presented with a list of the raw web logs for your account (including all parked domains, add-on domains, and subdomains). Click one to download it to your computer (the file will be compressed). You can also download your raw web logs via FTP by using one of the special FTP URLs provided at the bottom of the FTP Account screen.

Either way, the raw web log will be compressed when you download it. You must uncompress it by using a program capable of handling gZip files like the free Allume Stuffit Expander, which can handle nearly any compression format. The uncompressed log file will bear the same name as your website (domain.com). This name may cause some problems for you if you have a .com domain name when you try to open it since .com files are typically DOS command files (similar to an application on Windows or Mac OS X). You may want to rename the file to domain.txt so double clicking on it will open the file in a text editor.

Raw Log Control

You can control how raw logs are handled by cPanel by clicking on the Raw Log Manager from the main cPanel screen. Here you can tell cPanel to save old raw web logs to your home directory at the end of every month so you can access them later. cPanel typically removes raw web logs at the end of each month unless you say otherwise. You can also save every old month or only the most recent past month (if it is November now, cPanel saves only October's old raw web logs). Save changes when you have it set the way that you prefer. Below the Save button are links to download old compressed web logs for your main domain and any add-on domains or subdomains.

Web Stats to the Rescue!

As you can imagine, this can make the raw web log for even a modestly busy website nearly impossible to interpret without some help. Thankfully, cPanel comes with several tools that make interpreting all this data much easier. These tools are called web stats programs. They take the raw web log data and turn that data into manageable charts and graphs. The resulting data is much easier for mere mortals to understand.

To view the web statistics for your site, click on Web/FTP Stats in cPanel (there is a separate link for data only concerning subdomains called Subdomain Stats). From here you can access all of the tools cPanel provides to help you understand more about who is using your site and for what purpose.

cPanel automatically updates web stats information every 24 hours or however often your web host has set it to happen. Generating web stats takes a lot of server CPU time (often referred to as load). For this reason, most web hosts won't have the web stats set to update more than one time per day. If you need more up-to-date information use the update link at the top of the Awstats report (if your host offers it) or download your raw web log and use a web-log-processing program on your local computer to interpret the data. If you find that your web stats haven't been updated in a few days, contact your web host for assistance.

Each web stats program may define exactly what constitutes a hit, session, or bandwidth use differently. This means that you will have some difficulty comparing the results between different web stats programs. You might want to find a program that you like best and only compare results from that one.

Analog

Analog doesn't use a lot of graphics to get its point across so you may prefer this if you are accessing cPanel with a dial-up connection as it will load the quickest.

Each section of the report that Analog produces has links to every other section so you can skip to the section you are interested in the most. Use your web browser's save page feature if you want to save the content of this particular report. If you have any questions about how Analog works or how it defines terms like hits or sessions, or computes bandwidth, visit the Analog website at http://analog.cx/docs/meaning.html.

Awstats

Awstats uses more graphics than Analog, but it also provides more information about those visiting your website than Analog does.

The Awstats report is divided into two sections, the sidebar with the name of your domain or subdomain that this report covers and links to the various sections of the report, and the main section. The top of the main section of the report contains links to any previous monthly reports and to update the report with up-to-the minute data (if your web host permits it). You can also click the picture of a flag to change the language the report is generated in.

If your web host does permit the update now feature in Awstats be careful not to over-use it since it uses a lot of CPU load. Below that are the various graphs and data of the report itself. Use the sidebar to scroll to the section you are interested in the most. To save this report you should use your web browser's save page feature. Documentation on how to use Awstats and read the reports it generates can be found at http://awstats.sourceforge.net/docs/index.html.

Statistics Configuration

This feature is found on the main cPanel screen if your web host offers it. Here you are able to turn on or off any web statistics packages that your web host offers. While having several different web stats programs might be nice, they do use disk space in your account. Some, like Webalizer and Urchin, can use vast amounts of disk space. I recommend that you try using each web stats program, find your favorite, and disable the others. Why waste disk space on web stats you do not use? If you don't use any of them, you can turn them all off.

Other Related Tools

While the web stats programs mentioned above offer a lot of data about visitors to your website, they are not the only tools that cPanel provides to help you figure out who is visiting your site and what they are doing while there.

Last Visitors

This tool parses the raw web log and displays the most recent visitors. The text explaining this feature in cPanel claims that it displays the last 300 visitors, but it actually displays the last 300 hits (clicks). This tool can take a few seconds to be displayed after you click on the Last Visitors link. The display looks somewhat similar to the raw web log output, except that it is cleaned up and sorted by IP address of the visitor in reverse chronological order (most recent hits at the top). You can see which files or pages the visitor tried to access, when they visited, and some basic information about them.

Bandwidth

Each web stats program keeps track of bandwidth usage, but each stats program computes bandwidth differently. The bandwidth tool shows you exactly what bandwidth cPanel counts towards your monthly bandwidth limit, so you should use it to keep an eye on bandwidth rather than web stats programs.

Web Hosting Disclaimer

  • The ArticleCity.info articles directory team is not responsible for falsehoods, inaccuracies, or any other types of misinformation this article may contain and will not be liable for any damage or loss suffered by a user through the user's reliance on the information gained here.
  • ArticleCity.info articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us and we'll investigate the specific article(s) and we will remove the copyrighted material.
Other Web Hosting articles
Understanding how networks work on a basic level - The Basics of Networks Understanding how networks work on a basic level is fairly simple but can quickly become complicated. This is especially true if you are unfamiliar how the technology within different networks functions. From a mecha...
There are many roles that a server can occupy - There are many roles that a server can occupy. For each one there is a unifying similarity: they have to be on a network and have other computers connect to them. In addition to that, these connecting computers have to request something that the s...
Customer Service Leading the Way in Technology - Just the mere mention of the word “internet” can sometimes be very intimidating to people. It's been known to give off the impression that it's to highly technical and confusing for any of us to understand. Unless we've had years of experience, or...
Web hosting requirements at a hosting company - What are the Company's Hosting Policies? Amid all of the marketing material on your potential host's website there is usually some fine print (or worse yet, some things aren't even mentioned publicly) concerning the rules they impose ...
cPanel web hosting account explained - Getting Started with cPanel Now that you have a shiny new cPanel web hosting account, it is time to learn the ropes of cPanel's interface. However, b...
cPanel Interface and general hosting account information - The Main cPanel Interface If you have successfully logged into your account, you should be presented with the main cPanel interface, shown below: ...
cPanel and its general server information explained - General Server Information This is followed by information about the server your account is on: Operating System: This is the operating system that the server your account is on is running. Probably this will be Linux. ...
FTP accounts in your cPanel web hosting account - FTP and cPanel's File Manager It is most likely that one of the first things you will want to do after getting your web hosting account, and taking...
Creating and Managing FTP Accounts under cPanel - Creating and Managing FTP Accounts in cPanel Depending on your hosting plan, you may not be limited to just a single main FTP account. Why would you need more than one? You probably don't if you are the only person wh...
cPanel File manager and File permissions - cPanel's File Manager FTP is not the only way to manage files and directories in your hosting account. cPanel includes a File Manager that will allow you to do almost anything you can via FTP (and a number of things t...