Statistics and Logs
What Panel Statistics and Logs Are
AWStats cPanel reports come from a log analysis tool built into many hosting panels. AWStats reads the server's access logs and turns them into reports on visits, pages, referring sites and bandwidth. Panels also offer other tools, such as Webalizer, and most let you download the raw log files.
Statistics are built from logs. Every request a server handles, whether from a person, a search engine or a bot, adds a line to the access log. Each line records the time, the requesting address, the page asked for, the response code and the size of the response. The reporting tool groups these lines into charts.
Error logs are separate. They record problems the server ran into while handling requests, such as a script that failed or a file it could not read. When a page is broken, the error log is usually more useful than the summary charts. General panel tools are described in what a hosting control panel is.
What Server Logs Can and Cannot Show
Server statistics are reliable for trends: which pages receive the most requests, which errors recur, how much bandwidth a site uses and where visitors arrive from. Automated traffic shows up too. Search engine crawlers and bots can make up a large share of hits, so totals can be higher than the number of real visitors.
Logs also miss some activity. A response served from a cache, such as one held by a content delivery network, may never reach the origin server's log. Actions taken in the browser after a page loads are invisible to the server. Statistics are often processed on a schedule, commonly once a day, so the latest hours may not appear yet. Logs also take up disk space, a cost covered in how much server resource a control panel uses.
Logs contain IP addresses, which are personal data in many jurisdictions. Keep downloaded copies private and delete them when you no longer need them.
Frequently asked questions
Why do server logs show different visitor numbers from analytics scripts?
Server logs count requests, including bots and crawlers, and they never see responses served from a cache. Analytics scripts count page views that ran in a visitor's browser, and they usually filter out many bots. Each method measures something different, so the numbers will differ even on a healthy site.
How long are server log files kept?
It depends on the host. Many servers rotate logs, which means older files are compressed or deleted on a schedule, and some keep only a few days or weeks. Because the period is set by the host, check it before relying on logs for an investigation, and download any file you need to keep.