How to use the sos.plugins.DebianPlugin function in sos

To help you get started, we’ve selected a few sos examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sosreport / sos / sos / plugins / mpt.py View on Github external
# Copyright (C) 2015 Red Hat, Inc., Bryn M. Reeves 

# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

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")
github sosreport / sos / sos / plugins / cron.py View on Github external
# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin


class Cron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
    """Cron job scheduler
    """

    plugin_name = "cron"
    profiles = ('system',)
    packages = ('cron', 'anacron', 'chronie')

    files = ('/etc/crontab')

    def setup(self):
        self.add_copy_spec([
            "/etc/cron*",
            "/var/log/cron",
            "/var/spool/cron"
        ])
github sosreport / sos / sos / plugins / date.py View on Github external
# Copyright (C) 2018 Red Hat, Inc. Jake Hunsaker 

# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

from sos.plugins import Plugin, RedHatPlugin, DebianPlugin


class Date(Plugin, RedHatPlugin, DebianPlugin):
    '''Basic system time information
    '''

    plugin_name = 'date'

    def setup(self):
        self.add_cmd_output('date', root_symlink='date')

        self.add_cmd_output([
            'date --utc',
            'hwclock'
        ])

        self.add_copy_spec('/etc/localtime')
github sosreport / sos / sos / plugins / xinetd.py View on Github external
# Copyright (C) 2007 Red Hat, Inc., Eugene Teo 

# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin


class Xinetd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
    """xinetd information
    """

    plugin_name = 'xinetd'
    profiles = ('services', 'network', 'boot')

    files = ('/etc/xinetd.conf',)
    packages = ('xinetd',)

    def setup(self):
        self.add_copy_spec([
            "/etc/xinetd.conf",
            "/etc/xinetd.d"
        ])
github sosreport / sos / sos / plugins / sar.py View on Github external
continue
            sa_data_path = os.path.join(self.sa_path, fname)
            sar_filename = 'sar' + fname[2:]
            if sar_filename not in dir_list:
                sar_cmd = 'sh -c "sar -A -f %s"' % sa_data_path
                self.add_cmd_output(sar_cmd, sar_filename)
            sadf_cmd = "sadf -x %s" % sa_data_path
            self.add_cmd_output(sadf_cmd, "%s.xml" % fname)


class RedHatSar(Sar, RedHatPlugin):

    sa_path = '/var/log/sa'


class DebianSar(Sar, DebianPlugin, UbuntuPlugin):

    sa_path = '/var/log/sysstat'
github sosreport / sos / sos / plugins / acpid.py View on Github external
class Acpid(Plugin):
    """ACPI daemon information"""
    plugin_name = "acpid"
    profiles = ('hardware',)
    packages = ('acpid',)


class RedHatAcpid(Acpid, RedHatPlugin):
    def setup(self):
        self.add_copy_spec([
            "/var/log/acpid*",
            "/etc/acpi/events/power.conf"])


class DebianAcpid(Acpid, DebianPlugin, UbuntuPlugin):
    def setup(self):
        self.add_copy_spec([
            "/etc/acpi/events/powerbtn*"])
github sosreport / sos / sos / plugins / gdm.py View on Github external
# This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution for further information.

from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin


class Gdm(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
    """GNOME display manager
    """

    plugin_name = 'gdm'
    profiles = ('desktop',)
    packages = ('gdm',)

    def setup(self):
        self.add_copy_spec("/etc/gdm/*")
        self.add_journal(units="gdm")
        self.add_service_status("gdm")
github sosreport / sos / sos / plugins / corosync.py View on Github external
def postproc(self):
        self.do_cmd_output_sub(
            "corosync-objctl",
            r"(.*fence.*\.passwd=)(.*)",
            r"\1******"
        )


class RedHatCorosync(Corosync, RedHatPlugin):

    def setup(self):
        super(RedHatCorosync, self).setup()


class DebianCorosync(Corosync, DebianPlugin, UbuntuPlugin):

    def setup(self):
        super(DebianCorosync, self).setup()

    files = ('/usr/sbin/corosync',)
github sosreport / sos / sos / plugins / openstack_ceilometer.py View on Github external
"transport_url"
        ]
        connection_keys = ["connection"]

        self.apply_regex_sub(
            r"((?m)^\s*(%s)\s*=\s*)(.*)" % "|".join(protect_keys),
            r"\1*********"
        )
        self.apply_regex_sub(
            r"((?m)^\s*(%s)\s*=\s*(.*)://(\w*):)(.*)(@(.*))" %
            "|".join(connection_keys),
            r"\1*********\6"
        )


class DebianCeilometer(OpenStackCeilometer, DebianPlugin,
                       UbuntuPlugin):

    packages = (
        'ceilometer-api',
        'ceilometer-agent-central',
        'ceilometer-agent-compute',
        'ceilometer-collector',
        'ceilometer-common',
        'python-ceilometer',
        'python-ceilometerclient'
    )


class RedHatCeilometer(OpenStackCeilometer, RedHatPlugin):

    packages = ('openstack-selinux',)
github sosreport / sos / sos / plugins / ovn_host.py View on Github external
])

        self.add_journal(units="ovn-controller")

    def check_enabled(self):
        return (any([os.path.isfile(
            os.path.join(pp, pidfile)) for pp in pid_paths]) or
            super(OVNHost, self).check_enabled())


class RedHatOVNHost(OVNHost, RedHatPlugin):

    packages = ('openvswitch-ovn-host', 'ovn2.*-host', )


class DebianOVNHost(OVNHost, DebianPlugin, UbuntuPlugin):

    packages = ('ovn-host', )