Blob Blame History Raw
From 1932d96dcf9071d1180286b96abfd998e20a09fd Mon Sep 17 00:00:00 2001
From: Pavel Moravec <pmoravec@redhat.com>
Date: Thu, 11 Jan 2018 12:52:34 +0100
Subject: [PATCH] [pcp] really apply sizelimit to logs collected

add_copy_spec must be called to files and not dirs, to apply sizelimit

Resolves: #1187

Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
 sos/plugins/pcp.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sos/plugins/pcp.py b/sos/plugins/pcp.py
index 12537526b..8f17a5de5 100644
--- a/sos/plugins/pcp.py
+++ b/sos/plugins/pcp.py
@@ -122,7 +122,7 @@ def setup(self):
         if self.pcp_hostname != '':
             for pmdir in ('pmlogger', 'pmmgr'):
                 path = os.path.join(self.pcp_log_dir, pmdir,
-                                    self.pcp_hostname)
+                                    self.pcp_hostname, '*')
                 self.add_copy_spec(path, sizelimit=self.limit)
 
         self.add_copy_spec([