aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2016-12-01 12:48:24 +0100
committerMichael Adam <obnox@samba.org>2016-12-01 16:15:12 +0100
commita8bce248b73b734ac8e50840bf82898e6ddcee83 (patch)
tree8f9b4b8f6e4917adedf5dd1018505b118f59bf3d
parentab708f13de98ceb5b07794a5a2a488f6d9dd5240 (diff)
downloadsos-a8bce248b73b734ac8e50840bf82898e6ddcee83.tar.gz
[samba] apply --size-limit to collected log files
Signed-off-by: Michael Adam <obnox@samba.org>
-rw-r--r--sos/plugins/samba.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/sos/plugins/samba.py b/sos/plugins/samba.py
index 1482593c..edbc40e8 100644
--- a/sos/plugins/samba.py
+++ b/sos/plugins/samba.py
@@ -23,12 +23,18 @@ class Samba(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
profiles = ('services',)
def setup(self):
+ self.limit = self.get_option("log_size")
+
self.add_copy_spec([
"/etc/samba/smb.conf",
"/etc/samba/lmhosts",
- "/var/log/samba/log.smbd",
- "/var/log/samba/log.nmbd"
])
+
+ self.add_copy_spec_limit("/var/log/samba/log.smbd",
+ sizelimit=self.limit)
+ self.add_copy_spec_limit("/var/log/samba/log.nmbd",
+ sizelimit=self.limit)
+
self.add_cmd_output([
"wbinfo --domain='.' -g",
"wbinfo --domain='.' -u",