aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-15 20:19:28 +0000
committerpcarrier <pcarrier@ef72aa8b-4018-0410-8976-d6e080ef94d8>2010-11-15 20:19:28 +0000
commit1658251cadd38cecd8b50ce1560d6d52038053b7 (patch)
treee9ae9f299e0e984d2b2fcfeb9793b0105e15dc27
parentca99b6c11f7c43ac48f71724ba86b0e061049a78 (diff)
downloadsos-1658251cadd38cecd8b50ce1560d6d52038053b7.tar.gz
Added a backtraces option to module abrt.py
sosreport -k abrt.backtraces=on will create sos_commands/abrt/backtrace_* Disabled by default for now (up for discussion) Closes RHBZ#653468. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@1000 ef72aa8b-4018-0410-8976-d6e080ef94d8
-rw-r--r--sos/plugins/abrt.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/sos/plugins/abrt.py b/sos/plugins/abrt.py
index 70c062c5..5108dfbb 100644
--- a/sos/plugins/abrt.py
+++ b/sos/plugins/abrt.py
@@ -20,13 +20,27 @@ import os
class abrt(sos.plugintools.PluginBase):
"""ABRT log dump
"""
+
+ optionList = [("backtraces", 'collect backtraces for every report', 'slow', False)]
+
def checkenabled(self):
if self.isInstalled("abrt-cli") or \
os.path.exists("/var/spool/abrt"):
return True
return False
+
+ def do_backtraces(self):
+ ret, output, rtime = self.callExtProg('/usr/bin/sqlite3 /var/spool/abrt/abrt-db \'select UUID from abrt_v4\'')
+ try:
+ for uuid in output.split():
+ self.collectExtOutput("/usr/bin/abrt-cli -ib %s" % uuid,
+ suggest_filename=("backtrace_%s" % uuid))
+ except IndexError:
+ pass
def setup(self):
self.collectExtOutput("/usr/bin/abrt-cli -lf",
suggest_filename="abrt-log")
+ if self.getOption('backtraces'):
+ self.do_backtraces()
return