commit 906877886ae9907220c2aa57ea653df5d8c0f10a Author: Bryn M. Reeves Date: Tue Aug 13 15:40:04 2013 +0100 Make 'ipsec barf' collection non-default in openswan plug-in Backport of 4858ce2. 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 diff --git a/sos/plugins/openswan.py b/sos/plugins/openswan.py index 4c11980..1d5573c 100644 --- a/sos/plugins/openswan.py +++ b/sos/plugins/openswan.py @@ -20,6 +20,11 @@ import os class openswan(sos.plugintools.PluginBase): """ipsec related information """ + + optionList = [("ipsec-barf", + "collect the output of the ipsec barf command", + "slow", False)] + def checkenabled(self): if self.isInstalled("openswan") or os.path.exists("/etc/ipsec.conf"): return True @@ -29,4 +34,5 @@ class openswan(sos.plugintools.PluginBase): self.addCopySpec("/etc/ipsec.conf") self.addCopySpec("/etc/ipsec.d") self.collectExtOutput("/usr/sbin/ipsec verify") - self.collectExtOutput("/usr/sbin/ipsec barf") + if self.getOption("ipsec-barf"): + self.collectExtOutput("/usr/sbin/ipsec barf")