From 938fe65f34bac7324c794ebe81b98c13a70a67a5 Mon Sep 17 00:00:00 2001 From: astokes Date: Wed, 6 Jan 2010 16:50:54 +0000 Subject: lots o bugfixes git-svn-id: svn+ssh://svn.fedorahosted.org/svn/sos/trunk@671 ef72aa8b-4018-0410-8976-d6e080ef94d8 --- src/extras/rh-upload | 22 +++++++++++----------- src/lib/sos/plugins/cluster.py | 10 ++++++++++ src/lib/sos/plugins/nscd.py | 12 ++++++++++++ src/lib/sos/plugins/sar.py | 2 +- 4 files changed, 34 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/extras/rh-upload b/src/extras/rh-upload index 6ec04511..75a86f43 100755 --- a/src/extras/rh-upload +++ b/src/extras/rh-upload @@ -1,20 +1,20 @@ #!/bin/bash ################################################################################# -# # +# # # rh-upload # -# Version - 0.3 # -# Copyright (c) 2007 Red Hat, Inc. All rights reserved. # -# # -# # -# Written by David Mair # +# Version - 0.3 # +# Copyright (c) 2007 Red Hat, Inc. All rights reserved. # +# # +# # +# Written by David Mair # # Cleanup and generalized for any kind of file by Olivier Arsac # -# Idea stolen from Chris Snook :-) # -# # +# Idea stolen from Chris Snook :-) # +# # # Purpose - To help in the automatic upload of files. # -# Specifically, this script will compress, encrypt, md5sum, # -# and upload the file automatically when invoked. # -# Items are optional and specified by command line switch. # +# Specifically, this script will compress, encrypt, md5sum, # +# and upload the file automatically when invoked. # +# Items are optional and specified by command line switch. # # ############################################################################### diff --git a/src/lib/sos/plugins/cluster.py b/src/lib/sos/plugins/cluster.py index 64860b5b..2e531532 100644 --- a/src/lib/sos/plugins/cluster.py +++ b/src/lib/sos/plugins/cluster.py @@ -202,6 +202,16 @@ class cluster(sos.plugintools.PluginBase): # Test fence groups for valid id and state self.test_fence_id() + + # Check for existence of weak-updates in gfs2 prior to 2.6.18-128 + if rhelver == 5: + vermagic = commands.getoutput("modinfo -F vermagic gfs2") + # just kernel release from vermagic line + vermagic = vermagic.split()[0].lstrip('2.6.18-') + vermagic = vermagic[:vermagic.find('.')] + if int(vermagic) < 128: + self.addDiagnose('GFS2 is being used via weak-updates, kmod-gfs2 should be uninstalled and system reboot' \ + 'to allow for kernel provided gfs2 module to be used.') def setup(self): self.collectExtOutput("/sbin/fdisk -l") diff --git a/src/lib/sos/plugins/nscd.py b/src/lib/sos/plugins/nscd.py index ed0e2eb7..c79afe73 100644 --- a/src/lib/sos/plugins/nscd.py +++ b/src/lib/sos/plugins/nscd.py @@ -20,6 +20,10 @@ from os.path import exists class nscd(sos.plugintools.PluginBase): """NSCD related information """ + + optionList = [("nscdlogsize", "max size (MiB) to collect per nscd log file", + "", 50)] + def checkenabled(self): if self.cInfo["policy"].pkgByName("nscd") or exists("/etc/nscd.conf"): return True @@ -27,5 +31,13 @@ class nscd(sos.plugintools.PluginBase): def setup(self): self.addCopySpec("/etc/nscd.conf") + + opt = self.fileGrep(r"^\s*logfile", "/etc/nscd.conf") + if (len(opt) > 0): + for o in opt: + f = o.split() + self.addCopySpecLimit(f[1], + sizelimit = self.isOptionEnabled("nscdlogsize")) + return diff --git a/src/lib/sos/plugins/sar.py b/src/lib/sos/plugins/sar.py index 26e97715..9a3b3c92 100644 --- a/src/lib/sos/plugins/sar.py +++ b/src/lib/sos/plugins/sar.py @@ -26,7 +26,7 @@ class sar(sos.plugintools.PluginBase): if fname[0:2] == 'sa' and fname[2:3] != 'r': sar_filename = 'sar' + fname[2:4] if sar_filename not in dirList: - sar_command = "/usr/bin/sar -A -f /var/log/sa/" + fname + sar_command = "/bin/sh -c \"LANG=C /usr/bin/sar -A -f /var/log/sa/" + fname + "\"" self.collectOutputNow(sar_command, sar_filename, root_symlink=sar_filename) return -- cgit