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.

We've got about 30 websites on our server. Some with Google Analytics, some without. They do come with Awstats (server is using WHM). I want to know the total number of unique visitors, serverwide. What is an easy way to go about this? Adding all visitors for every website would also do, but is rather cumbersome. What I do have are monthly logs for every site, so I see some possibility there. I am thinking of a script that would process these individual logs. Does something like that exist? Are there easier ways?

BTW: I do not mind about 'truly' unique visitors or not (i.e. I do not mind if an IP that visited website A and website B is being counted as either 1 or 2), I just want an estimate of the total number of visitors that day.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Something like this perhaps:

grep -Po "\d\d?\d?\.\d\d?\d?\.\d\d?\d?\.\d\d?\d?' $logfiles | uniq -c
share|improve this answer
1  
Don't forget to sort before you uniq. –  Ladadadada Nov 23 '11 at 7:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.