Often, when users compare bandwidth usage statistics that log analysis programs provide (for example, AWStats, Analog, Logaholic, and Webalizer) to bandwidth statistics that cPanel provide, they are surprised to find apparent discrepancies.
These apparent discrepancies result from the way in which different programs measure bandwidth.
The purpose of this document is to explain the differences in measurement methods. Our goal is to help web hosting providers and website owners understand how to obtain the most accurate bandwidth report.
Bandwidth data in cPanel & WHM comes from a combination of summary files and databases.
The following cPanel interfaces display (mainly numeric) bandwidth usage information in summary files:
cPanel's Bandwidth interface (cPanel >> Home >> Metrics >> Bandwidth).
Note:
The Bandwidth interface includes this information in the monthly bandwidth usage pie charts, and in the Bandwidth by Day table when you select a domain.
The same bandwidth monitoring tool generates all of the information in these interfaces.
In contrast, AWStats, Analog, and Webalizer use a different method to process bandwidth. This is why it sometimes appears that there is no correlation between the data that the bandwidth usage information interfaces show and the data that AWStats, Analog, and Webalizer show.
Databases generate the following bandwidth graphs in cPanel's Bandwidth interface (cPanel >> Home >> Metrics >> Bandwidth):
The system uses a different method to calculate these graphs than it does to calculate summary file data.
The information that cPanel & WHM presents may differ from the day's usage in log processing programs, such as AWStats, Analog, or Webalizer. There are three possible reasons for this:
Daily bandwidth usage numbers are far too volatile for the bandwidth and log processing results to match.
There are further differences between the methods that log programs and cPanel & WHM use to process bandwidth usage.
Log processing programs extract the amount of bytes that the Apache combined access log transfers. The Apache combined access log records incoming data requests, which includes the size of the requested file, in bytes.
Log processing programs measure bandwidth by the size of the data that visitors requested, not the amount the data that the system actually transferred.
To measure bandwidth, cPanel & WHM combines the amount of bytes of an incoming data request with the outgoing transferred data (the response to that request). cPanel & WHM obtains this data from the Apache logs.
These logs include the following amounts of bandwidth:
For most websites, these differences are relatively small. The headers are a few hundred bytes; the request itself is usually much less. Given reasonably sized output content, this overhead works out to a few percentage points' difference.
Certain types of request and response combinations, however, cause these differences to make a significant impact on the bandwidth measurement:
We strongly recommend that you use the complete bandwidth measurement that cPanel provides. For example, use cPanel's Bandwidth interface (cPanel >> Home >> Metrics >> Bandwidth).