sos/sos-kernel-additional-diagnostic.patch
Bryn M. Reeves 89b86368f8 Update spec file for sos-3.2-1
Update sos in rawhide to the upstream 3.2 release and additional
patches including the fix for CVE-2015-7529.
2015-12-16 15:53:30 +00:00

277 lines
8.1 KiB
Diff

From 9c1e646da727817de23c0b46a16885c03c7d4af1 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Tue, 10 Feb 2015 19:34:50 +0000
Subject: [PATCH] [kernel] collect /sys/firmware/acpi/*
Collect ACPI firmware tables and state from /sys.
Related: #490.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/kernel.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py
index 877b2bb..6b93ab7 100644
--- a/sos/plugins/kernel.py
+++ b/sos/plugins/kernel.py
@@ -49,6 +49,7 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"/sys/module/*/initstate",
"/sys/module/*/refcnt",
"/sys/module/*/taint",
+ "/sys/firmware/acpi/*",
"/proc/kallsyms",
"/proc/buddyinfo",
"/proc/slabinfo",
--
1.8.3.1
From 14686f55bd5bc7169eb06a871ada7bc3461b306b Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Tue, 10 Feb 2015 19:43:08 +0000
Subject: [PATCH] [memory] add ksm, swap and vmallocinfo data to plugin
Related: #490.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/memory.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/sos/plugins/memory.py b/sos/plugins/memory.py
index 0f20e99..1b27eba 100644
--- a/sos/plugins/memory.py
+++ b/sos/plugins/memory.py
@@ -27,9 +27,16 @@ class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"/proc/pci",
"/proc/meminfo",
"/proc/vmstat",
+ "/proc/swaps",
"/proc/slabinfo",
- "/proc/pagetypeinfo"])
+ "/proc/pagetypeinfo",
+ "/proc/vmallocinfo",
+ "/sys/kernel/mm/ksm"
+ ])
self.add_cmd_output("free", root_symlink="free")
- self.add_cmd_output("free -m")
+ self.add_cmd_output([
+ "free -m",
+ "swapon --show"
+ ])
# vim: et ts=4 sw=4
--
1.8.3.1
From 58a6d777d7b5fc4ef72e185ccd916110a73f48d2 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Tue, 10 Feb 2015 19:47:14 +0000
Subject: [PATCH] [block] collect /proc/diskstats
Related: #490.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/block.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sos/plugins/block.py b/sos/plugins/block.py
index 8c73ef6..7984f0d 100644
--- a/sos/plugins/block.py
+++ b/sos/plugins/block.py
@@ -24,8 +24,6 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
profiles = ('storage', 'hardware')
def setup(self):
- self.add_copy_spec("/proc/partitions")
-
self.add_cmd_output([
"lsblk",
"blkid -c /dev/null",
@@ -36,7 +34,9 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
# legacy location for non-/run distributions
self.add_copy_spec([
"/etc/blkid.tab",
- "/run/blkid/blkid.tab"
+ "/run/blkid/blkid.tab",
+ "/proc/partitions",
+ "/proc/diskstats"
])
if os.path.isdir("/sys/block"):
--
1.8.3.1
From 4cc076409f65792c071e4cf027a78c847f7b5ff8 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Tue, 10 Feb 2015 19:48:59 +0000
Subject: [PATCH] [process] collect /proc/sched_debug
Related: #490.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/process.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/sos/plugins/process.py b/sos/plugins/process.py
index ab66322..cae8443 100644
--- a/sos/plugins/process.py
+++ b/sos/plugins/process.py
@@ -23,6 +23,7 @@ class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
profiles = ('system',)
def setup(self):
+ self.add_copy_spec("/proc/sched_debug")
self.add_cmd_output("ps auxwww", root_symlink="ps")
self.add_cmd_output("pstree", root_symlink="pstree")
self.add_cmd_output("lsof -b +M -n -l", root_symlink="lsof")
--
1.8.3.1
From f3ec78df7060c4ac3cead99775f162a9b5d604f7 Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Wed, 11 Feb 2015 20:06:59 +0000
Subject: [PATCH] [kernel] collect directory listings for module updates
Related #490.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/kernel.py | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/sos/plugins/kernel.py b/sos/plugins/kernel.py
index 6b93ab7..97300e2 100644
--- a/sos/plugins/kernel.py
+++ b/sos/plugins/kernel.py
@@ -14,6 +14,7 @@
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
import os
+import glob
class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
@@ -36,10 +37,21 @@ class Kernel(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
except OSError:
self._log_warn("could not list %s" % self.sys_module)
+ # find /lib/modules/*/{extras,updates,weak-updates} -ls
+ extra_mod_patterns = [
+ "/lib/modules/*/extra",
+ "/lib/modules/*/updates",
+ "/lib/modules/*/weak-updates",
+ ]
+ extra_mod_paths = []
+ for pattern in extra_mod_patterns:
+ extra_mod_paths.extend(glob.glob(pattern))
+
self.add_cmd_output([
"dmesg",
"sysctl -a",
- "dkms status"
+ "dkms status",
+ "find %s -ls" % " ".join(extra_mod_paths)
])
self.add_copy_spec([
--
1.8.3.1
From 895803a4c7d014b231cfe9804bd1c04fe37b5f5e Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Wed, 11 Feb 2015 20:15:37 +0000
Subject: [PATCH] [mpt] add plugin
Add a plugin to collect LSI Message Passing Technology driver
status from /proc.
Related: #490.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/mpt.py | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
create mode 100644 sos/plugins/mpt.py
diff --git a/sos/plugins/mpt.py b/sos/plugins/mpt.py
new file mode 100644
index 0000000..bb158cc
--- /dev/null
+++ b/sos/plugins/mpt.py
@@ -0,0 +1,30 @@
+# Copyright (C) 2015 Red Hat, Inc., Bryn M. Reeves <bmr@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.
+
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
+
+
+class Mpt(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+ """ LSI Message Passing Technology
+ """
+ files = ('/proc/mpt',)
+ profiles = ('storage', )
+ plugin_name = 'mpt'
+
+ def setup(self):
+ self.add_copy_spec("/proc/mpt")
+
+# vim: et ts=4 sw=4
--
1.8.3.1
From fc4e2be53eeeaa9ab0d4d089335bbeb007c1817e Mon Sep 17 00:00:00 2001
From: "Bryn M. Reeves" <bmr@redhat.com>
Date: Thu, 27 Aug 2015 18:07:46 +0100
Subject: [PATCH] [memory] collect swapon --show output in bytes
Default is human readable:
$ swapon --show
NAME TYPE SIZE USED PRIO
/dev/dm-0 partition 1.5G 0B -1
Should be:
$ swapon --show --bytes
NAME TYPE SIZE USED PRIO
/dev/dm-0 partition 1610608640 0 -1
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
---
sos/plugins/memory.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sos/plugins/memory.py b/sos/plugins/memory.py
index 4c41896..710f73f 100644
--- a/sos/plugins/memory.py
+++ b/sos/plugins/memory.py
@@ -36,7 +36,7 @@ class Memory(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
self.add_cmd_output("free", root_symlink="free")
self.add_cmd_output([
"free -m",
- "swapon --show"
+ "swapon --bytes --show"
])
# vim: et ts=4 sw=4
--
1.8.3.1