diff options
-rw-r--r-- | sos/plugins/abrt.py | 31 | ||||
-rw-r--r-- | sos/plugins/acpid.py | 25 | ||||
-rw-r--r-- | sos/plugins/activemq.py | 26 | ||||
-rw-r--r-- | sos/plugins/anaconda.py | 23 | ||||
-rw-r--r-- | sos/plugins/anacron.py | 27 | ||||
-rw-r--r-- | sos/plugins/apache.py | 25 | ||||
-rw-r--r-- | sos/plugins/apparmor.py | 25 | ||||
-rw-r--r-- | sos/plugins/apport.py | 25 | ||||
-rw-r--r-- | sos/plugins/apt.py | 1 | ||||
-rw-r--r-- | sos/plugins/ata.py | 23 | ||||
-rw-r--r-- | sos/plugins/auditd.py | 26 | ||||
-rw-r--r-- | sos/plugins/autofs.py | 33 | ||||
-rw-r--r-- | sos/plugins/azure.py | 1 | ||||
-rw-r--r-- | sos/plugins/block.py | 27 | ||||
-rw-r--r-- | sos/plugins/boot.py | 23 | ||||
-rw-r--r-- | sos/plugins/ceph.py | 23 |
16 files changed, 193 insertions, 171 deletions
diff --git a/sos/plugins/abrt.py b/sos/plugins/abrt.py index d6fda0ba..56ed0d46 100644 --- a/sos/plugins/abrt.py +++ b/sos/plugins/abrt.py @@ -1,21 +1,21 @@ -## Copyright (C) 2010 Red Hat, Inc., Tomas Smetana <tsmetana@redhat.com> +# Copyright (C) 2010 Red Hat, Inc., Tomas Smetana <tsmetana@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 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. +# 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. +# 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 -from os.path import exists + class Abrt(Plugin, RedHatPlugin): """ABRT log dump @@ -31,11 +31,12 @@ class Abrt(Plugin, RedHatPlugin): def do_backtraces(self): result = self.call_ext_prog('sqlite3 ' - + '/var/spool/abrt/abrt-db \'select UUID from abrt_v4\'') + + '/var/spool/abrt/abrt-db \'select UUID ' + 'from abrt_v4\'') try: for uuid in result['output'].split(): self.add_cmd_output("abrt-cli -ib %s" % uuid, - suggest_filename=("backtrace_%s" % uuid)) + suggest_filename=("backtrace_%s" % uuid)) except IndexError: pass diff --git a/sos/plugins/acpid.py b/sos/plugins/acpid.py index b9371f03..2dec076f 100644 --- a/sos/plugins/acpid.py +++ b/sos/plugins/acpid.py @@ -1,22 +1,24 @@ -### 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 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. +# 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. +# 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 Acpid(Plugin): plugin_name = "acpid" + class RedHatAcpid(Acpid, RedHatPlugin): """acpid related information """ @@ -25,6 +27,7 @@ class RedHatAcpid(Acpid, RedHatPlugin): "/var/log/acpid*", "/etc/acpi/events/power.conf"]) + class DebianAcpid(Acpid, DebianPlugin, UbuntuPlugin): """acpid related information for Debian and Ubuntu """ diff --git a/sos/plugins/activemq.py b/sos/plugins/activemq.py index 3b0f1677..7d8c419c 100644 --- a/sos/plugins/activemq.py +++ b/sos/plugins/activemq.py @@ -1,20 +1,21 @@ -## Copyright (C) 2014 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. +# Copyright (C) 2014 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. +# 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. +# 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 ActiveMq(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """ActiveMQ related information """ @@ -26,4 +27,3 @@ class ActiveMq(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): def setup(self): self.add_copy_specs(list(self.files)) - diff --git a/sos/plugins/anaconda.py b/sos/plugins/anaconda.py index 0e55ec6f..11684ed1 100644 --- a/sos/plugins/anaconda.py +++ b/sos/plugins/anaconda.py @@ -1,20 +1,21 @@ -### 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 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. +# 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. +# 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 import os + class Anaconda(Plugin, RedHatPlugin): """Anaconda / Installation information """ diff --git a/sos/plugins/anacron.py b/sos/plugins/anacron.py index a5635355..f8b1a3c1 100644 --- a/sos/plugins/anacron.py +++ b/sos/plugins/anacron.py @@ -1,24 +1,23 @@ +# 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 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. -## 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. +# 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 -import os + class Anacron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """ capture scheduled jobs information """ - + plugin_name = 'anacron' # anacron may be provided by anacron, cronie-anacron etc. diff --git a/sos/plugins/apache.py b/sos/plugins/apache.py index 9490a5d2..51893684 100644 --- a/sos/plugins/apache.py +++ b/sos/plugins/apache.py @@ -1,19 +1,20 @@ -### 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 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. +# 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. +# 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 Apache(Plugin): """Apache related information """ @@ -23,6 +24,7 @@ class Apache(Plugin): ("log", "gathers all apache logs", "slow", False) ] + class RedHatApache(Apache, RedHatPlugin): """Apache related information for Red Hat distributions """ @@ -46,6 +48,7 @@ class RedHatApache(Apache, RedHatPlugin): if self.get_option("log"): self.add_copy_spec("/var/log/httpd/*") + class DebianApache(Apache, DebianPlugin, UbuntuPlugin): """Apache related information for Debian distributions """ diff --git a/sos/plugins/apparmor.py b/sos/plugins/apparmor.py index 76ca9db6..508c685a 100644 --- a/sos/plugins/apparmor.py +++ b/sos/plugins/apparmor.py @@ -1,20 +1,21 @@ -## Copyright (c) 2012 Adam Stokes <adam.stokes@canonical.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. +# Copyright (c) 2012 Adam Stokes <adam.stokes@canonical.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. +# 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. +# 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, UbuntuPlugin + class Apparmor(Plugin, UbuntuPlugin): """Apparmor related information """ diff --git a/sos/plugins/apport.py b/sos/plugins/apport.py index b7f884f3..f528f41c 100644 --- a/sos/plugins/apport.py +++ b/sos/plugins/apport.py @@ -1,20 +1,21 @@ -## Copyright (c) 2012 Adam Stokes <adam.stokes@canonical.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. +# Copyright (c) 2012 Adam Stokes <adam.stokes@canonical.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. +# 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. +# 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, DebianPlugin, UbuntuPlugin + class Apport(Plugin, DebianPlugin, UbuntuPlugin): """apport information """ diff --git a/sos/plugins/apt.py b/sos/plugins/apt.py index f7c60e2f..3e83546a 100644 --- a/sos/plugins/apt.py +++ b/sos/plugins/apt.py @@ -16,6 +16,7 @@ from sos.plugins import Plugin, UbuntuPlugin, DebianPlugin + class Apt(Plugin, DebianPlugin, UbuntuPlugin): """ Apt Plugin """ diff --git a/sos/plugins/ata.py b/sos/plugins/ata.py index 20f093b8..253d0259 100644 --- a/sos/plugins/ata.py +++ b/sos/plugins/ata.py @@ -1,20 +1,21 @@ -### 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 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. +# 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. +# 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, UbuntuPlugin, DebianPlugin import os + class Ata(Plugin, RedHatPlugin, UbuntuPlugin, DebianPlugin): """ ATA and IDE related information (including PATA and SATA) """ diff --git a/sos/plugins/auditd.py b/sos/plugins/auditd.py index 52c8843e..84233ab7 100644 --- a/sos/plugins/auditd.py +++ b/sos/plugins/auditd.py @@ -1,19 +1,20 @@ -### 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 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. +# 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. +# 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 Auditd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """Auditd related information """ @@ -30,7 +31,8 @@ class Auditd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): if not self.get_option("all_logs"): limit = self.get_option("log_size") - self.add_copy_spec_limit("/var/log/audit/audit.log", sizelimit=limit) + self.add_copy_spec_limit("/var/log/audit/audit.log", + sizelimit=limit) else: self.add_copy_spec("/var/log/audit") diff --git a/sos/plugins/autofs.py b/sos/plugins/autofs.py index d0b0b9cb..530dd3e4 100644 --- a/sos/plugins/autofs.py +++ b/sos/plugins/autofs.py @@ -1,21 +1,22 @@ -## Copyright (C) 2007 Red Hat, Inc., Adam Stokes <astokes@redhat.com> +# Copyright (C) 2007 Red Hat, Inc., Adam Stokes <astokes@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 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. +# 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. +# 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, UbuntuPlugin, DebianPlugin + class Autofs(Plugin): """autofs server-related information """ @@ -29,7 +30,8 @@ class Autofs(Plugin): """ testing if autofs debug has been enabled anywhere """ # Global debugging - opt = self.file_grep(r"^(DEFAULT_LOGGING|DAEMONOPTIONS)=(.*)", *self.files) + opt = self.file_grep(r"^(DEFAULT_LOGGING|DAEMONOPTIONS)=(.*)", + *self.files) for opt1 in opt: for opt2 in opt1.split(" "): if opt2 in ("--debug", "debug"): @@ -39,7 +41,8 @@ class Autofs(Plugin): def getdaemondebug(self): """ capture daemon debug output """ - debugout = self.file_grep(r"^(daemon.*)\s+(\/var\/log\/.*)", *self.files) + debugout = self.file_grep(r"^(daemon.*)\s+(\/var\/log\/.*)", + *self.files) for i in debugout: return i[1] @@ -49,6 +52,7 @@ class Autofs(Plugin): if self.checkdebug(): self.add_copy_spec(self.getdaemondebug()) + class RedHatAutofs(Autofs, RedHatPlugin): """autofs server-related on RedHat based distributions""" @@ -57,6 +61,7 @@ class RedHatAutofs(Autofs, RedHatPlugin): if self.get_option("verify"): self.add_cmd_output("rpm -qV autofs") + class DebianAutofs(Autofs, DebianPlugin, UbuntuPlugin): """autofs server-related on Debian based distributions""" diff --git a/sos/plugins/azure.py b/sos/plugins/azure.py index 3c0eef84..6e39a84e 100644 --- a/sos/plugins/azure.py +++ b/sos/plugins/azure.py @@ -16,6 +16,7 @@ from sos.plugins import Plugin, UbuntuPlugin + class Azure(Plugin, UbuntuPlugin): """ Microsoft Azure Client Plugin """ diff --git a/sos/plugins/block.py b/sos/plugins/block.py index e110f6b3..82a355f9 100644 --- a/sos/plugins/block.py +++ b/sos/plugins/block.py @@ -1,20 +1,21 @@ -### 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 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. +# 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. +# 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. import os from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin + class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """Block device related information """ @@ -23,7 +24,7 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): def setup(self): self.add_copy_spec("/proc/partitions") - + self.add_cmd_outputs([ "lsblk", "blkid -c /dev/null", @@ -39,7 +40,7 @@ class Block(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): if os.path.isdir("/sys/block"): for disk in os.listdir("/sys/block"): - if disk in [ ".", ".." ] or disk.startswith("ram"): + if disk in [".", ".."] or disk.startswith("ram"): continue disk_path = os.path.join('/dev/', disk) self.add_cmd_outputs([ diff --git a/sos/plugins/boot.py b/sos/plugins/boot.py index 0388c02c..d8835f8e 100644 --- a/sos/plugins/boot.py +++ b/sos/plugins/boot.py @@ -1,20 +1,21 @@ -### 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 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. +# 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. +# 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 from glob import glob + class Boot(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """Bootloader information """ diff --git a/sos/plugins/ceph.py b/sos/plugins/ceph.py index 57797802..9fc5ff60 100644 --- a/sos/plugins/ceph.py +++ b/sos/plugins/ceph.py @@ -1,19 +1,20 @@ -### 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 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. +# 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. +# 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, UbuntuPlugin + class Ceph(Plugin, RedHatPlugin, UbuntuPlugin): """information on CEPH """ |