On 01/14/2011 02:19 PM, Denys Vlasenko wrote:
Patch adds new tool:
$ abrt-dump-oops
Usage: abrt-dump-oops [-vsrdow] FILE
Extract oops from syslog/dmesg file
-v, --verbose Be verbose
-s Log to syslog
-r Parse kernel's message buffer before parsing FILE
-d Create ABRT dump for every oops found
-o Print found oopses on standard output
-w Do not exit, watch the file for new oopses
It extends dumpoops. Extensions:
* it can watch the syslog using -w option (uses inotify)
* it can scan dmesg buffer too
In this way, it also becomes a replacement for KerneloopsScanner plugin:
oops-detecting logic is taken verbatim from KerneloopsScanner source.
abrtd is changed to start it if it sees this directive in abrt.conf:
- so it runs as a daemon? I don't like it and I bet a lot more people
wont, because it will slow down the booting and it's not necessary as it
can be run when the file changes
KerneloopsScanner = /var/log/messages
- I don't like this, because the name of abrt-dump-oops is then
hardcoded somewhere, which goes against our "modular" design - how would
you add other scanner?
... I think something like:
[LogScanners]
/var/log/messages = abrt-dump-oops
would be better
Default abrt.conf is changed to have such line.
Patch doesn't remove KerneloopsScanner plugin and dumpoops binary yet,
I will do it in a separate trivial patch if/when this one is ACKed.
Run-tested.
Please review.