aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/en/sosreport.17
-rw-r--r--sos/plugins/__init__.py5
2 files changed, 9 insertions, 3 deletions
diff --git a/man/en/sosreport.1 b/man/en/sosreport.1
index a885d563..75819b6e 100644
--- a/man/en/sosreport.1
+++ b/man/en/sosreport.1
@@ -158,8 +158,11 @@ and including logs in non-default locations. This option may significantly
increase the size of reports.
.TP
.B \--since YYYYMMDD[HHMMSS]
-Limits the collection to logs newer than this date.
-This also affects \--all-logs. Will pad with 0s if HHMMSS isn't specified.
+Limits the collection of log archives to those newer than this date. A log
+archive is any file not found in /etc, that has either a numeric or a
+compression-type file extension for example ".zip". ".1", ".gz" etc.).
+This also affects \--all-logs. The date string will be padded with zeros
+if HHMMSS is not specified.
.TP
.B \--allow-system-changes
Run commands even if they can change the system (e.g. load kernel modules).
diff --git a/sos/plugins/__init__.py b/sos/plugins/__init__.py
index b7a47b6a..44ae413d 100644
--- a/sos/plugins/__init__.py
+++ b/sos/plugins/__init__.py
@@ -917,6 +917,7 @@ class Plugin(object):
since = self.get_option('since')
logarchive_pattern = re.compile(r'.*((\.(zip|gz|bz2|xz))|[-.][\d]+)$')
+ configfile_pattern = re.compile(r"^%s/*" % self.join_sysroot("etc"))
if not self.test_predicate(pred=pred):
self._log_info("skipped copy spec '%s' due to predicate (%s)" %
@@ -962,7 +963,9 @@ class Plugin(object):
""" When --since is passed, or maxage is coming from the
plugin, we need to filter out older files """
- if logarchive_pattern.search(path) is None:
+ # skip config files or not-logarchive files from the filter
+ if ((logarchive_pattern.search(path) is None) or
+ (configfile_pattern.search(path) is not None)):
return True
filetime = datetime.fromtimestamp(getmtime(path))
if ((since and filetime < since) or