From mukesh02 at linux.vnet.ibm.com Thu Dec 1 12:46:14 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Thu, 1 Dec 2016 18:16:14 +0530 Subject: [sos-devel] [PATCH] plugin/ipmitool : Add usb interface if available instead of using default interface Message-ID: <1480596374-8382-1-git-send-email-mukesh02@linux.vnet.ibm.com> SOSREPORT generally uses the default interface (/dev/ipmi0) while executing ipmitool command, which is quite slow as compare to usb interface. This usb interface uses the virtual device exposed from BMC like in OpenPower system AMI exposes virtual USB interface. IPMITOOL command with usb interface sends the data to the kernel drivers which inturn sends it to the BMC. This patch enables ipmitool command to use usb interface if available. With this patch: ================ root at ubuntu1604:/home/mukesh/sos# ./sosreport --config sos.conf -o ipmitool sosreport (version 3.2) This command will collect system configuration and diagnostic information from this Ubuntu system. An archive containing the collected information will be generated in /tmp/sos.TF8N8E. For more information on Ubuntu visit: http://www.ubuntu.com/ The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No changes will be made to system configuration. Press ENTER to continue, or CTRL-C to quit. Please enter your first initial and last name [ubuntu1604]: Please enter the case id that you are generating this report for []: Setting up archive ... Setting up plugins ... Running plugins. Please wait ... Running 1/1: ipmitool... Creating compressed archive... Your sosreport has been generated and saved in: /tmp/sosreport-ubuntu1604-20161130110402.tar.xz The checksum is: adfdbc8475874d7ad1077a3d2eda151b Please send this file to your support representative. root at ubuntu1604:/home/mukesh/sos# tar -xvf /tmp/sosreport-ubuntu1604-20161130110402.tar.xz sosreport-ubuntu1604-20161130110402/ sosreport-ubuntu1604-20161130110402/version.txt sosreport-ubuntu1604-20161130110402/sos_reports/ sosreport-ubuntu1604-20161130110402/sos_reports/sos.txt sosreport-ubuntu1604-20161130110402/sos_reports/sos.html sosreport-ubuntu1604-20161130110402/sos_commands/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sdr_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_chassis_status sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_fru_print sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sensor_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_mc_info sosreport-ubuntu1604-20161130110402/sos_logs/ sosreport-ubuntu1604-20161130110402/sos_logs/ui.log sosreport-ubuntu1604-20161130110402/sos_logs/sos.log Signed-off-by: Mukesh Ojha --- Changes in V3: - Changed the way to check usb interface availability. Changes in V2: - Removed redundant code added in V1 as per Vasant's suggestion. sos/plugins/ipmitool.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/sos/plugins/ipmitool.py b/sos/plugins/ipmitool.py index 6c9c531..17aa8b8 100644 --- a/sos/plugins/ipmitool.py +++ b/sos/plugins/ipmitool.py @@ -13,6 +13,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +import subprocess from sos.plugins import Plugin, RedHatPlugin, DebianPlugin @@ -26,14 +27,24 @@ class IpmiTool(Plugin, RedHatPlugin, DebianPlugin): packages = ('ipmitool',) def setup(self): + p = subprocess.Popen('ipmitool -I usb mc info', shell=True, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + p.communicate() + isusbIntfEnable = p.returncode + + if not isusbIntfEnable: + cmd = "ipmitool -I usb" + else: + cmd = "ipmitool" + self.add_cmd_output([ - "ipmitool sel info", - "ipmitool sel list", - "ipmitool sensor list", - "ipmitool chassis status", - "ipmitool fru print", - "ipmitool mc info", - "ipmitool sdr info" + "%s sel info" % cmd, + "%s sel list" % cmd, + "%s sensor list" % cmd, + "%s chassis status" % cmd, + "%s fru print" % cmd, + "%s mc info" % cmd, + "%s sdr info" % cmd ]) # vim: set et ts=4 sw=4 : -- 2.7.4 From bmr at redhat.com Thu Dec 1 12:55:01 2016 From: bmr at redhat.com (Bryn M. Reeves) Date: Thu, 1 Dec 2016 12:55:01 +0000 Subject: [sos-devel] [PATCH] plugin/ipmitool : Add usb interface if available instead of using default interface In-Reply-To: <1480596374-8382-1-git-send-email-mukesh02@linux.vnet.ibm.com> References: <1480596374-8382-1-git-send-email-mukesh02@linux.vnet.ibm.com> Message-ID: <20161201125501.GA23646@dhcp-24-182.fab.redhat.com> On Thu, Dec 01, 2016 at 06:16:14PM +0530, Mukesh Ojha wrote: > +import subprocess > from sos.plugins import Plugin, RedHatPlugin, DebianPlugin Please don't invent new ways to call programs using subprocess - use the existing wrappers in the base Plugin class and the utilities module. For this use you probably want Plugin.get_command_output() (just test the 'status' value stored in the returned dictionary). > + p = subprocess.Popen('ipmitool -I usb mc info', shell=True, There's no need for shell=True here and using a shell can introduce unwanted security and behavioural consequences - this is a main reason for using the provided interfaces in plugin code. > + isusbIntfEnable = p.returncode We don't use camelCase for local identifiers in sos - suggest 'have_usb', 'usb_available' etc. instead. > + > + if not isusbIntfEnable: > + cmd = "ipmitool -I usb" > + else: > + cmd = "ipmitool" > + > self.add_cmd_output([ > - "ipmitool sel info", > - "ipmitool sel list", > - "ipmitool sensor list", > - "ipmitool chassis status", > - "ipmitool fru print", > - "ipmitool mc info", > - "ipmitool sdr info" > + "%s sel info" % cmd, > + "%s sel list" % cmd, > + "%s sensor list" % cmd, > + "%s chassis status" % cmd, > + "%s fru print" % cmd, > + "%s mc info" % cmd, > + "%s sdr info" % cmd Ack. Should be no problem merging this with those few items taken care of. Regards, Bryn. From mukesh02 at linux.vnet.ibm.com Thu Dec 1 13:58:35 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Thu, 1 Dec 2016 19:28:35 +0530 Subject: [sos-devel] [PATCH] plugin/ipmitool : Add usb interface if available instead of using default interface In-Reply-To: <20161201125501.GA23646@dhcp-24-182.fab.redhat.com> References: <1480596374-8382-1-git-send-email-mukesh02@linux.vnet.ibm.com> <20161201125501.GA23646@dhcp-24-182.fab.redhat.com> Message-ID: Thanks Bryn. Will come up with another version. -Mukesh On Thursday 01 December 2016 06:25 PM, Bryn M. Reeves wrote: > On Thu, Dec 01, 2016 at 06:16:14PM +0530, Mukesh Ojha wrote: >> +import subprocess >> from sos.plugins import Plugin, RedHatPlugin, DebianPlugin > Please don't invent new ways to call programs using subprocess - use the > existing wrappers in the base Plugin class and the utilities module. > > For this use you probably want Plugin.get_command_output() (just test > the 'status' value stored in the returned dictionary). > >> + p = subprocess.Popen('ipmitool -I usb mc info', shell=True, > There's no need for shell=True here and using a shell can introduce > unwanted security and behavioural consequences - this is a main reason > for using the provided interfaces in plugin code. > >> + isusbIntfEnable = p.returncode > We don't use camelCase for local identifiers in sos - suggest > 'have_usb', 'usb_available' etc. instead. > >> + >> + if not isusbIntfEnable: >> + cmd = "ipmitool -I usb" >> + else: >> + cmd = "ipmitool" >> + >> self.add_cmd_output([ >> - "ipmitool sel info", >> - "ipmitool sel list", >> - "ipmitool sensor list", >> - "ipmitool chassis status", >> - "ipmitool fru print", >> - "ipmitool mc info", >> - "ipmitool sdr info" >> + "%s sel info" % cmd, >> + "%s sel list" % cmd, >> + "%s sensor list" % cmd, >> + "%s chassis status" % cmd, >> + "%s fru print" % cmd, >> + "%s mc info" % cmd, >> + "%s sdr info" % cmd > Ack. > > Should be no problem merging this with those few items taken care of. > > Regards, > Bryn. > From mukesh02 at linux.vnet.ibm.com Thu Dec 1 17:32:00 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Thu, 1 Dec 2016 23:02:00 +0530 Subject: [sos-devel] [PATCH V2] plugin/ipmitool : Add usb interface if available instead of using default interface Message-ID: <1480613520-12890-1-git-send-email-mukesh02@linux.vnet.ibm.com> SOSREPORT generally uses the default interface (/dev/ipmi0) while executing ipmitool command, which is quite slow as compare to usb interface. This usb interface uses the virtual device exposed from BMC like in OpenPower system AMI exposes virtual USB interface. IPMITOOL command with usb interface sends the data to the kernel drivers which inturn sends it to the BMC. This patch enables ipmitool command to use usb interface if available. With this patch: ================ root at ubuntu1604:/home/mukesh/sos# ./sosreport --config sos.conf -o ipmitool sosreport (version 3.2) This command will collect system configuration and diagnostic information from this Ubuntu system. An archive containing the collected information will be generated in /tmp/sos.TF8N8E. For more information on Ubuntu visit: http://www.ubuntu.com/ The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No changes will be made to system configuration. Press ENTER to continue, or CTRL-C to quit. Please enter your first initial and last name [ubuntu1604]: Please enter the case id that you are generating this report for []: Setting up archive ... Setting up plugins ... Running plugins. Please wait ... Running 1/1: ipmitool... Creating compressed archive... Your sosreport has been generated and saved in: /tmp/sosreport-ubuntu1604-20161130110402.tar.xz The checksum is: adfdbc8475874d7ad1077a3d2eda151b Please send this file to your support representative. root at ubuntu1604:/home/mukesh/sos# tar -xvf /tmp/sosreport-ubuntu1604-20161130110402.tar.xz sosreport-ubuntu1604-20161130110402/ sosreport-ubuntu1604-20161130110402/version.txt sosreport-ubuntu1604-20161130110402/sos_reports/ sosreport-ubuntu1604-20161130110402/sos_reports/sos.txt sosreport-ubuntu1604-20161130110402/sos_reports/sos.html sosreport-ubuntu1604-20161130110402/sos_commands/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sdr_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_chassis_status sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_fru_print sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sensor_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_mc_info sosreport-ubuntu1604-20161130110402/sos_logs/ sosreport-ubuntu1604-20161130110402/sos_logs/ui.log sosreport-ubuntu1604-20161130110402/sos_logs/sos.log Signed-off-by: Mukesh Ojha --- Changes in V2: - Used existing wrapper instead of subprocess. - Removed camelCase for identifier. sos/plugins/ipmitool.py | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/sos/plugins/ipmitool.py b/sos/plugins/ipmitool.py index 6c9c531..381273f 100644 --- a/sos/plugins/ipmitool.py +++ b/sos/plugins/ipmitool.py @@ -13,6 +13,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +import subprocess from sos.plugins import Plugin, RedHatPlugin, DebianPlugin @@ -26,14 +27,22 @@ class IpmiTool(Plugin, RedHatPlugin, DebianPlugin): packages = ('ipmitool',) def setup(self): + result = self.get_command_output("ipmitool -I usb mc info") + have_usbintf = result['status'] + + if not have_usbintf: + cmd = "ipmitool -I usb" + else: + cmd = "ipmitool" + self.add_cmd_output([ - "ipmitool sel info", - "ipmitool sel list", - "ipmitool sensor list", - "ipmitool chassis status", - "ipmitool fru print", - "ipmitool mc info", - "ipmitool sdr info" + "%s sel info" % cmd, + "%s sel list" % cmd, + "%s sensor list" % cmd, + "%s chassis status" % cmd, + "%s fru print" % cmd, + "%s mc info" % cmd, + "%s sdr info" % cmd ]) # vim: set et ts=4 sw=4 : -- 2.7.4 From bmr at redhat.com Fri Dec 2 11:09:32 2016 From: bmr at redhat.com (Bryn M. Reeves) Date: Fri, 2 Dec 2016 11:09:32 +0000 Subject: [sos-devel] [PATCH V2] plugin/ipmitool : Add usb interface if available instead of using default interface In-Reply-To: <1480613520-12890-1-git-send-email-mukesh02@linux.vnet.ibm.com> References: <1480613520-12890-1-git-send-email-mukesh02@linux.vnet.ibm.com> Message-ID: <20161202110932.GA31418@localhost.localdomain> On Thu, Dec 01, 2016 at 11:02:00PM +0530, Mukesh Ojha wrote: > +import subprocess > from sos.plugins import Plugin, RedHatPlugin, DebianPlugin No need to import subprocess if we're using a Plugin API. > @@ -26,14 +27,22 @@ class IpmiTool(Plugin, RedHatPlugin, DebianPlugin): > packages = ('ipmitool',) > > def setup(self): > + result = self.get_command_output("ipmitool -I usb mc info") > + have_usbintf = result['status'] > + > + if not have_usbintf: > + cmd = "ipmitool -I usb" > + else: > + cmd = "ipmitool" > + > self.add_cmd_output([ > - "ipmitool sel info", > - "ipmitool sel list", > - "ipmitool sensor list", > - "ipmitool chassis status", > - "ipmitool fru print", > - "ipmitool mc info", > - "ipmitool sdr info" > + "%s sel info" % cmd, > + "%s sel list" % cmd, > + "%s sensor list" % cmd, > + "%s chassis status" % cmd, > + "%s fru print" % cmd, > + "%s mc info" % cmd, > + "%s sdr info" % cmd > ]) > Ack to the rest - if you send an updated patch without the subprocess import I'll add it to the next round of merges. Regards, Bryn. From mukesh02 at linux.vnet.ibm.com Fri Dec 2 12:02:30 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Fri, 2 Dec 2016 17:32:30 +0530 Subject: [sos-devel] [PATCH V2] plugin/ipmitool : Add usb interface if available instead of using default interface In-Reply-To: <20161202110932.GA31418@localhost.localdomain> References: <1480613520-12890-1-git-send-email-mukesh02@linux.vnet.ibm.com> <20161202110932.GA31418@localhost.localdomain> Message-ID: Oops!! My bad . i missed it to remove, will send it after removing. -Mukesh On Friday 02 December 2016 04:39 PM, Bryn M. Reeves wrote: > On Thu, Dec 01, 2016 at 11:02:00PM +0530, Mukesh Ojha wrote: >> +import subprocess >> from sos.plugins import Plugin, RedHatPlugin, DebianPlugin > No need to import subprocess if we're using a Plugin API. > >> @@ -26,14 +27,22 @@ class IpmiTool(Plugin, RedHatPlugin, DebianPlugin): >> packages = ('ipmitool',) >> >> def setup(self): >> + result = self.get_command_output("ipmitool -I usb mc info") >> + have_usbintf = result['status'] >> + >> + if not have_usbintf: >> + cmd = "ipmitool -I usb" >> + else: >> + cmd = "ipmitool" >> + >> self.add_cmd_output([ >> - "ipmitool sel info", >> - "ipmitool sel list", >> - "ipmitool sensor list", >> - "ipmitool chassis status", >> - "ipmitool fru print", >> - "ipmitool mc info", >> - "ipmitool sdr info" >> + "%s sel info" % cmd, >> + "%s sel list" % cmd, >> + "%s sensor list" % cmd, >> + "%s chassis status" % cmd, >> + "%s fru print" % cmd, >> + "%s mc info" % cmd, >> + "%s sdr info" % cmd >> ]) >> > Ack to the rest - if you send an updated patch without the subprocess > import I'll add it to the next round of merges. > > Regards, > Bryn. > From mukesh02 at linux.vnet.ibm.com Fri Dec 2 12:06:44 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Fri, 2 Dec 2016 17:36:44 +0530 Subject: [sos-devel] [PATCH V3] plugin/ipmitool : Add usb interface if available instead of using default interface Message-ID: <1480680404-21077-1-git-send-email-mukesh02@linux.vnet.ibm.com> SOSREPORT generally uses the default interface (/dev/ipmi0) while executing ipmitool command, which is quite slow as compare to usb interface. This usb interface uses the virtual device exposed from BMC like in OpenPower system AMI exposes virtual USB interface. IPMITOOL command with usb interface sends the data to the kernel drivers which inturn sends it to the BMC. This patch enables ipmitool command to use usb interface if available. With this patch: ================ root at ubuntu1604:/home/mukesh/sos# ./sosreport --config sos.conf -o ipmitool sosreport (version 3.2) This command will collect system configuration and diagnostic information from this Ubuntu system. An archive containing the collected information will be generated in /tmp/sos.TF8N8E. For more information on Ubuntu visit: http://www.ubuntu.com/ The generated archive may contain data considered sensitive and its content should be reviewed by the originating organization before being passed to any third party. No changes will be made to system configuration. Press ENTER to continue, or CTRL-C to quit. Please enter your first initial and last name [ubuntu1604]: Please enter the case id that you are generating this report for []: Setting up archive ... Setting up plugins ... Running plugins. Please wait ... Running 1/1: ipmitool... Creating compressed archive... Your sosreport has been generated and saved in: /tmp/sosreport-ubuntu1604-20161130110402.tar.xz The checksum is: adfdbc8475874d7ad1077a3d2eda151b Please send this file to your support representative. root at ubuntu1604:/home/mukesh/sos# tar -xvf /tmp/sosreport-ubuntu1604-20161130110402.tar.xz sosreport-ubuntu1604-20161130110402/ sosreport-ubuntu1604-20161130110402/version.txt sosreport-ubuntu1604-20161130110402/sos_reports/ sosreport-ubuntu1604-20161130110402/sos_reports/sos.txt sosreport-ubuntu1604-20161130110402/sos_reports/sos.html sosreport-ubuntu1604-20161130110402/sos_commands/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sdr_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_chassis_status sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_fru_print sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sensor_list sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_sel_info sosreport-ubuntu1604-20161130110402/sos_commands/ipmitool/ipmitool_-I_usb_mc_info sosreport-ubuntu1604-20161130110402/sos_logs/ sosreport-ubuntu1604-20161130110402/sos_logs/ui.log sosreport-ubuntu1604-20161130110402/sos_logs/sos.log Signed-off-by: Mukesh Ojha --- Changes in V3: - Forgot to remove import subprocess in the last version. Changes in V2: - Used existing wrapper instead of subprocess. - Removed camelCase for identifier. sos/plugins/ipmitool.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/sos/plugins/ipmitool.py b/sos/plugins/ipmitool.py index 6c9c531..d09072f 100644 --- a/sos/plugins/ipmitool.py +++ b/sos/plugins/ipmitool.py @@ -26,14 +26,22 @@ class IpmiTool(Plugin, RedHatPlugin, DebianPlugin): packages = ('ipmitool',) def setup(self): + result = self.get_command_output("ipmitool -I usb mc info") + have_usbintf = result['status'] + + if not have_usbintf: + cmd = "ipmitool -I usb" + else: + cmd = "ipmitool" + self.add_cmd_output([ - "ipmitool sel info", - "ipmitool sel list", - "ipmitool sensor list", - "ipmitool chassis status", - "ipmitool fru print", - "ipmitool mc info", - "ipmitool sdr info" + "%s sel info" % cmd, + "%s sel list" % cmd, + "%s sensor list" % cmd, + "%s chassis status" % cmd, + "%s fru print" % cmd, + "%s mc info" % cmd, + "%s sdr info" % cmd ]) # vim: set et ts=4 sw=4 : -- 2.7.4 From bmr at redhat.com Fri Dec 2 16:07:57 2016 From: bmr at redhat.com (Bryn M. Reeves) Date: Fri, 2 Dec 2016 16:07:57 +0000 Subject: [sos-devel] [PATCH V3] plugin/ipmitool : Add usb interface if available instead of using default interface In-Reply-To: <1480680404-21077-1-git-send-email-mukesh02@linux.vnet.ibm.com> References: <1480680404-21077-1-git-send-email-mukesh02@linux.vnet.ibm.com> Message-ID: <20161202160756.GA3723@localhost.localdomain> On Fri, Dec 02, 2016 at 05:36:44PM +0530, Mukesh Ojha wrote: > SOSREPORT generally uses the default interface (/dev/ipmi0) while > executing ipmitool command, which is quite slow as compare to > usb interface. Committed as 62a70f4 (with a slightly shorter subject): commit 62a70f4c00e6101ef2421cb6b4574a43b8eff9c3 Author: Mukesh Ojha Date: Fri Dec 2 16:05:16 2016 +0000 [ipmitool] use usb interface if available Thanks, Bryn. From louis.bouchard at canonical.com Wed Dec 7 11:18:54 2016 From: louis.bouchard at canonical.com (Louis Bouchard) Date: Wed, 7 Dec 2016 12:18:54 +0100 Subject: [sos-devel] Support for in-container detection Message-ID: <9e5957ae-7578-5d4c-1fa3-d9b64b7489ff@canonical.com> Hello, Following discussion in PR #893[1], I am opening the discussion on how to better support in-container detection. The Policy class has a _in_container variable available. As far as I can tell, it is only used by the RedHat policy to detect Docker. cloud-init has a rather simple container detection method that uses systemd-detect-virt and a few other methods[2]. This could be used as a base for such an amelioration. My idea was to adapt the cloud-init method and use it to document _in_container through the __init__(). Let me hear your comments. TIA, ...Louis [1] https://github.com/sosreport/sos/pull/893 [2] https://git.launchpad.net/cloud-init/tree/cloudinit/util.py?id=7f2e99f5345c227d07849da68acdf8562b44c3e1#n1763 -- Louis Bouchard Software engineer, Cloud & Sustaining eng. Canonical Ltd Ubuntu developer Debian Maintainer GPG : 429D 7A3B DD05 B6F8 AF63 B9C4 8B3D 867C 823E 7A61 From mukesh02 at linux.vnet.ibm.com Wed Dec 21 10:24:58 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Wed, 21 Dec 2016 15:54:58 +0530 Subject: [sos-devel] [PATCH 1/2] plugin/powerpc : Removes lsvpd family commands from powerpc.py plugin Message-ID: <1482315899-20584-1-git-send-email-mukesh02@linux.vnet.ibm.com> lsvpd family commands captures information, which can be extracted from /var/lib/lsvpd. So, avoid capturing duplicate information by skipping the execution of these command. Signed-off-by: Mukesh Ojha Reviewed-by: Kamalesh Babulal --- sos/plugins/powerpc.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py index 9252cf2..517175c 100644 --- a/sos/plugins/powerpc.py +++ b/sos/plugins/powerpc.py @@ -56,10 +56,7 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "ppc64_cpu --cores-on", "ppc64_cpu --run-mode", "ppc64_cpu --frequency", - "ppc64_cpu --dscr", - "lscfg -vp", - "lsmcode -A", - "lsvpd --debug" + "ppc64_cpu --dscr" ]) if ispSeries: @@ -70,7 +67,6 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "/var/log/platform" ]) self.add_cmd_output([ - "lsvio -des", "servicelog --dump", "servicelog_notify --list", "usysattn", -- 2.7.4 From mukesh02 at linux.vnet.ibm.com Wed Dec 21 10:24:59 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Wed, 21 Dec 2016 15:54:59 +0530 Subject: [sos-devel] [PATCH 2/2] plugin/powerpc : Added diag_encl command output to sosreport In-Reply-To: <1482315899-20584-1-git-send-email-mukesh02@linux.vnet.ibm.com> References: <1482315899-20584-1-git-send-email-mukesh02@linux.vnet.ibm.com> Message-ID: <1482315899-20584-2-git-send-email-mukesh02@linux.vnet.ibm.com> This patch enables sosreport to collect "diag_encl -v" command output. Signed-off-by: Mukesh Ojha Signed-off-by: Ankit Kumar Tested-by: Mukesh Ojha --- Changes in V2: - Added comma which was missing in V1. - Changed patch commit message and description. sos/plugins/powerpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py index 517175c..a4c92d0 100644 --- a/sos/plugins/powerpc.py +++ b/sos/plugins/powerpc.py @@ -56,7 +56,8 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "ppc64_cpu --cores-on", "ppc64_cpu --run-mode", "ppc64_cpu --frequency", - "ppc64_cpu --dscr" + "ppc64_cpu --dscr", + "diag_encl -v" ]) if ispSeries: -- 2.7.4 From mukesh02 at linux.vnet.ibm.com Wed Dec 21 10:27:06 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Wed, 21 Dec 2016 15:57:06 +0530 Subject: [sos-devel] [PATCH RESEND 1/2] plugin/powerpc : Removes lsvpd family commands from powerpc.py plugin Message-ID: <1482316027-20653-1-git-send-email-mukesh02@linux.vnet.ibm.com> lsvpd family commands captures information, which can be extracted from /var/lib/lsvpd. So, avoid capturing duplicate information by skipping the execution of these command. Signed-off-by: Mukesh Ojha Reviewed-by: Kamalesh Babulal --- sos/plugins/powerpc.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py index 9252cf2..517175c 100644 --- a/sos/plugins/powerpc.py +++ b/sos/plugins/powerpc.py @@ -56,10 +56,7 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "ppc64_cpu --cores-on", "ppc64_cpu --run-mode", "ppc64_cpu --frequency", - "ppc64_cpu --dscr", - "lscfg -vp", - "lsmcode -A", - "lsvpd --debug" + "ppc64_cpu --dscr" ]) if ispSeries: @@ -70,7 +67,6 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "/var/log/platform" ]) self.add_cmd_output([ - "lsvio -des", "servicelog --dump", "servicelog_notify --list", "usysattn", -- 2.7.4 From mukesh02 at linux.vnet.ibm.com Wed Dec 21 10:27:07 2016 From: mukesh02 at linux.vnet.ibm.com (Mukesh Ojha) Date: Wed, 21 Dec 2016 15:57:07 +0530 Subject: [sos-devel] [PATCH RESEND 2/2] plugin/powerpc : Added diag_encl command output to sosreport In-Reply-To: <1482316027-20653-1-git-send-email-mukesh02@linux.vnet.ibm.com> References: <1482316027-20653-1-git-send-email-mukesh02@linux.vnet.ibm.com> Message-ID: <1482316027-20653-2-git-send-email-mukesh02@linux.vnet.ibm.com> This patch enables sosreport to collect "diag_encl -v" command output. Signed-off-by: Mukesh Ojha Signed-off-by: Ankit Kumar Tested-by: Mukesh Ojha --- sos/plugins/powerpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sos/plugins/powerpc.py b/sos/plugins/powerpc.py index 517175c..a4c92d0 100644 --- a/sos/plugins/powerpc.py +++ b/sos/plugins/powerpc.py @@ -56,7 +56,8 @@ class PowerPC(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): "ppc64_cpu --cores-on", "ppc64_cpu --run-mode", "ppc64_cpu --frequency", - "ppc64_cpu --dscr" + "ppc64_cpu --dscr", + "diag_encl -v" ]) if ispSeries: -- 2.7.4