diff options
author | Bryn M. Reeves <bmr@redhat.com> | 2013-08-13 15:31:37 +0100 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2013-08-13 15:31:37 +0100 |
commit | 4858ce293a77cc9b973ab7552f3e0b041360b20e (patch) | |
tree | fb04977ef0322628f3caa5fef17e4f469a21cb31 | |
parent | 4e0359b437421df175614cd14fb3b36addfda1ac (diff) | |
download | sos-4858ce293a77cc9b973ab7552f3e0b041360b20e.tar.gz |
Make 'ipsec barf' collection non-default in openswan plug-in
The 'ipsec barf' debugging command has a nasty bug where it runs
grep on /var/log/lastlog. Since this can be a multi-gigabyte
sparse file this doesn't work very well and consumes huge amounts
of memory. This can lead to timeouts and aborts when running sos
since the openswan plug-in calls this command by default.
The barf information is seldom useful anyway - turn it off by
default to avoid this problem.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r-- | sos/plugins/openswan.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sos/plugins/openswan.py b/sos/plugins/openswan.py index 22214a5d..c99968c9 100644 --- a/sos/plugins/openswan.py +++ b/sos/plugins/openswan.py @@ -21,6 +21,9 @@ class Openswan(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): """ plugin_name = 'openswan' + option_list = [("ipsec-barf", + "collect the output of the ipsec barf command", + "slow", False)] files = ('/etc/ipsec.conf',) packages = ('openswan',) @@ -30,4 +33,5 @@ class Openswan(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin): "/etc/ipsec.conf", "/etc/ipsec.d"]) self.add_cmd_output("ipsec verify") - self.add_cmd_output("ipsec barf") + if self.get_option("ipsec-barf"): + self.add_cmd_output("ipsec barf") |