Dave Currie’s weblog on Technology, Programming, Thoughts and Ideas

Using AWStats with Blojsom

This is just a quick tip, and will only be useful if you use Blojsom, although the principle is useful in many situations. If you like to keep track of your blog activity using AWStats and you use Blojsom, you’ll notice that the different kinds of pages or feeds all use a single page URL. This can be confusing because AWStats sees all these accesses as being to the same page, and displays them as such.

If you want to see what different types of pages are being accessed on your site, try running the following shell command:

sed -e \"s/\?flavor\=/flavor\//g\" /path/to/apache.log >/path/to/new_apache.log

and pointing AWStats to the newly created file instead of the original log. If you include this before each hourly generation in your cron, then you won’t even notice a lag in your data.

What does the command do? Well, it just substitutes the string ?flavor= in the url with /flavor/. This causes the different flavor URLs to suddenly look like different files to AWStats, and you’ll be able to see the distribution of your traffic over several page types.

Leave a Reply

authimage