LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-11-2005, 01:44 AM   #1
SiLiCoN
Member
 
Registered: Sep 2004
Location: India
Distribution: Solaris 9, FreeBSD 4.10, Slackware, RedHat, Knoppix,
Posts: 84

Rep: Reputation: 16
Visitor tracking in Perl


hey all,

thnx for coming by my post. I am stuck up in a logic rather than code. I just cant find a way out and that's why need your help. Here is what the issue is
We are running a huge protal (like more than 3000000 visitors each day). Now what we want to do is to create a program that would track the number of unique visitors for the site. So i coded a porgram (in perl) that wud place a cookie on the visitors browser and create an entry in the log for the visitor. This cookie has an expiration time of 1 month and so the entry in the log will only be created when the cookie is NOT set in the users browser. After that the porgram sets the cookie in the users browser with an expiration time for a month. So he wont create an entry in the log file till another 30 days (until and unless he clears the cookie or logs in from a diff place or with a diff browser). This is not a concern. The problem is that - there are too many processes running all the time due to the program and the CPU always stays at 0.0% idle. There are other programs in the server too which serve banners and other things ... and they tend to work really slow all together. Now i m trying to fig out a diff way to set the cookies in the users browser so that the number of apache child processes reduces. I couldnt think of anything as of yet. The program has to run thorugh port 80 (through apache). It wud be of great help if you can tell me another way to do it.

Thanks in Advance,
SiLiCoN
 
Old 04-11-2005, 02:51 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
why re-invent the wheel? use awstats:

http://awstats.sourceforge.net/

u can cron it or do a demand based log analysis. read the docs.
 
Old 04-11-2005, 04:44 AM   #3
SiLiCoN
Member
 
Registered: Sep 2004
Location: India
Distribution: Solaris 9, FreeBSD 4.10, Slackware, RedHat, Knoppix,
Posts: 84

Original Poster
Rep: Reputation: 16
hey born4linux,

thanks for the reply.... what awstats does is, it -parses the log files and generates the reports, so it cant actually track number of unique visitors ... (visitors inside a network???) So i need to set cookies to do it...

Thanks
SiLiCoN
 
Old 04-11-2005, 10:36 AM   #4
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Webalizer is a very good website stats tool and it produces graphical charts as well. It can give you the number of unique visits (average per day, total each day, monthly totals and so on) as well as number of hits (non-unique page requests) and a wide variety of other statistics that might interest you.

It's a good tool to monitor your webserver. Try it.

Last edited by vharishankar; 04-11-2005 at 10:38 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tracking my Threads hetzme Linux - Newbie 2 07-26-2005 07:39 AM
tracking what i said... lefty.crupps LQ Suggestions & Feedback 4 05-01-2005 01:45 AM
how to check if the visitor is using https using php ? graziano1968 Programming 3 11-10-2004 02:55 PM
perl(Cwd) perl(File::Basename) perl(File::Copy) perl(strict)....What are those? Baldorg Linux - Software 1 11-09-2003 08:09 PM
Visitor Based Networks Mux General 0 12-04-2002 08:10 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration