Re: [PHP] logging page views, which method is better????

2001-01-15 Thread Rick Widmer

And the answer about merging logs for webalizer is:


 Is there a way to create a combined report showing hits to a number of
 separate servers all handling the same web sites.

 I am guessing all you have to do is feed it each of the log files in
 turn, and make sure you don't duplicate them.  I think it requires not
 using incremental mode, but I hope you know for sure.  I am in the
 process of recommending it on the php-general mailing list.

Q: I have multiple load-balanced servers (or I'm using DNS round-robin
to
accoplish the same thing) and I want to generate one webalizer report
for
the whole farm, but each server generates its own log file.  When I
run webalizer on each of the logfiles in turn,  it ignores a lot of the
records because it thinks they're out of order!

A: You need to merge all of the logfiles together so that webalizer sees
the records in chronological order.  One good way to do that on the fly
is
with mergelog (http://mergelog.sourceforge.net/), a quick common logfile
sorter.  An example:

mergelog server1.log server2.log server3.log | webalizer

--
Bradford L. Barrett  [EMAIL PROTECTED]
A free electron in a sea of neutrons DoD#1750 KD4NAW

The only thing Micro$oft has done for society, is make people
believe that computers are inherently unreliable.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logging page views, which method is better????

2001-01-14 Thread php3

Addressed to: "Dallas Kropka" [EMAIL PROTECTED]
  [EMAIL PROTECTED]

** Reply to note from "Dallas Kropka" [EMAIL PROTECTED] Sun, 14 Jan 2001 
00:57:10 -0600


   I have a large site, with several hundred pages its a product
 listing and shopping cart and I want to log my page views I
 receive an average of 3000 hits per minute.

 Is it better (faster) to log my views to a database table? or to a
 flat file?


No need to re-invent the wheel, all accesses are already being logged.


If you are using Apache, take a look at the access log.  Every hit to
the server is already logged there.  I am not sure what the default
location for the file is, but you can find it with

   locate access_log

or by looking for the string  Log  in your httpd.conf file.  I believe
it may appear under either the AccessLog or CustomLog keywords.

You might want to look at Webalizer, or a couple of other programs to
analyze the contents.

   http://www.mrunix.net/webalizer/

There are others, but this is the one I use.





Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logging page views, which method is better????

2001-01-14 Thread Alex Black

the problem with that is as soon as you run a load-baanced installation,
collecting apache logs start to be a pain in the a$$ :)

I have given some thought to the logging thing, but am still undecided re:
letting apache do its thing, and writing scripts to aggregate the logs, or
turning off apache logging and going to the DB.

problem is this puts an annoying amount of stress on the production DB, so
there you have it, the dilemma :)

-a


--
Alex Black, Head Monkey
[EMAIL PROTECTED]

The Turing Studio, Inc.
http://www.turingstudio.com

vox+510.666.0074
fax+510.666.0093

Saul Zaentz Film Center
2600 Tenth St Suite 433
Berkeley, CA 94710-2522




 From: [EMAIL PROTECTED]
 Newsgroups: php.general
 Date: 14 Jan 2001 01:58:33 -0800
 Subject: Re: [PHP] logging page views, which method is better
 
 Addressed to: "Dallas Kropka" [EMAIL PROTECTED]
 [EMAIL PROTECTED]
 
 ** Reply to note from "Dallas Kropka" [EMAIL PROTECTED] Sun, 14 Jan 2001
 00:57:10 -0600
 
 
 I have a large site, with several hundred pages its a product
 listing and shopping cart and I want to log my page views I
 receive an average of 3000 hits per minute.
 
 Is it better (faster) to log my views to a database table? or to a
 flat file?
 
 
 No need to re-invent the wheel, all accesses are already being logged.
 
 
 If you are using Apache, take a look at the access log.  Every hit to
 the server is already logged there.  I am not sure what the default
 location for the file is, but you can find it with
 
 locate access_log
 
 or by looking for the string  Log  in your httpd.conf file.  I believe
 it may appear under either the AccessLog or CustomLog keywords.
 
 You might want to look at Webalizer, or a couple of other programs to
 analyze the contents.
 
 http://www.mrunix.net/webalizer/
 
 There are others, but this is the one I use.
 
 
 
 
 
 Rick Widmer
 Internet Marketing Specialists
 http://www.developersdesk.com
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logging page views, which method is better????

2001-01-14 Thread Michael Kimsal

Use a separate DB for something like this - have a data database, and a 'logging'
database.  We're setting up something similar - currently we have 2 databases for
separate things, and will probably merge the first two datasets back into the main
database, and turn the second one into a logger.



Alex Black wrote:

 the problem with that is as soon as you run a load-baanced installation,
 collecting apache logs start to be a pain in the a$$ :)

 I have given some thought to the logging thing, but am still undecided re:
 letting apache do its thing, and writing scripts to aggregate the logs, or
 turning off apache logging and going to the DB.

 problem is this puts an annoying amount of stress on the production DB, so
 there you have it, the dilemma :)

 -a

 --
 Alex Black, Head Monkey
 [EMAIL PROTECTED]

 The Turing Studio, Inc.
 http://www.turingstudio.com

 vox+510.666.0074
 fax+510.666.0093

 Saul Zaentz Film Center
 2600 Tenth St Suite 433
 Berkeley, CA 94710-2522

  From: [EMAIL PROTECTED]
  Newsgroups: php.general
  Date: 14 Jan 2001 01:58:33 -0800
  Subject: Re: [PHP] logging page views, which method is better
 
  Addressed to: "Dallas Kropka" [EMAIL PROTECTED]
  [EMAIL PROTECTED]
 
  ** Reply to note from "Dallas Kropka" [EMAIL PROTECTED] Sun, 14 Jan 2001
  00:57:10 -0600
 
 
  I have a large site, with several hundred pages its a product
  listing and shopping cart and I want to log my page views I
  receive an average of 3000 hits per minute.
 
  Is it better (faster) to log my views to a database table? or to a
  flat file?
 
 
  No need to re-invent the wheel, all accesses are already being logged.
 
 
  If you are using Apache, take a look at the access log.  Every hit to
  the server is already logged there.  I am not sure what the default
  location for the file is, but you can find it with
 
  locate access_log
 
  or by looking for the string  Log  in your httpd.conf file.  I believe
  it may appear under either the AccessLog or CustomLog keywords.
 
  You might want to look at Webalizer, or a couple of other programs to
  analyze the contents.
 
  http://www.mrunix.net/webalizer/
 
  There are others, but this is the one I use.
 
 
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re:[PHP] logging page views, which method is better????

2001-01-14 Thread George Schlossnagle

For a good distributed logging solution, check out mod_log_spread
(http://www.backhand.org/mod_log_spread/).  It's an apache module that
handles distributed logging by writing logs to reliable multicast
groups.  Additionally, because it multicasts data, additional clients
and log writers can be added on the fly without any additional overhead
or configuration.  It is also provides good handling of mod_vhost_alias
logs.

George

-- 
$_ = 'George Schlossnagle';
s#.#(ord$')-(ord$)+((index($_,$')-$)?1002:0)#ego;s#-#((substr($],4,1)-6)?67:$-[0])#eog;$:=$_;print
join('',(map chr$_,reverse
map{substr($:,(3*$_),3)+(11,-109,-14,94,-894,-28,-61,-202,-417,83,-20,-678,53,96,4,-494,82,-869,-826,24,16,-684,-450,-27)[$_]}(0...length($_)/3)),chr(length($_)/2+ord$/),$/);


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] logging page views, which method is better????

2001-01-14 Thread Josh G

Another technique is use a quick-and dirty save of one line to a text
file, and have a cron script or somehting similar simply run every
day or every few hours that reads from your home-made log into a
db table, and then empties the file.

Gfunk

   My name was Brian McGee,
   I stayed up listening to Queen,
   When I was seventeen.

http://www.gfunk007.com/



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]