[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Generating stats in realtime with Webalizer [was: (no subject)]



"Johan Kooijman - Plushosting B.V." <jkooijman@xxxxxxxxxxxxxxx> wrote:
> I installed webalizer 2.01, but it only generates stats once a day at 4.02
> AM, how can tell webalizer to generate stats realtime when I'm looking in
my
> browser?

Depending on your server load, RAM, the size of your logs (which depends on
traffic, how often they're rotated and how long it's been since they've been
rotated), and the complexity of your webalizer config file it takes a few
minutes to *many* minutes for Webalizer to run.  I'm not sure how your
Webalizer install is configured, but if it's parsing the logs in each site's
directory then those log files are only being updated 4 times per day
(unless your system is setup differently than mine are).
/etc/cron.quarter-daily/splitlogs.pl split's Apache's logs 4 times per day.
If you want it to split them more often you can move that script to a
different system cron directory (like /etc/cron.hourly) or to the root
user's cron file in /var/spool/cron/root (use the 'crontab' program to do
it).  As a result you'll incur more load on your server when splitlogs.pl
runs because it's a pretty CPU-intensive script.  If your Webalizer
installation parses /var/log/httpd/access or /var/log/httpd/combined-access
instead you don't need to worry about the splitting of logs.  But webalizer
will generally take a lot longer to parse those files than the split
site-specific logs.  You could create a Perl script to trigger either
method, but you'll certainly have to wait quite a while for the scripts to
run even if you spped up the process by only generating reports for the
particular site you are interested about.  And if many users are doing this
throughout the day you're server will be a log report generating server and
not much more.  <grin>

If you want stats in realtime you're going to have to define your needs a
little better and maybe settle for less than you want and look at
implementing something like mod_log_mysql to put the logs into a MySQL DB.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/