Bug 25590 - cron.daily script not optimal in sysstat-3.3.3
Summary: cron.daily script not optimal in sysstat-3.3.3
Status: CLOSED DUPLICATE of bug 24820
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: sysstat
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Preston Brown
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-02-02 01:33 UTC by Stephen John Smoogen
Modified: 2007-04-18 16:31 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed: 2001-02-02 01:33:54 UTC


Attachments (Terms of Use)

Description Stephen John Smoogen 2001-02-02 01:33:49 UTC
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 23:06:03 UTC

*** 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.