aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Moravec <pmoravec@redhat.com>2017-08-31 17:11:21 +0200
committerBryn M. Reeves <bmr@redhat.com>2017-10-27 14:18:52 +0100
commit8abdbbf099b740ab213f51a006fb3c2150a2ec80 (patch)
tree50a46715c157698ad63c8f62dfacba21dcb0ad56
parent975496614693e21ddad920d44492739e8542687d (diff)
downloadsos-8abdbbf099b740ab213f51a006fb3c2150a2ec80.tar.gz
[nscd] apply --all-logs option
If --all-logs is specified, dont limit logs by size. Related to: #1083 Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/nscd.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sos/plugins/nscd.py b/sos/plugins/nscd.py
index 2a2ae909..a918cc21 100644
--- a/sos/plugins/nscd.py
+++ b/sos/plugins/nscd.py
@@ -30,10 +30,12 @@ class Nscd(Plugin, RedHatPlugin, DebianPlugin, UbuntuPlugin):
def setup(self):
self.add_copy_spec("/etc/nscd.conf")
+ self.limit = (None if self.get_option("all_logs")
+ else self.get_option("log_size"))
opt = self.file_grep(r"^\s*logfile", "/etc/nscd.conf")
if (len(opt) > 0):
for o in opt:
f = o.split()
- self.add_copy_spec(f[1], sizelimit=self.get_option("log_size"))
+ self.add_copy_spec(f[1], sizelimit=self.limit)
# vim: set et ts=4 sw=4 :