#158 log reading and merging


System logs are separated by content, so it is hard to follow them on one place like conky.
I've written a (quite big) module that reads system logs and merge them. It is built as a standalone,
but the patch ships it fully integrated to conky (via preprocessor).

Stores the tail of each given log in memory along with the timestamps of each line.
Stores the merge result line in memory so that it is just to be displayed on each redraw (cpu-friendly).
Watches for log append / move / delete events via inotify if available and updates only required parts.
Valgrind clean.

Options / syntax:
${logs 5 31 82 /var/log/syslog /var/log/messages /var/log/auth.log}
will show the 5 last lines of what was written in the three logs (syslog, messages, auth.log),
with 31 characters offset (uninteresting time / hostname) and with line break (fold) at col 82.
${logs [lines] [offset] [fold] logs...}
Documentation written to variables.xml.

I'm running it for a couple of days, and it helps me really, both with system knowledge and
because my machine is a ssh-available host...

As I've no BSD system, it is absolutely untested on *BSD but apart minor oopses it should work fairly well.


  • Jonathan Michalon

    • labels: --> New feature/object

Log in to post a comment.