Posts tagged "wth"

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.

Accent theme by Handsome Code


view archive



Ask me anything