[sos-devel] [PATCH] [powerpc] Read msglog file, instead of copying it

Kamalesh Babulal kamalesh at linux.vnet.ibm.com
Fri Oct 23 05:56:28 UTC 2015


/sys/firmware/opal/msglog file is a read interface to
capture OPAL ring buffer. Copying msglog file, will
result in file being ignored as size of the file will
be zero always.

Fix this issue by removing the file from list of files
to be copied and read the file to capture the ring buffer
as command output.

Reported-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
Signed-off-by: Kamalesh Babulal <kamalesh at linux.vnet.ibm.com>
Cc: Bryn M. Reeves <bmr at redhat.com>
---
 sos/plugins/powerpc.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py
index 051c237719a7..5cd0905ed898 100644
--- a/sos/plugins/powerpc.py
+++ b/sos/plugins/powerpc.py
@@ -85,9 +85,11 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin):
                 "/proc/ppc64/eeh",
                 "/proc/ppc64/systemcfg"
                 "/proc/ppc64/topology_updates"
-                "/sys/firmware/opal/msglog",
                 "/var/log/opal-elog/"
             ])
+            self.add_cmd_output([
+                "cat /sys/firmware/opal/msglog",
+            ])
             if os.path.isdir("/var/log/dump"):
                 self.add_cmd_output("ls -l /var/log/dump")
 
-- 
2.6.0.rc1




More information about the sos-devel mailing list