diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-04-26 18:31:18 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-04-26 18:39:13 +0100 |
commit | 4093debbad9036db1e83031e81446836475bcdd5 (patch) | |
tree | b905ba8ec67ae379a5d0f857e8688a15fd77ff71 | |
parent | f667c3d9e82f206c1efbe9c10789e9faa43d9bb9 (diff) | |
download | sos-4093debbad9036db1e83031e81446836475bcdd5.tar.gz |
Add default log size limits to squid plug-in
The squid plug-in can potentially collect large volumes of logs.
Limit it to 15M to be consistent with similar modules.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/squid.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sos/plugins/squid.py b/sos/plugins/squid.py index 61d953be..254a1beb 100644 --- a/sos/plugins/squid.py +++ b/sos/plugins/squid.py @@ -19,9 +19,11 @@ class Squid(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """ plugin_name = 'squid' - + option_list = [("logsize", "maximum size (MiB) of logs to collect", + "", 15)] files = ('/etc/squid/squid.conf',) packages = ('squid',) def setup(self): - self.add_copy_spec("/etc/squid/squid.conf") + self.add_copy_spec_limit("/etc/squid/squid.conf", + sizelimit=self.get_option('logsize')) |