From e796e95a4efbfeb04223f61c600c7712da7b500f Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Mon, 17 Jan 2011 16:39:11 +0100 Subject: replace KerneloopsScanner plugin and dumpoops with abrt-dump-oops, use it in abrtd 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: [ LogScanners ] abrt-dump-oops = abrt-dump-oops -drw /var/log/messages 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. Signed-off-by: Denys Vlasenko --- examples/cut_here.right | 2 +- examples/not_oops1.right | 2 +- examples/not_oops2.right | 2 +- examples/not_oops3.right | 2 +- examples/oops1.right | 2 +- examples/oops2.right | 2 +- examples/oops3.right | 2 +- examples/test.sh | 10 +++++----- 8 files changed, 12 insertions(+), 12 deletions(-) (limited to 'examples') diff --git a/examples/cut_here.right b/examples/cut_here.right index b5970f03..28548d1a 100644 --- a/examples/cut_here.right +++ b/examples/cut_here.right @@ -1,4 +1,4 @@ -dumpoops: found oopses: 1 +abrt-dump-oops: Found oopses: 1 Version: 2.6.32-19.el6.x86_64 WARNING: at arch/x86/kernel/cpu/mtrr/generic.c:467 diff --git a/examples/not_oops1.right b/examples/not_oops1.right index 5f2c00f0..64c3a19a 100644 --- a/examples/not_oops1.right +++ b/examples/not_oops1.right @@ -1 +1 @@ -dumpoops: found oopses: 0 +abrt-dump-oops: Found oopses: 0 diff --git a/examples/not_oops2.right b/examples/not_oops2.right index 5f2c00f0..64c3a19a 100644 --- a/examples/not_oops2.right +++ b/examples/not_oops2.right @@ -1 +1 @@ -dumpoops: found oopses: 0 +abrt-dump-oops: Found oopses: 0 diff --git a/examples/not_oops3.right b/examples/not_oops3.right index 5f2c00f0..64c3a19a 100644 --- a/examples/not_oops3.right +++ b/examples/not_oops3.right @@ -1 +1 @@ -dumpoops: found oopses: 0 +abrt-dump-oops: Found oopses: 0 diff --git a/examples/oops1.right b/examples/oops1.right index 67005199..2e642e72 100644 --- a/examples/oops1.right +++ b/examples/oops1.right @@ -1,4 +1,4 @@ -dumpoops: found oopses: 1 +abrt-dump-oops: Found oopses: 1 Version: 2.6.27.9-159.fc10.i686 #1 BUG: unable to handle kernel NULL pointer dereference at 00000000 diff --git a/examples/oops2.right b/examples/oops2.right index 1a6f7447..4d2f7ba7 100644 --- a/examples/oops2.right +++ b/examples/oops2.right @@ -1,4 +1,4 @@ -dumpoops: found oopses: 1 +abrt-dump-oops: Found oopses: 1 Version: 2.6.33.1-19.fc13.x86_64 [ INFO: possible recursive locking detected ] diff --git a/examples/oops3.right b/examples/oops3.right index 86c4f431..7f68e690 100644 --- a/examples/oops3.right +++ b/examples/oops3.right @@ -1,4 +1,4 @@ -dumpoops: found oopses: 3 +abrt-dump-oops: Found oopses: 3 Version: 2.6.32-0.51.rc7.git2.fc13.x86_64 general protection fault: 0000 [#1] SMP diff --git a/examples/test.sh b/examples/test.sh index 6c704faa..8f7566fb 100755 --- a/examples/test.sh +++ b/examples/test.sh @@ -1,7 +1,7 @@ for f in *.test; do - b="${f%%.test}" - dumpoops -s "$f" >"$b".out 2>&1 - if diff -u "$b".right "$b".out >"$b".diff 2>&1; then - rm "$b".out "$b".diff - fi + b="${f%%.test}" + abrt-dump-oops -o "$f" >"$b".out 2>&1 + if diff -u "$b".right "$b".out >"$b".diff 2>&1; then + rm "$b".out "$b".diff + fi done -- cgit