aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/lib/sos/helpers.py23
-rw-r--r--src/lib/sos/plugins/auditd.py24
-rw-r--r--src/lib/sos/plugins/crontab.py27
-rw-r--r--src/lib/sos/plugins/dhcp.py29
-rw-r--r--src/lib/sos/plugins/dovecot.py26
-rw-r--r--src/lib/sos/plugins/gdm.py22
-rw-r--r--src/lib/sos/plugins/hts.py23
-rw-r--r--src/lib/sos/plugins/iscsi.py24
-rw-r--r--src/lib/sos/plugins/kdump.py2
-rw-r--r--src/lib/sos/plugins/logrotate.py27
-rw-r--r--src/lib/sos/plugins/lsbrelease.py30
-rw-r--r--src/lib/sos/plugins/mrggrid.py23
-rw-r--r--src/lib/sos/plugins/mrgmessg.py24
-rw-r--r--src/lib/sos/plugins/mysql.py32
-rw-r--r--src/lib/sos/plugins/ntp.py23
-rw-r--r--src/lib/sos/plugins/printing.py6
-rw-r--r--src/lib/sos/plugins/psacct.py22
-rw-r--r--src/lib/sos/plugins/pxe.py30
-rw-r--r--src/lib/sos/plugins/rhn.py41
-rw-r--r--src/lib/sos/plugins/snmp.py31
-rw-r--r--src/lib/sos/plugins/soundcard.py30
-rw-r--r--src/lib/sos/plugins/tomcat.py28
-rw-r--r--src/lib/sos/plugins/udev.py23
-rw-r--r--src/lib/sos/plugins/vmware.py30
-rw-r--r--src/lib/sos/plugintools.py20
-rwxr-xr-xsrc/sosreport7
26 files changed, 557 insertions, 70 deletions
diff --git a/src/lib/sos/helpers.py b/src/lib/sos/helpers.py
index 77f85b01..a2659fe5 100755
--- a/src/lib/sos/helpers.py
+++ b/src/lib/sos/helpers.py
@@ -27,27 +27,8 @@ helper functions used by sosreport and plugins
"""
import os, popen2, fcntl, select, sys, commands, signal
from time import time, sleep
-
-if sys.version_info[0] <= 2 and sys.version_info[1] <= 2:
- # it's a RHEL3, activate work-arounds
- #
- import sos.rhel3_logging
- logging = sos.rhel3_logging
-
- def mkdtemp(suffix = "", prefix = "temp_"):
- import random
- while True:
- tempdir = "/tmp/%s_%d%s" % (prefix, random.randint(1,9999999), suffix)
- if not os.path.exists(tempdir): break
- os.mkdir(tempdir)
- return tempdir
-
- os.path.sep = "/"
- os.path.pardir = ".."
-else:
- # RHEL4+, business as usual
- import logging
- from tempfile import mkdtemp
+import logging
+from tempfile import mkdtemp
def importPlugin(pluginname, name):
""" Import a plugin to extend capabilities of sosreport
diff --git a/src/lib/sos/plugins/auditd.py b/src/lib/sos/plugins/auditd.py
new file mode 100644
index 00000000..bae384a3
--- /dev/null
+++ b/src/lib/sos/plugins/auditd.py
@@ -0,0 +1,24 @@
+### 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
+
+class auditd(sos.plugintools.PluginBase):
+ """Auditd related information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/audit/auditd.conf")
+ self.addCopySpec("/etc/audit/audit.rules")
+ self.addCopySpec("/var/log/audit/")
+ return
diff --git a/src/lib/sos/plugins/crontab.py b/src/lib/sos/plugins/crontab.py
new file mode 100644
index 00000000..8ad4c232
--- /dev/null
+++ b/src/lib/sos/plugins/crontab.py
@@ -0,0 +1,27 @@
+### 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 crontab(sos.plugintools.PluginBase):
+ """Crontab information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/cron*")
+ self.collectExtOutput("/usr/bin/crontab -l -u root", suggest_filename = "root_crontab")
+ self.collectExtOutput("""for i in `ls /home/`;\
+ do echo "User :" $i;/usr/bin/crontab -l -u $i;\
+ echo "---------------";done""", suggest_filename = "users_crontabs")
+ return
diff --git a/src/lib/sos/plugins/dhcp.py b/src/lib/sos/plugins/dhcp.py
new file mode 100644
index 00000000..7866f4e9
--- /dev/null
+++ b/src/lib/sos/plugins/dhcp.py
@@ -0,0 +1,29 @@
+### 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
+
+class dhcp(sos.plugintools.PluginBase):
+ """DHCP related information
+ """
+ def checkenabled(self):
+ if self.cInfo["policy"].pkgByName("dhcp") or os.path.exists("/etc/rc.d/init.d/dhcpd"):
+ return True
+ return False
+
+ def setup(self):
+ self.addCopySpec("/etc/sysconfig/dhcrelay")
+ self.addCopySpec("/etc/sysconfig/dhcpd")
+ self.addCopySpec("/etc/dhcpd.conf")
+ return
diff --git a/src/lib/sos/plugins/dovecot.py b/src/lib/sos/plugins/dovecot.py
new file mode 100644
index 00000000..553ff3e1
--- /dev/null
+++ b/src/lib/sos/plugins/dovecot.py
@@ -0,0 +1,26 @@
+### 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 dovecot(sos.plugintools.PluginBase):
+ """dovecot server related information
+ """
+ def setup(self):
+ if os.path.exists("/etc/dovecot.conf"):
+ self.addCopySpec("/etc/dovecot*")
+ self.collectExtOutput("/usr/sbin/dovecot -n")
+ return
+
diff --git a/src/lib/sos/plugins/gdm.py b/src/lib/sos/plugins/gdm.py
new file mode 100644
index 00000000..bf75ea33
--- /dev/null
+++ b/src/lib/sos/plugins/gdm.py
@@ -0,0 +1,22 @@
+### 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
+
+class gdm(sos.plugintools.PluginBase):
+ """gdm related information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/gdm/*")
+ return
diff --git a/src/lib/sos/plugins/hts.py b/src/lib/sos/plugins/hts.py
new file mode 100644
index 00000000..4d5cf652
--- /dev/null
+++ b/src/lib/sos/plugins/hts.py
@@ -0,0 +1,23 @@
+### 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
+
+class hts(sos.plugintools.PluginBase):
+ """Red Hat Hardware Test Suite related information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/httpd/conf.d/hts.conf")
+ self.addCopySpec("/var/hts")
+ return
diff --git a/src/lib/sos/plugins/iscsi.py b/src/lib/sos/plugins/iscsi.py
new file mode 100644
index 00000000..1b4ce67d
--- /dev/null
+++ b/src/lib/sos/plugins/iscsi.py
@@ -0,0 +1,24 @@
+### 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
+
+class iscsi(sos.plugintools.PluginBase):
+ """iscsi-initiator related information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/iscsi/iscsid.conf")
+ self.addCopySpec("/etc/iscsi/initiatorname.iscsi")
+ self.addCopySpec("/var/lib/iscsi")
+ return
diff --git a/src/lib/sos/plugins/kdump.py b/src/lib/sos/plugins/kdump.py
index cc10d08a..d9f248a4 100644
--- a/src/lib/sos/plugins/kdump.py
+++ b/src/lib/sos/plugins/kdump.py
@@ -26,4 +26,6 @@ class kdump(sos.plugintools.PluginBase):
def setup(self):
self.addCopySpec("/etc/kdump.conf")
self.addCopySpec("/etc/sysconfig/kdump")
+ self.addCopySpec("/proc/cmdline")
+ self.addCopySpec("/etc/udev/rules.d/*kexec.rules")
return
diff --git a/src/lib/sos/plugins/logrotate.py b/src/lib/sos/plugins/logrotate.py
new file mode 100644
index 00000000..f3195d0e
--- /dev/null
+++ b/src/lib/sos/plugins/logrotate.py
@@ -0,0 +1,27 @@
+### 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
+
+class logrotate(sos.plugintools.PluginBase):
+ """logrotate configuration files and debug info
+ """
+
+ def setup(self):
+ self.collectExtOutput("/usr/sbin/logrotate --debug /etc/logrotate.conf",
+ suggest_filename = "logrotate_debug")
+ self.collectExtOutput("/bin/cat /var/lib/logrotate.status",
+ suggest_filename = "logrotate_status")
+ self.addCopySpec("/etc/logrotate*")
+ return
diff --git a/src/lib/sos/plugins/lsbrelease.py b/src/lib/sos/plugins/lsbrelease.py
new file mode 100644
index 00000000..78a83577
--- /dev/null
+++ b/src/lib/sos/plugins/lsbrelease.py
@@ -0,0 +1,30 @@
+### 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 lsbrelease(sos.plugintools.PluginBase):
+ """Linux Standard Base information
+ """
+ def diagnose(self):
+ if not os.path.exists("/etc/redhat-release"):
+ self.addDiagnose("/etc/redhat-release missing")
+ return
+ def setup(self):
+ self.collectExtOutput("/usr/bin/lsb_release -a")
+ self.collectExtOutput("/usr/bin/lsb_release -d", suggest_filename = "lsb_release", root_symlink = "lsb-release")
+ self.addCopySpec("/etc/lsb-release*")
+ return
diff --git a/src/lib/sos/plugins/mrggrid.py b/src/lib/sos/plugins/mrggrid.py
new file mode 100644
index 00000000..2b39ab17
--- /dev/null
+++ b/src/lib/sos/plugins/mrggrid.py
@@ -0,0 +1,23 @@
+### 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
+
+class mrggrid(sos.plugintools.PluginBase):
+ """MRG GRID related information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/condor/condor_config")
+ self.addCopySpec("/usr/bin/condor_status")
+ return
diff --git a/src/lib/sos/plugins/mrgmessg.py b/src/lib/sos/plugins/mrgmessg.py
new file mode 100644
index 00000000..481083ad
--- /dev/null
+++ b/src/lib/sos/plugins/mrgmessg.py
@@ -0,0 +1,24 @@
+### 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
+
+class mrgmessg(sos.plugintools.PluginBase):
+ """MRG Messaging related information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/qpidd.conf")
+ self.addCopySpec("/etc/sasl2/qpidd.conf")
+ self.addCopySpec("/var/rhm")
+ return
diff --git a/src/lib/sos/plugins/mysql.py b/src/lib/sos/plugins/mysql.py
new file mode 100644
index 00000000..3f8dc2bd
--- /dev/null
+++ b/src/lib/sos/plugins/mysql.py
@@ -0,0 +1,32 @@
+### 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 mysql(sos.plugintools.PluginBase):
+ """MySQL related information
+ """
+ def checkenabled(self):
+ if self.cInfo["policy"].pkgByName("mysql-server") or os.path.exists("/etc/my.cnf") or \
+ self.cInfo["policy"].pkgByName("mysql"):
+ return True
+ return False
+
+ def setup(self):
+ self.addCopySpec("/etc/my.cnf")
+ self.addCopySpec("/etc/sysconfig/network")
+ self.addCopySpec("/etc/ld.so.conf.d/mysql*")
+ self.addCopySpec("/var/log/mysql*")
+ return
diff --git a/src/lib/sos/plugins/ntp.py b/src/lib/sos/plugins/ntp.py
new file mode 100644
index 00000000..76be368b
--- /dev/null
+++ b/src/lib/sos/plugins/ntp.py
@@ -0,0 +1,23 @@
+### 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
+
+class ntp(sos.plugintools.PluginBase):
+ """NTP related information
+ """
+ def setup(self):
+ self.collectExtOutput("/usr/bin/ntpstat")
+ self.collectExtOutput("/usr/sbin/ntptrace")
+ return
diff --git a/src/lib/sos/plugins/printing.py b/src/lib/sos/plugins/printing.py
index 76a476eb..47ba6494 100644
--- a/src/lib/sos/plugins/printing.py
+++ b/src/lib/sos/plugins/printing.py
@@ -20,5 +20,11 @@ class printing(sos.plugintools.PluginBase):
def setup(self):
self.addCopySpec("/etc/cups/*.conf")
self.addCopySpec("/var/log/cups")
+ self.addCopySpec("/etc/cups/lpoptions")
+ self.addCopySpec("/etc/cups/ppd/*.ppd")
+ self.collectExtOutput("/usr/bin/lpstat -t")
+ self.collectExtOutput("/usr/bin/lpstat -s")
+ self.collectExtOutput("/usr/bin/lpstat -d")
+
return
diff --git a/src/lib/sos/plugins/psacct.py b/src/lib/sos/plugins/psacct.py
new file mode 100644
index 00000000..68e2585e
--- /dev/null
+++ b/src/lib/sos/plugins/psacct.py
@@ -0,0 +1,22 @@
+### 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
+
+class psacct(sos.plugintools.PluginBase):
+ """Process accounting related information
+ """
+ def setup(self):
+ self.addCopySpec("/var/account")
+ return
diff --git a/src/lib/sos/plugins/pxe.py b/src/lib/sos/plugins/pxe.py
new file mode 100644
index 00000000..59e91e0e
--- /dev/null
+++ b/src/lib/sos/plugins/pxe.py
@@ -0,0 +1,30 @@
+### 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 pxe(sos.plugintools.PluginBase):
+ """PXE related information
+ """
+ def checkenabled(self):
+ if self.cInfo["policy"].pkgByName("system-config-netboot-cmd") or os.path.exists("/usr/sbin/pxeos"):
+ return True
+ return False
+
+ def setup(self):
+ self.collectExtOutput("/usr/sbin/pxeos -l")
+ self.addCopySpec("/tftpboot")
+ self.addCopySpec("/etc/dhcpd.conf")
+ return
diff --git a/src/lib/sos/plugins/rhn.py b/src/lib/sos/plugins/rhn.py
index 450d8f1d..817a3f5f 100644
--- a/src/lib/sos/plugins/rhn.py
+++ b/src/lib/sos/plugins/rhn.py
@@ -40,12 +40,11 @@ class rhn(sos.plugintools.PluginBase):
# http://cvs.devel.redhat.com/cgi-bin/cvsweb.cgi/rhn/proxy/proxy/tools/rhn-proxy-debug?rev=1.3;content-type=text%2Fplain;cvsroot=RHN
# FIXME: symlinks and directories for copySpec (same as root_symlink for commands)
- self.addCopySpec("/etc/httpd/conf")
+ self.addCopySpec("/etc/httpd/conf*")
self.addCopySpec("/etc/rhn")
self.addCopySpec("/etc/sysconfig/rhn")
- self.addCopySpec("/var/log/httpd") # httpd-logs
- self.addCopySpec("/var/log/rhn*") # rhn-logs
- self.addCopySpec("/var/log/rhn/rhn-database-installation.log")
+ self.addCopySpec("/var/log/httpd") # httpd-logs
+ self.addCopySpec("/var/log/rhn*") # rhn-logs
# all these used to go in $DIR/mon-logs/
self.addCopySpec("/opt/notification/var/*.log*")
@@ -57,6 +56,9 @@ class rhn(sos.plugintools.PluginBase):
self.addCopySpec("/home/nocpulse/var/commands/*.log*")
self.addCopySpec("/var/tmp/ack_handler.log*")
self.addCopySpec("/var/tmp/enqueue.log*")
+ self.addCopySpec("/var/log/nocpulse/*.log*")
+ self.addCopySpec("/var/log/notification/*.log*")
+ self.addCopySpec("/var/log/nocpulse/TSDBLocalQueue/TSDBLocalQueue.log")
self.addCopySpec("/root/ssl-build")
self.collectExtOutput("rpm -qa --last", root_symlink = "rpm-manifest")
@@ -64,28 +66,23 @@ class rhn(sos.plugintools.PluginBase):
self.collectExtOutput("/usr/bin/rhn-charsets", root_symlink = "database-character-sets")
if self.satellite:
- self.addCopySpec("/etc/tnsnames.ora")
- self.addCopySpec("/etc/jabberd")
+ self.addCopySpec("/etc/tnsnames.ora")
+ self.addCopySpec("/etc/jabberd")
- # tomcat (4.x and newer satellites only)
- if not self.policy().pkgNVRA(satellite)[1].startswith("3."):
- self.addCopySpec("/etc/tomcat5")
- self.addCopySpec("/var/log/tomcat5")
+ # tomcat (4.x and newer satellites only)
+ if not self.policy().pkgNVRA(satellite)[1].startswith("3."):
+ self.addCopySpec("/etc/tomcat5")
+ self.addCopySpec("/var/log/tomcat5")
- self.addCopySpec("/etc/tomcat5")
- self.addCopySpec("/var/log/tomcat5")
+ self.addCopySpec("/etc/tomcat5")
+ self.addCopySpec("/var/log/tomcat5")
if self.proxy:
- # copying configuration information
- self.addCopySpec("/etc/httpd/conf")
- self.addCopySpec("/etc/squid")
- self.addCopySpec("/etc/rhn")
- self.addCopySpec("/etc/sysconfig/rhn")
-
- # copying logs
- self.addCopySpec("/var/log/httpd")
- self.addCopySpec("/var/log/squid")
- self.addCopySpec("/var/log/rhn*")
+ # copying configuration information
+ self.addCopySpec("/etc/squid")
+
+ # copying logs
+ self.addCopySpec("/var/log/squid")
return
diff --git a/src/lib/sos/plugins/snmp.py b/src/lib/sos/plugins/snmp.py
new file mode 100644
index 00000000..c9be4b2f
--- /dev/null
+++ b/src/lib/sos/plugins/snmp.py
@@ -0,0 +1,31 @@
+## Copyright (C) 2007 Sadique Puthen <sputhenp@redhat.com>
+
+### 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 snmp(sos.plugintools.PluginBase):
+ """snmp related information
+ """
+ def checkenabled(self):
+ if self.cInfo["policy"].pkgByName("net-snmp") or os.path.exists("/etc/snmp/snmpd.conf"):
+ return True
+ return False
+
+ def setup(self):
+ self.addCopySpec("/etc/snmp")
+ return
+
diff --git a/src/lib/sos/plugins/soundcard.py b/src/lib/sos/plugins/soundcard.py
new file mode 100644
index 00000000..bc94bb4a
--- /dev/null
+++ b/src/lib/sos/plugins/soundcard.py
@@ -0,0 +1,30 @@
+### 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 soundcard(sos.plugintools.PluginBase):
+ """ Sound card information
+ """
+ def setup(self):
+ self.addCopySpec("/proc/asound/*")
+ self.addCopySpec("/etc/alsa/*")
+ self.addCopySpec("/etc/asound.*")
+ self.collectExtOutput("/sbin/lspci | grep -i audio")
+ self.collectExtOutput("/usr/bin/aplay -l")
+ self.collectExtOutput("/usr/bin/aplay -L")
+ self.collectExtOutput("/usr/bin/amixer")
+ self.collectExtOutput("/sbin/lsmod | /bin/grep snd | /bin/awk '{print $1}'", suggest_filename = "sndmodules_loaded")
+ return
diff --git a/src/lib/sos/plugins/tomcat.py b/src/lib/sos/plugins/tomcat.py
new file mode 100644
index 00000000..a6dc9055
--- /dev/null
+++ b/src/lib/sos/plugins/tomcat.py
@@ -0,0 +1,28 @@
+### 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
+
+class tomcat(sos.plugintools.PluginBase):
+ """Tomcat related information
+ """
+ def checkenabled(self):
+ if self.cInfo["policy"].pkgByName("tomcat5"):
+ return True
+ return False
+
+ def setup(self):
+ self.addCopySpec("/etc/tomcat5")
+ self.addCopySpec("/var/log/tomcat5")
+ return
diff --git a/src/lib/sos/plugins/udev.py b/src/lib/sos/plugins/udev.py
new file mode 100644
index 00000000..0b48e51e
--- /dev/null
+++ b/src/lib/sos/plugins/udev.py
@@ -0,0 +1,23 @@
+### 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
+
+class udev(sos.plugintools.PluginBase):
+ """udev related information
+ """
+ def setup(self):
+ self.addCopySpec("/etc/udev/udev.conf")
+ self.addCopySpec("/etc/udev/rules.d/*")
+ return
diff --git a/src/lib/sos/plugins/vmware.py b/src/lib/sos/plugins/vmware.py
new file mode 100644
index 00000000..7891576d
--- /dev/null
+++ b/src/lib/sos/plugins/vmware.py
@@ -0,0 +1,30 @@
+### 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 vmware(sos.plugintools.PluginBase):
+ """VMWare related information
+ """
+ def checkenabled(self):
+ if os.path.exists("/usr/bin/vmware"):
+ return True
+ return False
+
+ def setup(self):
+ self.collectExtOutput("/usr/bin/vmware -v")
+ self.addCopySpec("/etc/vmware/locations")
+ self.addCopySpec("/etc/vmware/config")
+ return
diff --git a/src/lib/sos/plugintools.py b/src/lib/sos/plugintools.py
index 60253c05..e00fa0f0 100644
--- a/src/lib/sos/plugintools.py
+++ b/src/lib/sos/plugintools.py
@@ -35,26 +35,6 @@ import shutil
from stat import *
from time import time
-# RHEL3 doesn't have a logging module, activate work-around
-try:
- import logging
-except ImportError:
- import sos.rhel3_logging
- logging = sos.rhel3_logging
-
-# python < 2.4 (RHEL3 and RHEL4) doesn't have format_exc, activate work-around
-if sys.version_info[0] <= 2 and sys.version_info[1] < 4:
- def format_exc():
- import StringIO
-
- output = StringIO.StringIO()
- traceback.print_exc(file = output)
- toret = output.getvalue()
- output.close()
- return toret
-
- traceback.format_exc = format_exc
-
class PluginBase:
"""
Base class for plugins
diff --git a/src/sosreport b/src/sosreport
index de20f620..0ad17fc3 100755
--- a/src/sosreport
+++ b/src/sosreport
@@ -39,13 +39,6 @@ from pwd import getpwuid
import gettext
from threading import Semaphore
-# RHEL3 doesn't have a logging module
-try:
- import logging
-except ImportError:
- import sos.rhel3_logging
- logging = sos.rhel3_logging
-
__version__ = 1.8
__breakHits__ = 0 # Use this to track how many times we enter the exit routine