Quick Links | ||
---|---|---|
Home Software Quick hacks Music Food Contact me |
parse_djbdns_log
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.
Requires:
tai64nlocal
(part of DJB's daemontools package)
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_logto work the same as
tail -f fileApparently 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.