SUSE Support

Here When You Need Us

first sysstat/sar log doesn't include block device activity

This document (7024122) is provided subject to the disclaimer at the end of this document.

Environment


SUSE Linux Enterprise Server 12 Service Pack 5 (SLES 12 SP5)
SUSE Linux Enterprise Server 12 Service Pack 4 (SLES 12 SP4)
SUSE Linux Enterprise Server 12 Service Pack 3 (SLES 12 SP3)
SUSE Linux Enterprise Server 15


Situation

When the sysstat service is enabled for the first time or after reboot, the "Report activity for each block device" will be missing until after midnight.

The reported output is:
# sar -d
Requested activities not available in file /var/log/sa/sa<date>

instead:

# sar -d
Linux <kernelversion>-default (<hostname>)        <date>      <architecture>       (X CPU)

<time> PM  LINUX RESTART      (X CPU)

<time>   PM       DEV       tps     rkB/s     wkB/s   areq-sz    aqu-sz     await     svctm     %util
<time>   PM    dev8-0      0.09      0.00      0.85      8.91      0.00      0.49      0.49      0.00
<time>   PM   dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00
Average:       dev8-0      0.09      0.00      0.85      8.91      0.00      0.49      0.49      0.00
Average:      dev11-0      0.00      0.00      0.00      0.00      0.00      0.00      0.00      0.00


Resolution

In /etc/sysstat/systat changing the option SADC_OPTIONS=" " to SADC_OPTIONS='-S ALL ' resolves it.

The following SLES/SP updates include the patch, applying the change of this option automatically and making it default:

The SLES12 SP4 sysstat-12.0.2-10.30.1, released November 2019
The SLES12 SP5 sysstat-12.0.2-10.27.1, released December 2019
The SLE15 GA/SP1 sysstat-12.0.2-3.18.1, released November 2019

Cause

When the sysstat.service is started by systemd it is run with the "-boot" option:

[Service]
Type=oneshot
ExecStart=/usr/lib64/sa/sa1  --boot
ExecStart=/bin/ln -fs /etc/sysstat/sysstat.cron /etc/cron.d/sysstat
[...]

The sa<date> file is written to /var/log/sa/. It uses the default options and doesn't gather any extended data.
Once this sar log file is created no new fields can be added.

When cron starts data collection every 10 minutes with the option "-S ALL", no new data can be added to the file.
So for the first data collection only default options are used.

After midnight, when the file is rolled over and this time cron generates the new file with: "-S ALL", the block device activity will be written.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7024122
  • Creation Date: 17-Sep-2019
  • Modified Date:03-Mar-2020
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.