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

Kamalesh Babulal kamalesh at linux.vnet.ibm.com
Fri Oct 23 11:02:25 UTC 2015



On Friday 23 October 2015 11:26 AM, Kamalesh Babulal wrote:
> /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")
>

Kindly ignore this patch, add_copy_spec() already does the right
thing. Sorry for the noise.

-- 
Cheers,
Kamalesh




More information about the sos-devel mailing list