Bug 25590 - cron.daily script not optimal in sysstat-3.3.3
cron.daily script not optimal in sysstat-3.3.3
Status: CLOSED DUPLICATE of bug 24820
Product: Red Hat Linux
Classification: Retired
Component: sysstat (Show other bugs)
7.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Preston Brown
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-02-01 20:33 EST by Stephen John Smoogen
Modified: 2007-04-18 12:31 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-02-01 20:33:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stephen John Smoogen 2001-02-01 20:33:49 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.16-22smp i686; en-US; m18)
Gecko/20010131


The new sysstat cron script only documents 4 hours of data. This is because
sar starts from local 00:00 time on each report and the script is run at
04:00. The fix should be to run the sar command against the last days
logfile versus the current days. That will give a complete report of the
previous day

Reproducible: Always
Steps to Reproduce:
1.look at /var/log/sa/sarXX and see that report only covers 0400
2.
3.
	

The fix should be to run the sar command against the last days logfile
versus the current days. That will give a complete report of the
previous day. Below is the fixed script

#!/bin/sh
# /usr/lib/sa/sa2.sh
# (C) 1999,2000 Sebastien Godard <sebastien.godard@wanadoo.fr>
#
S_TIME_FORMAT=ISO ; export S_TIME_FORMAT
DATE=`date +%d --date="yesterday"`
RPT=/var/log/sa/sar${DATE}
ENDIR=/usr/bin
DFILE=/var/log/sa/sa${DATE}
cd ${ENDIR}
${ENDIR}/sar $* -f ${DFILE} > ${RPT}
find /var/log/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 -exec rm -f {} \;
Comment 1 Preston Brown 2001-02-02 18:06:03 EST

*** This bug has been marked as a duplicate of 24820 ***

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