aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Bouchard <louis.bouchard@canonical.com>2014-04-23 17:08:22 +0200
committerLouis Bouchard <louis.bouchard@canonical.com>2014-04-23 17:08:22 +0200
commit8aed05343ae69931adf823d093f16c1d247f2908 (patch)
treed0bedf0e3bff4a53519718dc76dc1d70c953fcaf
parentc31d59fb1e649310c94dcbdc8cbc0044c4379b7b (diff)
downloadsos-8aed05343ae69931adf823d093f16c1d247f2908.tar.gz
Add upstart log collection
Signed-off-by: Louis Bouchard <louis.bouchard@canonical.com>
-rw-r--r--sos/plugins/upstart.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/sos/plugins/upstart.py b/sos/plugins/upstart.py
index fedf1a60..876ac793 100644
--- a/sos/plugins/upstart.py
+++ b/sos/plugins/upstart.py
@@ -24,6 +24,9 @@ class Upstart(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
plugin_name = 'upstart'
packages = ('upstart',)
+ option_list = [("logsize", "maximum size (MiB) of logs to collect",
+ "", 15)]
+
def setup(self):
self.add_cmd_outputs([
'initctl --system list',
@@ -41,6 +44,9 @@ class Upstart(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
# State file
self.add_copy_spec('/var/log/upstart/upstart.state')
+ # Log files
+ self.add_copy_spec_limit('/var/log/upstart/*',
+ sizelimit=self.get_option('logsize'))
# Session Jobs (running Upstart as a Session Init)
self.add_copy_spec('/usr/share/upstart/')