NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming > Webmaster Tutorials
Reload this Page Real Time Visitor Stats!

Webmaster Tutorials Instructional webmaster-related how-to's and tutorials.

Advanced Search
0 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 05-16-2008, 09:23 PM THREAD STARTER               #1 (permalink)
MJ
Senior Member
 
MJ's Avatar
Join Date: Jul 2007
Location: Tucson AZ
Posts: 1,241
MJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond reputeMJ has a reputation beyond repute
 


Autism Special Olympics Adoption Baby Health Child Abuse

Lightbulb Real Time Visitor Stats!


Hey guys. Y'all ever think "man I wish I had real time stats to know when someone is on my site, where they are clicking, what site reffered them". Guess what, you CAN! Woohoo! Apache, the most comon webserver keeps logs of such actions. Logging into your box via the shell, we can see these live stats. Ready? Lets go!

Step 1: Ok, first log into your shell. (SSH always - telnet is not secure at all) Putty is a free SSH client if anyone needs, just type in your domain and boom.


Now we are inside the linux box. Its as if we are sitting right there and we can control it remotely.

Step 2: Lets go to the directory with all our logs in it for all domains hosted on the box. All domains hosted on the box should have a log here. Different servers and configurations might be slightly different but most if not all are located here. Also, if you are not root user its ok. You may only be able to see YOUR domain stats though. Example, if I am bob.com I might not be able to see Mike.com unless super user.




Step 3: Alright. Now we can use any linux command to view these logs. In this example, we want to be constantly looking at the very last part of the log file, to get real time stats, so we will type tail -f domain.com In this case we want the logs for OurVote.us so we type [b]tail -f ourvote.us[b]

????: NamePros.com http://www.namepros.com/webmaster-tutorials/470289-real-time-visitor-stats.html

Ready for our results???



Amazing! You can see what IP your current visitor is from, what browser he is using, what OS he has, what refferal URL he came from, what current URL he is on now, etc! This screen will update real time. So if you have a high traffic site, watch our your screen might get flooded.

But yep.. This is how lots of site trackers work too. Your webbrowser and webserver interact nicely with each other and give you this data.

Hope yall found this usefull.. This was my first turorial - Made it originally for Invest1010 but thought the world should be more aware of this techniqe. Take care guys!
__________________
Wii Sucks - Wii Fansite
Tucson Dog Training
San Angelo TX
MJ is offline  
Old 05-16-2008, 09:34 PM   #2 (permalink)
NamePros Regular
 
-PS-'s Avatar
Join Date: Jun 2006
Location: Sydney
Posts: 251
-PS- will become famous soon enough-PS- will become famous soon enough
 



Just to add in a few other commands that will help a little more

tail -f <logfile> &

This will allow you to still use the console (ie do other stuff) and the log tailing will still work

also another good one which will get rid of alot of the noise in the log file (like images etc) is

tail -f <log file> | egrep -v "jpg|png|ico|css|gif|js|feed|rss|Slurp|GoogleBot|m snbot"

This will also not sure bots indexing your site, they usally hit in batches, and might load upto 100 pages in a few minutes, so it's a good idea to filter them out as well.
-PS- is offline  
Old 05-16-2008, 09:52 PM   #3 (permalink)
NamePros Regular
Join Date: Jul 2005
Location: Lima, Ohio
Posts: 371
Hostnetric has a spectacular aura aboutHostnetric has a spectacular aura about
 



Thanks for sharing Mike I didn't know about this and am glad to know myself. I am going to try it on my sites now as well to see how it works out for me.

Thanks,

Kevin
__________________
Hostnetric Web Hosting
WoWBasic World of Warcraft Blog
The Penny Ads Free Classified Ads
Hostnetric is offline  
Old 06-11-2008, 07:45 PM   #4 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Hey, this is most helpful. Rep ++ for both Mike and Justin. I did not know this little trick.
mholt is offline  
Old 06-12-2008, 06:58 AM   #5 (permalink)
NamePros Member
Join Date: Dec 2005
Location: Finland
Posts: 56
purustotle is an unknown quantity at this point
 



Thanks for the helpful tips! Too bad I don't run any servers myself
purustotle is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


 
All times are GMT -7. The time now is 01:01 AM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger