border: solid 1px red; RSS

development and other things,
by tiegz

Archive

Recommended…
muviluv
wherewedowhatwedo
trey
timocracy
linode
adagio tea
rmbr me

Nov
4th
Wed
permalink

Logfile art? Yeah I did.

Here’s a script that takes a filename, parses the file for IP addresses, maps each IP to an RGBA pixel, and creates a PNG (thanks seattle.rb!).

For example, the following would map 192.168.1.1 in reverse (i.e. 1.1.168.192)…

ruby ip_colorsquare.rb production.log 4,3,2,1

Here’s one example I created with a 24-hour chunk of logs from WhereWeDoWhatWeDo (disclaimer: I mixed up the octet order when I created it)

production.log PNG

Interesting to see patterns emerge, although the streaks of the same shade are probably just search bots or spammers.

Grab the script here.