aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/sos/plugins/autofs.py2
-rw-r--r--src/lib/sos/plugins/general.py1
-rw-r--r--src/lib/sos/plugins/initrd.py4
-rw-r--r--src/lib/sos/plugins/kernel.py2
-rw-r--r--src/lib/sos/plugins/ldap.py24
-rw-r--r--src/lib/sos/plugins/libraries.py2
-rw-r--r--src/lib/sos/plugins/networking.py10
-rw-r--r--src/lib/sos/plugins/nfsserver.py5
-rw-r--r--src/lib/sos/plugins/startup.py1
-rwxr-xr-xsrc/lib/sos/policyredhat.py7
10 files changed, 39 insertions, 19 deletions
diff --git a/src/lib/sos/plugins/autofs.py b/src/lib/sos/plugins/autofs.py
index 48dd57b4..cbf3b299 100644
--- a/src/lib/sos/plugins/autofs.py
+++ b/src/lib/sos/plugins/autofs.py
@@ -15,7 +15,7 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import sos.plugintools
-import os, re
+import os
class autofs(sos.plugintools.PluginBase):
"""autofs server-related information
diff --git a/src/lib/sos/plugins/general.py b/src/lib/sos/plugins/general.py
index 2e142013..44d9da05 100644
--- a/src/lib/sos/plugins/general.py
+++ b/src/lib/sos/plugins/general.py
@@ -33,7 +33,6 @@ class general(sos.plugintools.PluginBase):
self.addCopySpecLimit("/var/log/secure.*", sizelimit = self.isOptionEnabled("syslogsize"))
self.addCopySpec("/var/log/sa")
self.addCopySpec("/var/log/up2date")
- self.addCopySpec("/etc/exports")
self.collectExtOutput("/bin/hostname", root_symlink = "hostname")
self.collectExtOutput("/bin/date", root_symlink = "date")
self.collectExtOutput("/usr/bin/uptime", root_symlink = "uptime")
diff --git a/src/lib/sos/plugins/initrd.py b/src/lib/sos/plugins/initrd.py
index 83356548..7bd7e1f3 100644
--- a/src/lib/sos/plugins/initrd.py
+++ b/src/lib/sos/plugins/initrd.py
@@ -20,9 +20,9 @@ class initrd(sos.plugintools.PluginBase):
"""
def setup(self):
for initrd in glob.glob('/boot/initrd-*.img'):
- self.collectExtOutput("/bin/zcat "+initrd+" | /bin/cpio "+
+ self.collectExtOutput("/bin/zcat "+initrd+" | /bin/cpio "+
"--extract --to-stdout init" )
return
def defaultenabled(self):
- return False
+ return False
diff --git a/src/lib/sos/plugins/kernel.py b/src/lib/sos/plugins/kernel.py
index 8ca53b66..3640f3fa 100644
--- a/src/lib/sos/plugins/kernel.py
+++ b/src/lib/sos/plugins/kernel.py
@@ -28,7 +28,7 @@ class kernel(sos.plugintools.PluginBase):
{'regex':'vxportal*', 'description':'Veritas module'},
{'regex':'vxdmp*', 'description':'Veritas dynamic multipathing module'},
{'regex':'vxio*', 'description':'Veritas module'},
- {'regex':'vxspec*"', 'description':'Veritas module'},
+ {'regex':'vxspec*', 'description':'Veritas module'},
{'regex':'dcd*', 'description':'Dell OpenManage Server Administrator module'},
{'regex':'ocfs', 'description':'Oracle cluster filesystem module'},
{'regex':'oracle*', 'description':'Oracle module'},
diff --git a/src/lib/sos/plugins/ldap.py b/src/lib/sos/plugins/ldap.py
index 318a3ba9..ee50acde 100644
--- a/src/lib/sos/plugins/ldap.py
+++ b/src/lib/sos/plugins/ldap.py
@@ -13,10 +13,34 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import sos.plugintools
+import os
class ldap(sos.plugintools.PluginBase):
"""LDAP related information
"""
+ def get_ldap_opts(self):
+ # capture /etc/openldap/ldap.conf options in dict
+ # FIXME: possibly not hardcode these options in?
+ ldapopts=["URI","BASE","TLS_CACERTDIR"]
+ results={}
+ tmplist=[]
+ for i in ldapopts:
+ t=fileGrep(r"^%s*" % i,"/etc/openldap/ldap.conf")
+ for x in t:
+ tmplist.append(x.split(" "))
+ for i in tmplist:
+ results[i[0]]=i[1].rstrip("\n")
+ return results
+
+ def diagnose(self):
+ # Validate ldap client options
+ ldapopts=self.get_ldap_opts()
+ try:
+ os.stat(ldapopts["TLS_CACERTDIR"])
+ except:
+ self.addDiagnose("%s does not exist and can cause connection issues "+
+ "involving TLS" % ldapopts["TLS_CACERTDIR"])
+
def setup(self):
self.addCopySpec("/etc/ldap.conf")
self.addCopySpec("/etc/openldap")
diff --git a/src/lib/sos/plugins/libraries.py b/src/lib/sos/plugins/libraries.py
index 70b63dba..80108869 100644
--- a/src/lib/sos/plugins/libraries.py
+++ b/src/lib/sos/plugins/libraries.py
@@ -20,5 +20,7 @@ class libraries(sos.plugintools.PluginBase):
def setup(self):
self.addCopySpec("/etc/ld.so.conf")
self.addCopySpec("/etc/ld.so.conf.d")
+ self.collectExtOutput("/sbin/ldconfig -v")
+ self.collectExtOutput("/sbin/ldconfig -p")
return
diff --git a/src/lib/sos/plugins/networking.py b/src/lib/sos/plugins/networking.py
index 080ae694..e578f830 100644
--- a/src/lib/sos/plugins/networking.py
+++ b/src/lib/sos/plugins/networking.py
@@ -25,13 +25,9 @@ class networking(sos.plugintools.PluginBase):
output of ifconifg-a stored in ifconfigFile.
"""
out={}
- if(os.path.isfile(ifconfigFile)):
- f=open(ifconfigFile,'r')
- content=f.read()
- f.close()
- reg=re.compile(r"^(eth\d+)\D",re.MULTILINE)
- for name in reg.findall(content):
- out[name]=1
+ reg=self.fileGrep(r"^(eth\d+)\D", ifconfigFile)
+ for name in reg:
+ out[name]=1
return out
def collectIPTable(self,tablename):
diff --git a/src/lib/sos/plugins/nfsserver.py b/src/lib/sos/plugins/nfsserver.py
index 9564aa22..1e352032 100644
--- a/src/lib/sos/plugins/nfsserver.py
+++ b/src/lib/sos/plugins/nfsserver.py
@@ -35,7 +35,10 @@ class nfsserver(sos.plugintools.PluginBase):
def setup(self):
self.addCopySpec("/etc/exports")
+ self.addCopySpec("/var/lib/nfs/etab")
+ self.addCopySpec("/var/lib/nfs/xtab")
+ self.addCopySpec("/var/lib/nfs/rmtab")
self.collectExtOutput("/usr/sbin/rpcinfo -p localhost")
- self.collectExtOutput("/usr/sbin/nfsstat")
+ self.collectExtOutput("/usr/sbin/nfsstat -a")
return
diff --git a/src/lib/sos/plugins/startup.py b/src/lib/sos/plugins/startup.py
index 59014aaa..a0d3e400 100644
--- a/src/lib/sos/plugins/startup.py
+++ b/src/lib/sos/plugins/startup.py
@@ -19,7 +19,6 @@ class startup(sos.plugintools.PluginBase):
"""
def setup(self):
self.addCopySpec("/etc/rc.d")
-
self.collectExtOutput("/sbin/chkconfig --list", root_symlink = "chkconfig")
self.collectExtOutput("/sbin/runlevel")
return
diff --git a/src/lib/sos/policyredhat.py b/src/lib/sos/policyredhat.py
index 6aae9321..aed36434 100755
--- a/src/lib/sos/policyredhat.py
+++ b/src/lib/sos/policyredhat.py
@@ -96,11 +96,8 @@ class SosPolicy:
def runlevelDefault(self):
try:
- f=open("/etc/inittab",'r')
- content=f.read()
- f.close()
- reg=re.compile(r"^id:(\d{1}):initdefault:\D",re.MULTILINE)
- for initlevel in reg.findall(content):
+ reg=self.fileGrep(r"^id:(\d{1}):initdefault:", "/etc/inittab")
+ for initlevel in reg:
return initlevel
except:
return 3