|
|
c81b6a |
From b502b9f51b4d314ed6fa76d66a6db8aea7d32c12 Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Sun, 31 May 2015 16:00:16 +0200
|
|
|
c81b6a |
Subject: [PATCH 1/8] [startup] rename plugin to 'services'
|
|
|
c81b6a |
|
|
|
c81b6a |
The plugin is supposed to collect information about services
|
|
|
c81b6a |
rather than about their startup.
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/services.py | 56 +++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
c81b6a |
sos/plugins/startup.py | 56 -------------------------------------------------
|
|
|
c81b6a |
2 files changed, 56 insertions(+), 56 deletions(-)
|
|
|
c81b6a |
create mode 100644 sos/plugins/services.py
|
|
|
c81b6a |
delete mode 100644 sos/plugins/startup.py
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/services.py b/sos/plugins/services.py
|
|
|
c81b6a |
new file mode 100644
|
|
|
c81b6a |
index 0000000..606a135
|
|
|
c81b6a |
--- /dev/null
|
|
|
c81b6a |
+++ b/sos/plugins/services.py
|
|
|
c81b6a |
@@ -0,0 +1,56 @@
|
|
|
c81b6a |
+# This program is free software; you can redistribute it and/or modify
|
|
|
c81b6a |
+# it under the terms of the GNU General Public License as published by
|
|
|
c81b6a |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
c81b6a |
+# (at your option) any later version.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# This program is distributed in the hope that it will be useful,
|
|
|
c81b6a |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
c81b6a |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
c81b6a |
+# GNU General Public License for more details.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# You should have received a copy of the GNU General Public License
|
|
|
c81b6a |
+# along with this program; if not, write to the Free Software
|
|
|
c81b6a |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+class Services(Plugin):
|
|
|
c81b6a |
+ """System services
|
|
|
c81b6a |
+ """
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ plugin_name = "services"
|
|
|
c81b6a |
+ profiles = ('system', 'boot')
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ option_list = [("servicestatus", "get a status of all running services",
|
|
|
c81b6a |
+ "slow", False)]
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ def setup(self):
|
|
|
c81b6a |
+ self.add_copy_spec([
|
|
|
c81b6a |
+ "/etc/inittab",
|
|
|
c81b6a |
+ "/etc/rc.d"
|
|
|
c81b6a |
+ ])
|
|
|
c81b6a |
+ if self.get_option('servicestatus'):
|
|
|
c81b6a |
+ self.add_cmd_output("/sbin/service --status-all")
|
|
|
c81b6a |
+ self.add_cmd_output("/sbin/runlevel")
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+class RedHatServices(Services, RedHatPlugin):
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ def setup(self):
|
|
|
c81b6a |
+ super(RedHatServices, self).setup()
|
|
|
c81b6a |
+ self.add_cmd_output("/sbin/chkconfig --list", root_symlink="chkconfig")
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+class DebianServices(Services, DebianPlugin, UbuntuPlugin):
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ def setup(self):
|
|
|
c81b6a |
+ super(DebianServices, self).setup()
|
|
|
c81b6a |
+ self.add_copy_spec("/etc/rc*.d")
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ self.add_cmd_output("/sbin/initctl show-config",
|
|
|
c81b6a |
+ root_symlink="initctl")
|
|
|
c81b6a |
+ if self.get_option('servicestatus'):
|
|
|
c81b6a |
+ self.add_cmd_output("/sbin/initctl list")
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# vim: et ts=4 sw=4
|
|
|
c81b6a |
diff --git a/sos/plugins/startup.py b/sos/plugins/startup.py
|
|
|
c81b6a |
deleted file mode 100644
|
|
|
c81b6a |
index 9d92370..0000000
|
|
|
c81b6a |
--- a/sos/plugins/startup.py
|
|
|
c81b6a |
+++ /dev/null
|
|
|
c81b6a |
@@ -1,56 +0,0 @@
|
|
|
c81b6a |
-# This program is free software; you can redistribute it and/or modify
|
|
|
c81b6a |
-# it under the terms of the GNU General Public License as published by
|
|
|
c81b6a |
-# the Free Software Foundation; either version 2 of the License, or
|
|
|
c81b6a |
-# (at your option) any later version.
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-# This program is distributed in the hope that it will be useful,
|
|
|
c81b6a |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
c81b6a |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
c81b6a |
-# GNU General Public License for more details.
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-# You should have received a copy of the GNU General Public License
|
|
|
c81b6a |
-# along with this program; if not, write to the Free Software
|
|
|
c81b6a |
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-class Startup(Plugin):
|
|
|
c81b6a |
- """System startup
|
|
|
c81b6a |
- """
|
|
|
c81b6a |
-
|
|
|
c81b6a |
- plugin_name = "startup"
|
|
|
c81b6a |
- profiles = ('system', 'boot')
|
|
|
c81b6a |
-
|
|
|
c81b6a |
- option_list = [("servicestatus", "get a status of all running services",
|
|
|
c81b6a |
- "slow", False)]
|
|
|
c81b6a |
-
|
|
|
c81b6a |
- def setup(self):
|
|
|
c81b6a |
- self.add_copy_spec([
|
|
|
c81b6a |
- "/etc/inittab",
|
|
|
c81b6a |
- "/etc/rc.d"
|
|
|
c81b6a |
- ])
|
|
|
c81b6a |
- if self.get_option('servicestatus'):
|
|
|
c81b6a |
- self.add_cmd_output("/sbin/service --status-all")
|
|
|
c81b6a |
- self.add_cmd_output("/sbin/runlevel")
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-class RedHatStartup(Startup, RedHatPlugin):
|
|
|
c81b6a |
-
|
|
|
c81b6a |
- def setup(self):
|
|
|
c81b6a |
- super(RedHatStartup, self).setup()
|
|
|
c81b6a |
- self.add_cmd_output("/sbin/chkconfig --list", root_symlink="chkconfig")
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-class DebianStartup(Startup, DebianPlugin, UbuntuPlugin):
|
|
|
c81b6a |
-
|
|
|
c81b6a |
- def setup(self):
|
|
|
c81b6a |
- super(DebianStartup, self).setup()
|
|
|
c81b6a |
- self.add_copy_spec("/etc/rc*.d")
|
|
|
c81b6a |
-
|
|
|
c81b6a |
- self.add_cmd_output("/sbin/initctl show-config",
|
|
|
c81b6a |
- root_symlink="initctl")
|
|
|
c81b6a |
- if self.get_option('servicestatus'):
|
|
|
c81b6a |
- self.add_cmd_output("/sbin/initctl list")
|
|
|
c81b6a |
-
|
|
|
c81b6a |
-# vim: et ts=4 sw=4
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
From 5204d62fdb362fb5cc4a897c90faa9539715fc74 Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Tue, 7 Jul 2015 13:03:14 +0200
|
|
|
c81b6a |
Subject: [PATCH 2/8] [services] add "ls /var/lock/subsys"
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/services.py | 5 ++++-
|
|
|
c81b6a |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/services.py b/sos/plugins/services.py
|
|
|
c81b6a |
index 606a135..ab9f8ce 100644
|
|
|
c81b6a |
--- a/sos/plugins/services.py
|
|
|
c81b6a |
+++ b/sos/plugins/services.py
|
|
|
c81b6a |
@@ -32,7 +32,10 @@ class Services(Plugin):
|
|
|
c81b6a |
])
|
|
|
c81b6a |
if self.get_option('servicestatus'):
|
|
|
c81b6a |
self.add_cmd_output("/sbin/service --status-all")
|
|
|
c81b6a |
- self.add_cmd_output("/sbin/runlevel")
|
|
|
c81b6a |
+ self.add_cmd_output([
|
|
|
c81b6a |
+ "/sbin/runlevel",
|
|
|
c81b6a |
+ "ls /var/lock/subsys"
|
|
|
c81b6a |
+ ])
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
class RedHatServices(Services, RedHatPlugin):
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
From e00447e7ee346aa3be685a91ebba7cf208c4f205 Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Sun, 31 May 2015 16:04:19 +0200
|
|
|
c81b6a |
Subject: [PATCH 3/8] [ntp] Collect "ntpq -p" output
|
|
|
c81b6a |
|
|
|
c81b6a |
Partially solves #570
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/ntp.py | 5 ++++-
|
|
|
c81b6a |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/ntp.py b/sos/plugins/ntp.py
|
|
|
c81b6a |
index 0e39b9d..c0f731d 100644
|
|
|
c81b6a |
--- a/sos/plugins/ntp.py
|
|
|
c81b6a |
+++ b/sos/plugins/ntp.py
|
|
|
c81b6a |
@@ -30,7 +30,10 @@ class Ntp(Plugin):
|
|
|
c81b6a |
"/etc/ntp/step-tickers",
|
|
|
c81b6a |
"/etc/ntp/ntpservers"
|
|
|
c81b6a |
])
|
|
|
c81b6a |
- self.add_cmd_output("ntptime")
|
|
|
c81b6a |
+ self.add_cmd_output([
|
|
|
c81b6a |
+ "ntptime",
|
|
|
c81b6a |
+ "ntpq -p"
|
|
|
c81b6a |
+ ])
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
class RedHatNtp(Ntp, RedHatPlugin):
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
From 83ef3aff955a33bb58c578479ac6b63a615b4521 Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Sun, 31 May 2015 16:07:06 +0200
|
|
|
c81b6a |
Subject: [PATCH 4/8] [networking] Collect "ethtool -T $NIC"
|
|
|
c81b6a |
|
|
|
c81b6a |
Partially solves #570
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/networking.py | 1 +
|
|
|
c81b6a |
1 file changed, 1 insertion(+)
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/networking.py b/sos/plugins/networking.py
|
|
|
c81b6a |
index f2b06a6..b2c74c1 100644
|
|
|
c81b6a |
--- a/sos/plugins/networking.py
|
|
|
c81b6a |
+++ b/sos/plugins/networking.py
|
|
|
c81b6a |
@@ -184,6 +184,7 @@ class Networking(Plugin):
|
|
|
c81b6a |
"ethtool -i "+eth,
|
|
|
c81b6a |
"ethtool -k "+eth,
|
|
|
c81b6a |
"ethtool -S "+eth,
|
|
|
c81b6a |
+ "ethtool -T "+eth,
|
|
|
c81b6a |
"ethtool -a "+eth,
|
|
|
c81b6a |
"ethtool -c "+eth,
|
|
|
c81b6a |
"ethtool -g "+eth
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
From 002cef3eddc288352d0b92f6272fbd2e85280e6e Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Sun, 31 May 2015 16:17:40 +0200
|
|
|
c81b6a |
Subject: [PATCH 5/8] [ptp] Add new plugin for Precision time protocol
|
|
|
c81b6a |
|
|
|
c81b6a |
Partially resolves #570
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/ptp.py | 36 ++++++++++++++++++++++++++++++++++++
|
|
|
c81b6a |
1 file changed, 36 insertions(+)
|
|
|
c81b6a |
create mode 100644 sos/plugins/ptp.py
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/ptp.py b/sos/plugins/ptp.py
|
|
|
c81b6a |
new file mode 100644
|
|
|
c81b6a |
index 0000000..a6ac648
|
|
|
c81b6a |
--- /dev/null
|
|
|
c81b6a |
+++ b/sos/plugins/ptp.py
|
|
|
c81b6a |
@@ -0,0 +1,36 @@
|
|
|
c81b6a |
+# Copyright (C) 2015 Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# This program is free software; you can redistribute it and/or modify
|
|
|
c81b6a |
+# it under the terms of the GNU General Public License as published by
|
|
|
c81b6a |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
c81b6a |
+# (at your option) any later version.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# This program is distributed in the hope that it will be useful,
|
|
|
c81b6a |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
c81b6a |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
c81b6a |
+# GNU General Public License for more details.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# You should have received a copy of the GNU General Public License
|
|
|
c81b6a |
+# along with this program; if not, write to the Free Software
|
|
|
c81b6a |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+class Ptp(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
c81b6a |
+ """Precision time protocol
|
|
|
c81b6a |
+ """
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ plugin_name = "ptp"
|
|
|
c81b6a |
+ profiles = ('system', 'services')
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ packages = ('linuxptp',)
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ def setup(self):
|
|
|
c81b6a |
+ self.add_copy_spec([
|
|
|
c81b6a |
+ "/etc/ptp4l.conf",
|
|
|
c81b6a |
+ "/etc/timemaster.conf",
|
|
|
c81b6a |
+ "/sys/class/ptp"
|
|
|
c81b6a |
+ ])
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# vim: et ts=4 sw=4
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
From 72e2e32eaa97c6c76b61635dd0fafeb4dcc1aa7d Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Sun, 31 May 2015 16:19:29 +0200
|
|
|
c81b6a |
Subject: [PATCH 6/8] [process] Collect few "ps" outputs
|
|
|
c81b6a |
|
|
|
c81b6a |
Partially solves $570
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
(edits for readability & line length)
|
|
|
c81b6a |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/process.py | 9 ++++++++-
|
|
|
c81b6a |
1 file changed, 8 insertions(+), 1 deletion(-)
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/process.py b/sos/plugins/process.py
|
|
|
c81b6a |
index 6ae189b..a643844 100644
|
|
|
c81b6a |
--- a/sos/plugins/process.py
|
|
|
c81b6a |
+++ b/sos/plugins/process.py
|
|
|
c81b6a |
@@ -23,13 +23,20 @@ class Process(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
c81b6a |
profiles = ('system',)
|
|
|
c81b6a |
|
|
|
c81b6a |
def setup(self):
|
|
|
c81b6a |
+ ps_axo = "ps axo"
|
|
|
c81b6a |
+ # process group and thread options
|
|
|
c81b6a |
+ ps_group_opts = "pid,ppid,user,group,lwp,nlwp,start_time,comm,cgroup"
|
|
|
c81b6a |
+ ps_sched_opts = "flags,state,uid,pid,ppid,pgid,sid,cls,pri,addr,sz,"
|
|
|
c81b6a |
+ ps_sched_opts += "wchan,stime,tty,time,cmd"
|
|
|
c81b6a |
self.add_copy_spec("/proc/sched_debug")
|
|
|
c81b6a |
self.add_cmd_output("ps auxwww", root_symlink="ps")
|
|
|
c81b6a |
self.add_cmd_output("pstree", root_symlink="pstree")
|
|
|
c81b6a |
self.add_cmd_output("lsof -b +M -n -l", root_symlink="lsof")
|
|
|
c81b6a |
self.add_cmd_output([
|
|
|
c81b6a |
"ps auxwwwm",
|
|
|
c81b6a |
- "ps alxwww"
|
|
|
c81b6a |
+ "ps alxwww",
|
|
|
c81b6a |
+ "%s %s" % (ps_axo, ps_group_opts),
|
|
|
c81b6a |
+ "%s %s" % (ps_axo, ps_sched_opts)
|
|
|
c81b6a |
])
|
|
|
c81b6a |
|
|
|
c81b6a |
# vim: et ts=4 sw=4
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
From 0b9a4c545582ed73f89ee4a7572ecb631633819e Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Sun, 31 May 2015 16:21:28 +0200
|
|
|
c81b6a |
Subject: [PATCH 7/8] [sysvipc] Collect "ipcs -u"
|
|
|
c81b6a |
|
|
|
c81b6a |
Partially solves #570
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/sysvipc.py | 5 ++++-
|
|
|
c81b6a |
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/sysvipc.py b/sos/plugins/sysvipc.py
|
|
|
c81b6a |
index a0732e7..a98abf9 100644
|
|
|
c81b6a |
--- a/sos/plugins/sysvipc.py
|
|
|
c81b6a |
+++ b/sos/plugins/sysvipc.py
|
|
|
c81b6a |
@@ -29,6 +29,9 @@ class SysVIPC(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
c81b6a |
"/proc/sysvipc/sem",
|
|
|
c81b6a |
"/proc/sysvipc/shm"
|
|
|
c81b6a |
])
|
|
|
c81b6a |
- self.add_cmd_output("ipcs")
|
|
|
c81b6a |
+ self.add_cmd_output([
|
|
|
c81b6a |
+ "ipcs",
|
|
|
c81b6a |
+ "ipcs -u"
|
|
|
c81b6a |
+ ])
|
|
|
c81b6a |
|
|
|
c81b6a |
# vim: et ts=4 sw=4
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
|
|
|
c81b6a |
From fb7bbcf9e60002d75db383fac08244a7fa06a1d6 Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
Date: Sun, 31 May 2015 16:24:23 +0200
|
|
|
c81b6a |
Subject: [PATCH 8/8] [devices] New plugin to collect "udevadm info
|
|
|
c81b6a |
--export-db"
|
|
|
c81b6a |
|
|
|
c81b6a |
Partially resolves #570
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/devices.py | 28 ++++++++++++++++++++++++++++
|
|
|
c81b6a |
1 file changed, 28 insertions(+)
|
|
|
c81b6a |
create mode 100644 sos/plugins/devices.py
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/devices.py b/sos/plugins/devices.py
|
|
|
c81b6a |
new file mode 100644
|
|
|
c81b6a |
index 0000000..5e0283a
|
|
|
c81b6a |
--- /dev/null
|
|
|
c81b6a |
+++ b/sos/plugins/devices.py
|
|
|
c81b6a |
@@ -0,0 +1,28 @@
|
|
|
c81b6a |
+# This program is free software; you can redistribute it and/or modify
|
|
|
c81b6a |
+# it under the terms of the GNU General Public License as published by
|
|
|
c81b6a |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
c81b6a |
+# (at your option) any later version.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# This program is distributed in the hope that it will be useful,
|
|
|
c81b6a |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
c81b6a |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
c81b6a |
+# GNU General Public License for more details.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# You should have received a copy of the GNU General Public License
|
|
|
c81b6a |
+# along with this program; if not, write to the Free Software
|
|
|
c81b6a |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+class Devices(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
c81b6a |
+ """ devices specific commands
|
|
|
c81b6a |
+ """
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ plugin_name = 'devices'
|
|
|
c81b6a |
+ profiles = ('system', 'hardware', 'boot')
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ def setup(self):
|
|
|
c81b6a |
+ self.add_cmd_output("udevadm info --export-db")
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# vim: et ts=4 sw=4
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|
|
|
c81b6a |
From c05fa2947937a5adc3496c4e66b649633de054e9 Mon Sep 17 00:00:00 2001
|
|
|
c81b6a |
From: Alexandru Juncu <alexj@linux.com>
|
|
|
c81b6a |
Date: Tue, 24 Feb 2015 18:28:04 +0100
|
|
|
c81b6a |
Subject: [PATCH] [last] information about login actions
|
|
|
c81b6a |
|
|
|
c81b6a |
This is useful information to be correlated with shutdown/reboot
|
|
|
c81b6a |
events in /var/log/messages to identify graceful shutdowns/reboots
|
|
|
c81b6a |
and lower false positives about system crashes.
|
|
|
c81b6a |
|
|
|
c81b6a |
Resolves #572.
|
|
|
c81b6a |
|
|
|
c81b6a |
Signed-off-by: Alexandru Juncu <alexj@linux.com>
|
|
|
c81b6a |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
c81b6a |
---
|
|
|
c81b6a |
sos/plugins/last.py | 33 +++++++++++++++++++++++++++++++++
|
|
|
c81b6a |
1 file changed, 33 insertions(+)
|
|
|
c81b6a |
create mode 100644 sos/plugins/last.py
|
|
|
c81b6a |
|
|
|
c81b6a |
diff --git a/sos/plugins/last.py b/sos/plugins/last.py
|
|
|
c81b6a |
new file mode 100644
|
|
|
c81b6a |
index 0000000..d6b791d
|
|
|
c81b6a |
--- /dev/null
|
|
|
c81b6a |
+++ b/sos/plugins/last.py
|
|
|
c81b6a |
@@ -0,0 +1,33 @@
|
|
|
c81b6a |
+# This program is free software; you can redistribute it and/or modify
|
|
|
c81b6a |
+# it under the terms of the GNU General Public License as published by
|
|
|
c81b6a |
+# the Free Software Foundation; either version 2 of the License, or
|
|
|
c81b6a |
+# (at your option) any later version.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# This program is distributed in the hope that it will be useful,
|
|
|
c81b6a |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
c81b6a |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
c81b6a |
+# GNU General Public License for more details.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# You should have received a copy of the GNU General Public License
|
|
|
c81b6a |
+# along with this program; if not, write to the Free Software
|
|
|
c81b6a |
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+class Last(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
|
|
|
c81b6a |
+ """login information
|
|
|
c81b6a |
+ """
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ plugin_name = 'last'
|
|
|
c81b6a |
+ profiles = ('system',)
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+ def setup(self):
|
|
|
c81b6a |
+ self.add_cmd_output("last", root_symlink="last")
|
|
|
c81b6a |
+ self.add_cmd_output([
|
|
|
c81b6a |
+ "last reboot",
|
|
|
c81b6a |
+ "last shutdown",
|
|
|
c81b6a |
+ "lastlog"
|
|
|
c81b6a |
+ ])
|
|
|
c81b6a |
+
|
|
|
c81b6a |
+# vim: et ts=4 sw=4
|
|
|
c81b6a |
--
|
|
|
c81b6a |
1.8.3.1
|
|
|
c81b6a |
|