Introduction


For visualizing the web traffic, I am using webalizer for many years. The Webalizer software has been updated updated recently. It now keeps statistics for longer then 12 month's, provides a neat flag icon for the country stats and has the GeoIP integration. What I was still missing however was the ability to re-size the graph images.

To have a bigger usage.png image, I therefore looked into the source code and re-calculated the image parameters in graphs.c and also updated output.c. With the new settings, the main graph image showing the monthly statistics (usage.png) is now displayed in 640x256 instead of 512x256 pixels. The additional 128 pixels allow to show 18 month's of data bars together with the 3-character month description on the X-Axis. Originally, it is displaying only 12 months.

If you are interested, the patch is as simple as dropping the updated graphs.c and output.c into the webalizer-2.23-xx source directory before doing the ./configure and make. Just click on the link below to get the updated source code files:

Source Code Changes


These drop-in replacement files work with webalizer-2.21-02, webalizer-2.23-03 and webalizer-2.23-08.

Result


If you set "GraphMonths 18" in webalizer.conf, the image will now be like this:

webalizer usage.png in 640x256

Links and Credits


The webalizer original source is available here

@2009, frank4dd

Content:

Updated Files: