aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMIZUTA Takeshi <mizuta.takeshi@fujitsu.com>2020-02-12 13:51:18 +0100
committerPavel Moravec <pmoravec@redhat.com>2020-02-12 13:51:18 +0100
commite530f9443506f833b9aa2dfbe067333cd34d3536 (patch)
tree014e1110667c18adf5cd70e225d96f5288dd326d
parent57255f0b92f4b88cf219a7f03f1515cb88f8921e (diff)
downloadsos-e530f9443506f833b9aa2dfbe067333cd34d3536.tar.gz
[sar] Don't truncate sa file even if --log-size limit is reached
When sa file is truncated, it cannot be read correctly. Fix tailit specified in add_copy_spec() to False so that the sa file is not truncated. Resolves: #1871 Signed-off-by: MIZUTA Takeshi <mizuta.takeshi@fujitsu.com> Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
-rw-r--r--sos/plugins/sar.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sos/plugins/sar.py b/sos/plugins/sar.py
index 1780d0eb..ba637dc0 100644
--- a/sos/plugins/sar.py
+++ b/sos/plugins/sar.py
@@ -24,7 +24,8 @@ class Sar(Plugin,):
def setup(self):
self.add_copy_spec(self.sa_path,
- sizelimit=0 if self.get_option("all_sar") else None)
+ sizelimit=0 if self.get_option("all_sar") else None,
+ tailit=False)
try:
dir_list = os.listdir(self.sa_path)