RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1714243 - sos does not collect sar data if sar configured to keep more than 28 days
Summary: sos does not collect sar data if sar configured to keep more than 28 days
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: sos
Version: 8.0
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: rc
: 8.0
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-27 13:36 UTC by Josef Kubin
Modified: 2023-12-15 16:31 UTC (History)
8 users (show)

Fixed In Version: sos-3.7-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 22:32:24 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 1700 0 'None' closed [sar] collect whole sar log dir 2021-01-23 13:08:04 UTC
Red Hat Product Errata RHEA-2019:3640 0 None None None 2019-11-05 22:32:39 UTC

Description Josef Kubin 2019-05-27 13:36:30 UTC
Description of problem:

This is a Request for Feature Enhancement (RFE).

Our customer wants additional files to be included in RHEL8 sosreport, an enhancement of the following source file:
https://github.com/sosreport/sos/blob/master/sos/plugins/sar.py

Version-Release number of selected component (if applicable):
sos-3.6-10.el8.noarch

Expected results:

If I understand correctly, the output files should be as following examples:

sosreport-RHEL8-02386877-2019-05-27-eelyjtv/var/log/sa/sa20190527
sosreport-RHEL8-02386877-2019-05-27-eelyjtv/sos_commands/sar/sar_-some_flags

We need additional info from our customer and clarify requirements.

---
Regards,
Josef Kubin.
Software Maintenance Engineer
Red Hat Czech, s.r.o.

Comment 2 Pavel Moravec 2019-05-30 15:55:32 UTC
The specific selection of filemasks from /var/log/sa directory is really redundantly strict.

Any objections in copying whole /var/log/sa/ directory content, up to 25MB by default, with newest-to-older files ordering (in case size limit hit)?

Plus leave there the calls for "sar -A .." and "sadf -x .." from line https://github.com/sosreport/sos/blob/master/sos/plugins/sar.py#L50 further.


That means, patch like:

@@ -26,20 +26,8 @@ class Sar(Plugin,):
     sa_size = 20
 
     def setup(self):
-        if self.get_option("all_sar"):
-            self.sa_size = 0
-
-        # Copy all sa??, sar??, sa??.* and sar??.* files, which will net
-        # compressed and uncompressed versions, typically.
-        for suffix in ('', '.*'):
-            self.add_copy_spec(
-                os.path.join(self.sa_path, "sa[0-3][0-9]" + suffix),
-                sizelimit=self.sa_size, tailit=False
-            )
-            self.add_copy_spec(
-                os.path.join(self.sa_path, "sar[0-3][0-9]" + suffix),
-                sizelimit=self.sa_size, tailit=False
-            )
+        self.add_copy_spec(self.sa_path,
+                           sizelimit=0 if self.get_option("all_sar") else None)
 
         try:
             dir_list = os.listdir(self.sa_path)

?

(sizelimit=None means default size limit, 25MB; sizelimit=0 means no limit)

Comment 3 Josef Kubin 2019-06-03 11:47:11 UTC
Hello, here is a more detailed description:

https://access.redhat.com/support/cases/internal/#/case/02386877

<kfujii>

...

For example,

When saYYYYMMDD format sar files only are created in /var/log/sa/, sosreport does not try to include any sar info like /var/log/sa  and /sos_commands/sar.

sosreport  should need to handle saYYYYMMDD format sar files  corrctly as same as  saDD format sar files  (default formats sar files).

saYYYYMMDD format sar files are created when we change the history days to over 28 days in /etc/sysconfig/sysstat


#cat /etc/sysconfig/sysstat
       1  # sysstat-11.7.3 configuration file.
       2
       3  # How long to keep log files (in days).
       4  # If value is greater than 28, then use sadc's option -D to prevent older
       5  # data files from being overwritten. See sadc(8) and sysstat(5) manual pages.
       6  #HISTORY=28  <--- comment out
       7  HISTORY=366  <--- Add new history days ( over 28 days )

<kfujii/>

---
Regards,
Josef Kubin.
Software Maintenance Engineer
Red Hat Czech, s.r.o.

Comment 4 Pavel Moravec 2019-06-12 11:44:39 UTC
That is covered in my proposal, now in the linked PR :)

Comment 5 Pavel Moravec 2019-07-09 10:59:08 UTC
jkb promised OtherQE for 8.1

Comment 8 Pavel Moravec 2019-07-09 13:25:48 UTC
Hi,
could you pls. verify the bug against below build? Thanks in advance.


A yum repository for the build of sos-3.7-2.el8 (task 22574870) is available at:

http://brew-task-repos.usersys.redhat.com/repos/official/sos/3.7/2.el8/

You can install the rpms locally by putting this .repo file in your /etc/yum.repos.d/ directory:

http://brew-task-repos.usersys.redhat.com/repos/official/sos/3.7/2.el8/sos-3.7-2.el8.repo

RPMs and build logs can be found in the following locations:
http://brew-task-repos.usersys.redhat.com/repos/official/sos/3.7/2.el8/noarch/

The full list of available rpms is:
http://brew-task-repos.usersys.redhat.com/repos/official/sos/3.7/2.el8/noarch/sos-3.7-2.el8.src.rpm
http://brew-task-repos.usersys.redhat.com/repos/official/sos/3.7/2.el8/noarch/sos-3.7-2.el8.noarch.rpm
http://brew-task-repos.usersys.redhat.com/repos/official/sos/3.7/2.el8/noarch/sos-audit-3.7-2.el8.noarch.rpm

Build output will be available for the next 21 days.

Comment 9 Josef Kubin 2019-07-25 10:42:08 UTC
Hi, I am back from PTO.

Thank you for the links, I just downloaded packages.

Tomorrow I'll test them.

---
Regards,
Josef Kubin.
Software Maintenance Engineer
Red Hat Czech, s.r.o.

Comment 10 Miroslav Hradílek 2019-07-30 13:18:26 UTC
Looks by my testing that saYYYYMMDD and sarYYYYMMDD files are now collected by sos-3.7-2.el8.noarch

There is diferecnce though.

For YYYYMMDD variant of files:
 * xml variant of sar is not collected.
 * human readable sar variant for every sa file without sar equivalent already created is not collected.

I assume that the xml and sar generation is not requirement of this bugzilla. Please correct me if I'm wrong.

Comment 11 Pavel Moravec 2019-07-30 15:20:01 UTC
FYI upstream discussion on the same (sar -A / sadf -X):

https://github.com/sosreport/sos/issues/1741

Comment 12 Josef Kubin 2019-08-01 13:01:54 UTC
I'm testing it now ...

I can confirm, that var/log/sa/saYYYYMMDD are collected in sosreport now.
I'll be back soon.

---
Regards,
Josef Kubin.
Software Maintenance Engineer
Red Hat Czech, s.r.o.

Comment 15 errata-xmlrpc 2019-11-05 22:32:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2019:3640


Note You need to log in before you can comment on or make changes to this bug.