aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2013-04-26 18:12:23 +0100
committerBryn M. Reeves <bmr@redhat.com>2013-04-26 18:12:23 +0100
commit511fcff6b3c9f798e0e715597629704b278f45ef (patch)
treebe291c19ddec5c8f12f6630c67c17d9b6ca2d731
parent30b9344f5193c9a2159a1f44db85c677ecbcb841 (diff)
downloadsos-511fcff6b3c9f798e0e715597629704b278f45ef.tar.gz
Remove cron related information from system plug-in
The cron data does not belong in the system plug-in and it seems pointless to have a separate module just for crontabs (but not for cron!). Move the cron logs and tabs into a new plug-in named cron. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/cron.py (renamed from sos/plugins/crontab.py)15
-rw-r--r--sos/plugins/system.py7
2 files changed, 11 insertions, 11 deletions
diff --git a/sos/plugins/crontab.py b/sos/plugins/cron.py
index 7ec2270e..f0f48560 100644
--- a/sos/plugins/crontab.py
+++ b/sos/plugins/cron.py
@@ -14,12 +14,19 @@
from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin
-class Crontab(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
+class Cron(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
"""Crontab information
"""
- plugin_name = "crontab"
+ plugin_name = "cron"
+
+ files = ('/etc/crontab')
def setup(self):
- self.add_copy_spec("/etc/cron*")
- self.add_cmd_output("crontab -l -u root", suggest_filename = "root_crontab")
+ self.add_copy_specs([
+ "/etc/cron*",
+ "/var/log/cron*",
+ "/var/spool/cron"
+ ])
+ self.add_cmd_output("crontab -l -u root",
+ suggest_filename = "root_crontab")
diff --git a/sos/plugins/system.py b/sos/plugins/system.py
index 9db5f51f..40c87805 100644
--- a/sos/plugins/system.py
+++ b/sos/plugins/system.py
@@ -23,9 +23,6 @@ class RedHatSystem(System, RedHatPlugin):
def setup(self):
self.add_copy_specs([
"/proc/sys",
- "/etc/cron*",
- "/var/spool/cron*",
- "/var/log/cron*",
"/etc/syslog.conf",
"/etc/rsyslog.conf",
"/etc/ntp.conf",
@@ -36,7 +33,6 @@ class RedHatSystem(System, RedHatPlugin):
self.add_forbidden_path(
"/proc/sys/net/ipv6/neigh/*/base_reachable_time")
- self.add_cmd_output("crontab -l")
class DebianSystem(System, DebianPlugin, UbuntuPlugin):
"""core system related information for Debian and Ubuntu
@@ -44,8 +40,6 @@ class DebianSystem(System, DebianPlugin, UbuntuPlugin):
def setup(self):
self.add_copy_specs([
"/proc/sys",
- "/etc/cron*",
- "/var/spool/cron*",
"/etc/syslog.conf",
"/etc/rsyslog.conf",
"/etc/ntp.conf" ])
@@ -54,5 +48,4 @@ class DebianSystem(System, DebianPlugin, UbuntuPlugin):
self.add_forbidden_path(
"/proc/sys/net/ipv6/neigh/*/base_reachable_time")
- self.add_cmd_output("crontab -l")