diff options
-rw-r--r-- | sos/plugins/chrony.py | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/sos/plugins/chrony.py b/sos/plugins/chrony.py index 8d115f97..8eafcfd9 100644 --- a/sos/plugins/chrony.py +++ b/sos/plugins/chrony.py @@ -6,10 +6,10 @@ # # See the LICENSE file in the source distribution for further information. -from sos.plugins import Plugin, RedHatPlugin +from sos.plugins import Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin -class Chrony(Plugin, RedHatPlugin): +class Chrony(Plugin): """Chrony clock (for Network time protocol) """ @@ -19,10 +19,6 @@ class Chrony(Plugin, RedHatPlugin): packages = ('chrony',) def setup(self): - self.add_copy_spec([ - "/etc/chrony.conf", - "/var/lib/chrony/drift" - ]) self.add_cmd_output([ "chronyc activity", "chronyc tracking", @@ -32,6 +28,26 @@ class Chrony(Plugin, RedHatPlugin): "chronyc ntpdata", "chronyc -n clients" ]) + + +class RedHatChrony(Chrony, RedHatPlugin): + def setup(self): + super(RedHatChrony, self).setup() + self.add_copy_spec([ + "/etc/chrony.conf", + "/var/lib/chrony/drift" + ]) self.add_journal(units="chronyd") + +class DebianChrony(Chrony, DebianPlugin, UbuntuPlugin): + def setup(self): + super(DebianChrony, self).setup() + self.add_copy_spec([ + "/etc/chrony/chrony.conf", + "/var/lib/chrony/chrony.drift", + "/etc/default/chrony" + ]) + self.add_journal(units="chrony") + # vim: et ts=4 sw=4 |