From 01db3fad3481c2d389349ab0157c823a543e38b4 Mon Sep 17 00:00:00 2001 From: astokes Date: Thu, 18 Dec 2008 14:37:48 +0000 Subject: remove sysrq triggering : resolves rhbz476970 add anaconda support resolves rhbz472108 git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@540 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/lib/sos/plugins/anaconda.py | 36 ++++++++++++++++++++++++++++++++++++ src/lib/sos/plugins/general.py | 1 - src/lib/sos/plugins/kernel.py | 8 ++------ 3 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 src/lib/sos/plugins/anaconda.py diff --git a/src/lib/sos/plugins/anaconda.py b/src/lib/sos/plugins/anaconda.py new file mode 100644 index 00000000..26c54997 --- /dev/null +++ b/src/lib/sos/plugins/anaconda.py @@ -0,0 +1,36 @@ +### This program is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by +## the Free Software Foundation; either version 2 of the License, or +## (at your option) any later version. + +## This program is distributed in the hope that it will be useful, +## but WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +## GNU General Public License for more details. + +## You should have received a copy of the GNU General Public License +## along with this program; if not, write to the Free Software +## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +import sos.plugintools +import os + +class anaconda(sos.plugintools.PluginBase): + """Anaconda / Installation information + """ + def checkenabled(self): + try: os.stat("/var/log/anaconda.log") + except: pass + else: return True + + return False + + def setup(self): + self.addCopySpec("/root/anaconda-ks.cfg") + self.addCopySpec("/root/install.log") + self.addCopySpec("/root/install.log.syslog") + self.addCopySpec("/var/log/anaconda.log") + self.addCopySpec("/var/log/anaconda.syslog") + self.addCopySpec("/var/log/anaconda.xlog") + return + diff --git a/src/lib/sos/plugins/general.py b/src/lib/sos/plugins/general.py index 299ec11c..5ed01e4b 100644 --- a/src/lib/sos/plugins/general.py +++ b/src/lib/sos/plugins/general.py @@ -41,7 +41,6 @@ class general(sos.plugintools.PluginBase): self.collectExtOutput("/bin/hostname", root_symlink = "hostname") self.collectExtOutput("/bin/date", root_symlink = "date") self.collectExtOutput("/usr/bin/uptime", root_symlink = "uptime") - self.addCopySpec("/root/anaconda-ks.cfg") if self.getOption('all_logs'): logs=self.doRegexFindAll(r"^\S+\s+(\S+)", "/etc/syslog.conf") diff --git a/src/lib/sos/plugins/kernel.py b/src/lib/sos/plugins/kernel.py index 4fb0a864..e3f33635 100644 --- a/src/lib/sos/plugins/kernel.py +++ b/src/lib/sos/plugins/kernel.py @@ -18,8 +18,7 @@ import commands, os, re class kernel(sos.plugintools.PluginBase): """kernel related information """ - optionList = [("modinfo", 'gathers information on all kernel modules', 'fast', True), - ('sysrq', 'trigger sysrq+[m,p,t] dumps', 'fast', False)] + optionList = [("modinfo", 'gathers information on all kernel modules', 'fast', True)] moduleFile = "" taintList = [ {'regex':'mvfs*', 'description':'Clearcase module'}, @@ -73,10 +72,7 @@ class kernel(sos.plugintools.PluginBase): self.addCopySpec("/proc/driver") self.addCopySpec("/proc/sys/kernel/tainted") - if self.getOption('sysrq') and os.access("/proc/sysrq-trigger", os.W_OK): - for key in ['m', 'p', 't']: - commands.getoutput("/bin/echo %s > /proc/sysrq-trigger" % (key,)) - self.addCopySpec("/var/log/messages") + self.addCopySpec("/var/log/messages") return -- cgit