Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share

migration rejected from stackoverflow.com 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 professional 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
4  
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

2 Answers 2

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 awstats012007.domain.com.txt will be the summarized visits/hits results o domain.com 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.

share

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

share
    
"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.