Quick Links    
Quick hacks
Contact me


This is a Python script to read the inscrutable log files produced by Dan Bernstein's tinydns and dnscache, and print them out in human-readable form.


download/view it

Patches and variations

Apparently, James Raftery has written a patch to djbdns that makes it log the number of cache hits and misses. Mariano Absatz supplied me with a complementary patch for parse_djbdns_log that you might find useful.


Incidentally, don't expect this:

tail -f file | parse_djbdns_log
to work the same as
tail -f file
Apparently it's because most implementations of tail don't change the default buffering behaviour: thus, when writing to a pipe, output is buffered in large chunks rather than by lines. If you wait long enough, you should see chunks of ~4k passed through parse_djbdns_log, but that's probably not what you want.