diff options
author | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-07-10 15:06:26 +0000 |
---|---|---|
committer | shnavid <shnavid@ef72aa8b-4018-0410-8976-d6e080ef94d8> | 2007-07-10 15:06:26 +0000 |
commit | 9f07225265dbca3b1901bfb75bb839d2030f7fd6 (patch) | |
tree | 5d7b336f25e751f322cb07d27e9ccdbe680d6a5f /src | |
parent | 7b96b045c9b18efe8513453f1d0344eebe776715 (diff) | |
download | sos-9f07225265dbca3b1901bfb75bb839d2030f7fd6.tar.gz |
* updated plugins to use new root_symlink parameter (which mimics sysreport structure using symlinks)
git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@188 ef72aa8b-4018-0410-8976-d6e080ef94d8
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/sos/plugins/cluster.py | 6 | ||||
-rw-r--r-- | src/lib/sos/plugins/devicemapper.py | 2 | ||||
-rw-r--r-- | src/lib/sos/plugins/filesys.py | 6 | ||||
-rw-r--r-- | src/lib/sos/plugins/general.py | 6 | ||||
-rw-r--r-- | src/lib/sos/plugins/hardware.py | 2 | ||||
-rw-r--r-- | src/lib/sos/plugins/kernel.py | 4 | ||||
-rw-r--r-- | src/lib/sos/plugins/memory.py | 2 | ||||
-rw-r--r-- | src/lib/sos/plugins/networking.py | 8 | ||||
-rw-r--r-- | src/lib/sos/plugins/process.py | 4 | ||||
-rw-r--r-- | src/lib/sos/plugins/rhn.py | 6 | ||||
-rw-r--r-- | src/lib/sos/plugins/rpm.py | 4 | ||||
-rw-r--r-- | src/lib/sos/plugins/selinux.py | 2 | ||||
-rw-r--r-- | src/lib/sos/plugins/startup.py | 3 | ||||
-rw-r--r-- | src/lib/sos/plugins/xen.py | 5 |
14 files changed, 36 insertions, 24 deletions
diff --git a/src/lib/sos/plugins/cluster.py b/src/lib/sos/plugins/cluster.py index 00ef1753..feaafc0e 100644 --- a/src/lib/sos/plugins/cluster.py +++ b/src/lib/sos/plugins/cluster.py @@ -24,6 +24,12 @@ class cluster(sos.plugintools.PluginBase): self.addCopySpec("/etc/cluster") self.collectExtOutput("/usr/sbin/rg_test test /etc/cluster/cluster.conf") self.addCopySpec("/proc/cluster") + self.collectExtOutput("cman_tool status") + self.collectExtOutput("cman_tool services") + self.collectExtOutput("cman_tool -af nodes") + self.collectExtOutput("ccs_tool lsnode") + self.collectExtOutput("openais-cfgtool -s") + self.collectExtOutput("clustat") return def postproc(self): diff --git a/src/lib/sos/plugins/devicemapper.py b/src/lib/sos/plugins/devicemapper.py index bf56aee8..9627b823 100644 --- a/src/lib/sos/plugins/devicemapper.py +++ b/src/lib/sos/plugins/devicemapper.py @@ -23,7 +23,7 @@ class devicemapper(sos.plugintools.PluginBase): self.collectExtOutput("/sbin/dmsetup status") self.collectExtOutput("/usr/sbin/vgscan -vvv") - self.collectExtOutput("/usr/sbin/vgdisplay -vv") + self.collectExtOutput("/usr/sbin/vgdisplay -vv", root_symlink = "vgdisplay") self.collectExtOutput("/usr/sbin/pvscan -v") self.collectExtOutput("/usr/sbin/lvs -a -o +devices") self.collectExtOutput("/usr/sbin/pvs -a -v") diff --git a/src/lib/sos/plugins/filesys.py b/src/lib/sos/plugins/filesys.py index 9e507423..c7f7dee0 100644 --- a/src/lib/sos/plugins/filesys.py +++ b/src/lib/sos/plugins/filesys.py @@ -29,9 +29,9 @@ class filesys(sos.plugintools.PluginBase): self.addCopySpec("/etc/auto.misc") self.addCopySpec("/etc/auto.net") - self.collectExtOutput("/bin/df -al") - self.collectExtOutput("/usr/sbin/lsof -b +M -n -l") - self.collectExtOutput("/bin/mount -l") + self.collectExtOutput("/bin/df -al", root_symlink = "df") + self.collectExtOutput("/usr/sbin/lsof -b +M -n -l", root_symlink = "lsof") + self.collectExtOutput("/bin/mount -l", root_symlink = "mount") self.collectExtOutput("/sbin/blkid") raiddevs = commands.getoutput("/bin/cat /proc/partitions | /bin/egrep -v \"^major|^$\" | /bin/awk '{print $4}' | /bin/grep \/ | /bin/egrep -v \"p[0123456789]$\"") diff --git a/src/lib/sos/plugins/general.py b/src/lib/sos/plugins/general.py index 170e5920..c9d23bcf 100644 --- a/src/lib/sos/plugins/general.py +++ b/src/lib/sos/plugins/general.py @@ -27,9 +27,9 @@ class general(sos.plugintools.PluginBase): self.addCopySpec("/var/log/secure") self.addCopySpec("/var/log/up2date") self.addCopySpec("/etc/exports") - self.collectExtOutput("/bin/hostname") - self.collectExtOutput("/bin/date") - self.collectExtOutput("/usr/bin/uptime") + self.collectExtOutput("/bin/hostname", root_symlink = "hostname") + self.collectExtOutput("/bin/date", root_symlink = "date") + self.collectExtOutput("/usr/bin/uptime", root_symlink = "uptime") return def postproc(self): diff --git a/src/lib/sos/plugins/hardware.py b/src/lib/sos/plugins/hardware.py index 12106c3b..f5e91d43 100644 --- a/src/lib/sos/plugins/hardware.py +++ b/src/lib/sos/plugins/hardware.py @@ -36,7 +36,7 @@ class hardware(sos.plugintools.PluginBase): self.addCopySpec("/proc/dasd") self.addCopySpec("/proc/s390dbf/tape") self.collectExtOutput("/usr/share/rhn/up2dateclient/hardware.py") - self.collectExtOutput("/sbin/lspci -vvn") + self.collectExtOutput("""/bin/echo "lspci" ; /bin/echo ; /sbin/lspci ; /bin/echo ; /bin/echo "lspci -n" ; /bin/echo ; /sbin/lspci -nv ; /bin/echo ; /bin/echo "lspci -nvv" ; /bin/echo ; /sbin/lspci -nvv""", suggest_filename = "lspci", root_symlink = "lspci") self.collectExtOutput("/bin/dmesg | /bin/grep -e 'e820.' -e 'agp.'") tmpreg = "" diff --git a/src/lib/sos/plugins/kernel.py b/src/lib/sos/plugins/kernel.py index 3e64252d..843a590e 100644 --- a/src/lib/sos/plugins/kernel.py +++ b/src/lib/sos/plugins/kernel.py @@ -47,8 +47,8 @@ class kernel(sos.plugintools.PluginBase): def setup(self): - self.collectExtOutput("/bin/uname -a") - self.moduleFile = self.collectOutputNow("/sbin/lsmod") + self.collectExtOutput("/bin/uname -a", root_symlink = "uname") + self.moduleFile = self.collectOutputNow("/sbin/lsmod", root_symlink = "lsmod") if self.isOptionEnabled('modinfo'): for kmod in commands.getoutput('/sbin/lsmod | /bin/cut -f1 -d" " 2>/dev/null | /bin/grep -v Module 2>/dev/null').split('\n'): if '' != kmod.strip(): diff --git a/src/lib/sos/plugins/memory.py b/src/lib/sos/plugins/memory.py index fa943a3c..43539b77 100644 --- a/src/lib/sos/plugins/memory.py +++ b/src/lib/sos/plugins/memory.py @@ -24,7 +24,7 @@ class memory(sos.plugintools.PluginBase): self.addCopySpec("/proc/slabinfo") self.collectExtOutput("/bin/dmesg | grep -e 'e820.' -e 'aperature.'") - self.collectExtOutput("/usr/bin/free") + self.collectExtOutput("/usr/bin/free", root_symlink = "free") self.collectExtOutput("/usr/bin/free -m") return diff --git a/src/lib/sos/plugins/networking.py b/src/lib/sos/plugins/networking.py index 54a41655..997026ee 100644 --- a/src/lib/sos/plugins/networking.py +++ b/src/lib/sos/plugins/networking.py @@ -21,8 +21,8 @@ class networking(sos.plugintools.PluginBase): optionList = [("traceroute", "collects a traceroute to rhn.redhat.com", "slow", 0)] def get_interface_name(self,ifconfigFile): - """Return a dictionnary for wich key are intefrace name according to the - output of ifcongif-a stored in ifconfigFile. + """Return a dictionary for which key are interface name according to the + output of ifconifg-a stored in ifconfigFile. """ out={} if(os.path.isfile(ifconfigFile)): @@ -57,8 +57,8 @@ class networking(sos.plugintools.PluginBase): self.addCopySpec("/etc/xinetd.d") self.addCopySpec("/etc/host*") self.addCopySpec("/etc/resolv.conf") - ifconfigFile=self.collectExtOutput("/sbin/ifconfig -a") - self.collectExtOutput("/sbin/route -n") + ifconfigFile=self.collectExtOutput("/sbin/ifconfig -a", root_symlink = "ifconfig") + self.collectExtOutput("/sbin/route -n", root_symlink = "route") self.collectExtOutput("/sbin/ipchains -nvL") self.collectIPTable("filter") self.collectIPTable("nat") diff --git a/src/lib/sos/plugins/process.py b/src/lib/sos/plugins/process.py index 2cd1205b..552049fd 100644 --- a/src/lib/sos/plugins/process.py +++ b/src/lib/sos/plugins/process.py @@ -18,7 +18,7 @@ class process(sos.plugintools.PluginBase): """This plugin gathers process information """ def setup(self): - self.collectExtOutput("/bin/ps auxww") - self.collectExtOutput("/usr/bin/pstree") + self.collectExtOutput("/bin/ps auxww", root_symlink = "ps") + self.collectExtOutput("/usr/bin/pstree", root_symlink = "pstree") return diff --git a/src/lib/sos/plugins/rhn.py b/src/lib/sos/plugins/rhn.py index 04222e61..ff3fc751 100644 --- a/src/lib/sos/plugins/rhn.py +++ b/src/lib/sos/plugins/rhn.py @@ -17,13 +17,15 @@ from sos.plugintools import PluginBase class rhn(PluginBase): """This plugin gathers RHN server related information """ - def setup(self): + def checkenabled(self): # XXX check for the presence of requisite packages satellite = self.cInfo["policy"].pkgByName("rhns-satellite-tools") proxy = self.cInfo["policy"].pkgByName("rhns-proxy-tools") if not satellite and not proxy: - return + return False + return True + def setup(self): # # First, grab things needed from both Satellite and Proxy systems # diff --git a/src/lib/sos/plugins/rpm.py b/src/lib/sos/plugins/rpm.py index d9b64c20..169d675e 100644 --- a/src/lib/sos/plugins/rpm.py +++ b/src/lib/sos/plugins/rpm.py @@ -24,9 +24,9 @@ class rpm(sos.plugintools.PluginBase): self.addCopySpec("/var/log/rpmpkgs") if self.isOptionEnabled("rpmq"): - self.collectExtOutput("/bin/rpm -qa --qf \"%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH}\n\"") + self.collectExtOutput("/bin/rpm -qa --qf \"%{NAME}-%{VERSION}-%{RELEASE}-%{ARCH}\n\"", root_symlink = "installed-rpms") if self.isOptionEnabled("rpmva"): - self.collectExtOutput("/bin/rpm -Va") + self.collectExtOutput("/bin/rpm -Va", root_symlink = "rpm-Va") return diff --git a/src/lib/sos/plugins/selinux.py b/src/lib/sos/plugins/selinux.py index 6aa61d58..2e56964a 100644 --- a/src/lib/sos/plugins/selinux.py +++ b/src/lib/sos/plugins/selinux.py @@ -20,7 +20,7 @@ class selinux(sos.plugintools.PluginBase): def setup(self): self.addCopySpec("/etc/selinux/*") self.collectExtOutput("/usr/bin/selinuxconfig") - self.collectExtOutput("/usr/sbin/sestatus") + self.collectExtOutput("/usr/sbin/sestatus", root_symlink = "sestatus") self.collectExtOutput("/bin/rpm -q -V selinux-policy-targeted") self.collectExtOutput("/bin/rpm -q -V selinux-policy-strict") return diff --git a/src/lib/sos/plugins/startup.py b/src/lib/sos/plugins/startup.py index 83ee5ba4..29adf738 100644 --- a/src/lib/sos/plugins/startup.py +++ b/src/lib/sos/plugins/startup.py @@ -20,7 +20,6 @@ class startup(sos.plugintools.PluginBase): def setup(self): self.addCopySpec("/etc/rc.d") - self.collectExtOutput("/sbin/chkconfig --list") - # self.collectExtOutput("/bin/ls /etc/rc.d/rc*.d/") # This is redundant. + self.collectExtOutput("/sbin/chkconfig --list", root_symlink = "chkconfig") return diff --git a/src/lib/sos/plugins/xen.py b/src/lib/sos/plugins/xen.py index d29aa17b..ee225efd 100644 --- a/src/lib/sos/plugins/xen.py +++ b/src/lib/sos/plugins/xen.py @@ -31,6 +31,11 @@ class xen(sos.plugintools.PluginBase): return "domU" return "baremetal" + def checkenabled(self): + if self.determineXenHost() == "baremetal": + return False + return True + def domCollectProc(self): self.addCopySpec("/proc/xen/balloon") self.addCopySpec("/proc/xen/capabilities") |