« Listening to the Voices of Evil (SCO) | Main | iTunes Music Store Broken? »

November 21, 2003

Webalizer Funky Behavior

I use webalizer for site statistics, and have been puzzled by something and recently figured it out.

You see, webalizer only handles 12 months of data at a time, but I like to keep multiple years worth of stats for comparing across years. My solution is to keep a set of logs broken down by year and then run webalizer for each set of year logs into one directory. This way I can have stats for 12-month increments over many years. I set the HTMLBody option to output a few links to allow navigation between the years.

The issue was that in some instances I was getting two sets of links, I searched high and low for a problem in my HTML that might trigger this to happen.

I finally figured it out when I recently ran the webalizer command with absolute paths from my home directory. Previously I was running it within /home/stats directory where I keep a local, tweaked copy of the configuration file. My command:

/usr/bin/webalizer -c /home/stats/webalizer.conf /home/stats/logs/all_2003.log
If I run this from the /home/stats dir webalizer automatically loads the options in the local webalizer.conf, and then sees the command line switch to load a config file and loads that up as well. The second load appends the HTMLBody options to what was loaded the first time.

I'm pretty sure, now that I've been through this, that when I first started using webalizer I read documentation on how the config files are handled. Unfortunately that kind of stuff never comes to mind until *after* you figure it out for yourself the hard way.

Posted by mike at November 21, 2003 5:21 PM