Bug 81294 - keeping old sar data should be configurable.
keeping old sar data should be configurable.
Product: Red Hat Raw Hide
Classification: Retired
Component: sysstat (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nils Philippsen
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2003-01-07 13:30 EST by Need Real Name
Modified: 2007-04-18 12:49 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-01-27 07:26:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Need Real Name 2003-01-07 13:30:38 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020606

Description of problem:
By default sar only keeps 7 days of data.

That should be configurable.

"/etc/cron.daily/sysstat" calls "/usr/lib/sa/sa2 -A".

/usr/lib/sa/sa2 has a hardcoded "+7" in the file.  That should be in a config
file and not the script.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. cd /var/log/sa
2. ls -al sar* |wc -l

Actual Results:  I only had 9 days of sar data.  Curious why 9 when that find
command says 7.

But regardless, what if I wanted 3 weeks of sar data.

Expected Results:  I actually expected logrotate to handle this, but since sa2
has it hardcoded, the logs are being removed.

Additional info:
Comment 1 Nils Philippsen 2004-01-13 10:46:57 EST
I concur with you that logrotate should handle this. I'm inclined to
remove the "rm" line from sa2 and have sysstat logrotate scripts in a
future product/version, but it would be even better if upstream had
such changes.
Comment 2 Paul Gear 2004-01-25 05:53:40 EST
Wouldn't tmpwatch be the better tool to handle cleaning up old sar data?
Comment 3 Nils Philippsen 2004-01-25 11:43:43 EST
Well, "further inverstigation into the matter" revealed that sysstat
won't be easily converted to work with logrotate, so for the time
being the sa2 script will remain in charge to clean up old sar data.
I'm not quite sure about whether the find command with suitable
changes to be able to configure the period of time for sar data to be
kept or a replacement tmpwatch construct is better -- but so far the
find construct has worked, so unless someone gives me a compelling
reason why using tmpwatch would be better, I'll leave it that way.
Comment 4 Nils Philippsen 2004-01-27 07:26:07 EST
fixed in 5.0.0-0.6
Comment 5 Paul Gear 2004-02-12 05:46:47 EST
Will this make it through to Fedora Core?

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