Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a standard reseller hosting account. The main account has WHM and all sub accounts run cpanel. All sub accounts also have stats on them in the form of:

  1. AWStats
  2. Webalizer

My question is, is there either a script, or some way through php, that I can run a script that will check all my subaccounts for the sites with the most unique hits in a certain month, and then give me a top 10 breakdown of them?


migration rejected from Jul 2 '13 at 2:38

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as off-topic by Falcon Momot, Bryan, Jenny D, Tim Brigham, Jacob Jul 2 '13 at 2:38

  • This question does not appear to be about server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

What do you mean by the 'most unique hits'? – Marco Demaio Aug 19 '10 at 12:24
This question appears to be off-topic because it concerns the use of shared web hosting by end users or resellers, rather than the administration of web hosting. – Falcon Momot Jun 30 '13 at 8:33
up vote 3 down vote accepted

Yes, but I don't know if there is a ready to use script, definietely you can write one on your own if you know a bit of PHP. Awstats is basically saving all the results in ready to use format under the /home/your_cpanel_user/tmp/awstats

If you look into that folder you find many txt files, one for each month for eqach domain/addon domain you host on that cPanel account.

So for instance the file will be the summarized visits/hits results o for January/2007.

If you open such file you will find a table of results under the string:

# Hour - Pages - Hits - Bandwidth - Not viewed Pages - Not viewed Hits - Not viewed Bandwidth

The 3rd column are the hits.

So you need a PHP script that opens the files takjes the hits and perform the calculations you want.

Hope it helps.


WHM > Account Information > View Bandwidth Usage

This will take you to the Bandmin overview page. Bandmin is installed with WHM (at least at the systems I use). More details can be found here

"sites with the most unique hits"... NOT bandwidth. – coderama Aug 8 '09 at 9:35
Not the best answer but it is the closest I guess. – coderama Apr 15 '13 at 6:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.