From e669079148fe78c92c366ffd53c83ac989d73123 Mon Sep 17 00:00:00 2001 From: astokes Date: Thu, 18 Dec 2008 16:32:25 +0000 Subject: - moved mail.py to postfix.py, added postconf output - added gdm support to x11 - added additional ethool options to networking - httpd logs are now optional git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@542 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/lib/sos/plugins/apache.py | 1 - src/lib/sos/plugins/bootloader.py | 2 +- src/lib/sos/plugins/hardware.py | 1 - src/lib/sos/plugins/ipsec.py | 4 ++-- src/lib/sos/plugins/kdump.py | 4 ++-- src/lib/sos/plugins/mail.py | 25 ------------------------- src/lib/sos/plugins/netdump.py | 12 +----------- src/lib/sos/plugins/networking.py | 2 ++ src/lib/sos/plugins/postfix.py | 32 ++++++++++++++++++++++++++++++++ src/lib/sos/plugins/x11.py | 4 ++++ 10 files changed, 44 insertions(+), 43 deletions(-) delete mode 100644 src/lib/sos/plugins/mail.py create mode 100644 src/lib/sos/plugins/postfix.py diff --git a/src/lib/sos/plugins/apache.py b/src/lib/sos/plugins/apache.py index 1b44e322..bae93562 100644 --- a/src/lib/sos/plugins/apache.py +++ b/src/lib/sos/plugins/apache.py @@ -13,7 +13,6 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import sos.plugintools -from threading import Thread class apache(sos.plugintools.PluginBase): """Apache related information diff --git a/src/lib/sos/plugins/bootloader.py b/src/lib/sos/plugins/bootloader.py index b919ce4d..5eb811cd 100644 --- a/src/lib/sos/plugins/bootloader.py +++ b/src/lib/sos/plugins/bootloader.py @@ -21,7 +21,7 @@ class bootloader(sos.plugintools.PluginBase): self.addCopySpec("/etc/lilo.conf") self.addCopySpec("/etc/milo.conf") self.addCopySpec("/etc/silo.conf") - self.addCopySpec("/boot/efi/*") + self.addCopySpec("/boot/efi/efi/redhat/elilo.conf") self.addCopySpec("/boot/grub/grub.conf") self.addCopySpec("/boot/grub/device.map") self.addCopySpec("/boot/yaboot.conf") diff --git a/src/lib/sos/plugins/hardware.py b/src/lib/sos/plugins/hardware.py index ad4a5537..03f776e6 100644 --- a/src/lib/sos/plugins/hardware.py +++ b/src/lib/sos/plugins/hardware.py @@ -13,7 +13,6 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import sos.plugintools -import commands class hardware(sos.plugintools.PluginBase): """hardware related information diff --git a/src/lib/sos/plugins/ipsec.py b/src/lib/sos/plugins/ipsec.py index de1eb014..bba33173 100644 --- a/src/lib/sos/plugins/ipsec.py +++ b/src/lib/sos/plugins/ipsec.py @@ -15,13 +15,13 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import sos.plugintools -import os +from os.path import exists class ipsec(sos.plugintools.PluginBase): """ipsec related information """ def checkenabled(self): - if self.cInfo["policy"].pkgByName("ipsec-tools") or os.path.exists("/etc/racoon/racoon.conf"): + if self.cInfo["policy"].pkgByName("ipsec-tools") or exists("/etc/racoon/racoon.conf"): return True return False diff --git a/src/lib/sos/plugins/kdump.py b/src/lib/sos/plugins/kdump.py index efdfcfb1..f93414da 100644 --- a/src/lib/sos/plugins/kdump.py +++ b/src/lib/sos/plugins/kdump.py @@ -13,13 +13,13 @@ ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. import sos.plugintools -import os +from os.path import exists class kdump(sos.plugintools.PluginBase): """Kdump related information """ def checkenabled(self): - if self.cInfo["policy"].pkgByName("kexec-tools") or os.path.exists("/etc/kdump.conf"): + if self.cInfo["policy"].pkgByName("kexec-tools") or exists("/etc/kdump.conf"): return True return False diff --git a/src/lib/sos/plugins/mail.py b/src/lib/sos/plugins/mail.py deleted file mode 100644 index 0d4dda29..00000000 --- a/src/lib/sos/plugins/mail.py +++ /dev/null @@ -1,25 +0,0 @@ -### 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 mail(sos.plugintools.PluginBase): - """mail server related information - """ - def setup(self): - self.addCopySpec("/etc/mail") - self.addCopySpec("/etc/postfix/main.cf") - self.addCopySpec("/etc/postfix/master.cf") - return - diff --git a/src/lib/sos/plugins/netdump.py b/src/lib/sos/plugins/netdump.py index 8fe721e8..987d06ed 100644 --- a/src/lib/sos/plugins/netdump.py +++ b/src/lib/sos/plugins/netdump.py @@ -12,22 +12,12 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -############################################################# -# This plugin assumes is to assist in troubleshooting netdump -# issues that deal with netdump configuration. Any improvements -# to the plugin are appreciated. Please send them to -# sos@lists.fedorahosted.org -# thanks -############################################################# -# grabs both client and server netdump configs - import sos.plugintools -from os import exists +from os.path import exists class netdump(sos.plugintools.PluginBase): """Netdump Configuration Information """ - def checkenabled(self): if self.cInfo["policy"].pkgByName("netdump") or exists("/etc/sysconfig/netdump*"): return True diff --git a/src/lib/sos/plugins/networking.py b/src/lib/sos/plugins/networking.py index 164ed43a..11a7de18 100644 --- a/src/lib/sos/plugins/networking.py +++ b/src/lib/sos/plugins/networking.py @@ -65,6 +65,8 @@ class networking(sos.plugintools.PluginBase): if ifconfigFile: for eth in self.get_interface_name(ifconfigFile): self.collectExtOutput("/sbin/ethtool "+eth) + self.collectExtOutput("/sbin/ethtool -i "+eth) + self.collectExtOutput("/sbin/ethtool -S "+eth) if self.getOption("traceroute"): self.collectExtOutput("/bin/traceroute -n rhn.redhat.com") diff --git a/src/lib/sos/plugins/postfix.py b/src/lib/sos/plugins/postfix.py new file mode 100644 index 00000000..8d2d06b5 --- /dev/null +++ b/src/lib/sos/plugins/postfix.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 +from os.path import exists + +class postfix(sos.plugintools.PluginBase): + """mail server related information + """ + def checkenabled(self): + if self.cInfo["policy"].pkgByName("postfix") or exists("/etc/rc.d/init.d/postfix"): + return True + return False + + def setup(self): + self.addCopySpec("/etc/mail") + self.addCopySpec("/etc/postfix/main.cf") + self.addCopySpec("/etc/postfix/master.cf") + self.collectExtOutput("/usr/sbin/postconf") + return + diff --git a/src/lib/sos/plugins/x11.py b/src/lib/sos/plugins/x11.py index 755352ef..09b7c3c9 100644 --- a/src/lib/sos/plugins/x11.py +++ b/src/lib/sos/plugins/x11.py @@ -32,6 +32,10 @@ class x11(sos.plugintools.PluginBase): self.addForbiddenPath("/etc/X11/X") self.addForbiddenPath("/etc/X11/fontpath.d") + + # TODO: if there is a need for kde that can be added here as well + if os.path.exists("/etc/gdm"): + self.addCopySpec("/etc/gdm") return -- cgit