Ikanobori Weblog

Regular visitors of my blog might know I’m a sucker for statistics. I just love them and I want statistics of everything I have. It makes my data insightful.

That’s why (amongst other things) I show graphs to my traffic, hits and server load prominently on my blog pages.

Other people might also know I have an unhealthy appetite for the stone age chatting protocol IRC. I currently reside in 36 channels on 5 different networks.

I decided to combine the two and start logging and graphing the usage. For the graphing I use pisg, which you can get by installing it from the repositories with:

aptitude install pisg

In this example you should already have irssi and apache running. I configured irssi with the following commands:

/set autolog on
/setĀ autolog_path ~/irclogs/$tag/$0/%Y/%m/%e.txt

This makes irssi log all channels in the following format: network/channel/month/day.txt

I then created a pisg config:

<channel="#ubuntu-offtopic">
Logfile = "/home/simon/irclogs/freenode/#ubuntu-offtopic/**/**/*"
Format = "irssi"
Maintainer = "ikanobori"
OutputFile = "/home/simon/www_data/www.ikanobori.jp/ircstats/ubuntu-offtopic.html"
Network = "Freenode"
</channel>

I then added a cronjob with crontab -e:

1 * * * * /usr/bin/pisg -co /home/simon/irclogs/stats.cfg

Which makes pisg run every hour.

See the results of this specific pisg config here.

Oh, you also need to move the graphics file from the /usr/share/pisg/gfx directory to the directory where you are outputting your HTML so the graphs have their nice colors.

1 COMMENT
Brandon Perry
February 24, 2010

Just would like to add, on gentoo, you can follow these same steps, but emerge pisg instead of apt-get.

Post a comment