Bug 18212

Summary: sar does not work from cron
Product: [Retired] Red Hat Linux Reporter: Marcel van Groenigen <pfismvg>
Component: sysstatAssignee: Preston Brown <pbrown>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: byap, heckmann
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-03 13:09:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marcel van Groenigen 2000-10-03 13:09:09 UTC
the sa1 and sa2 called from the cron are missing a username to run with
therefor sar info wil not be available

line in /etc/crontab

5 19 * * * /usr/lib/sa/sa2 -A &

should be

5 19 * * * root /usr/lib/sa/sa2 -A &

Comment 1 Preston Brown 2000-10-10 15:26:31 UTC
fixed by errata.

Comment 2 heckmann 2000-10-12 15:48:58 UTC
I think this is still broken with the errata, I get complaints from cron:

"Cannot open /var/log/sa/sa11: No such file or directory"

shouldn't the following line from /etc/crontab:

0 * * * root 0,6 /usr/lib/sa/sa1 600 6 &

be

0 * * * * root /usr/lib/sa/sa1 600 6 &

or one of the other recommended settings, but "root  0,6" must be wrong....


Comment 3 Alexander Kourakos 2000-10-13 16:18:58 UTC
Shouldn't the cron entry be put in /etc/cron.d/ rather than changing 
/etc/crontab?

Comment 4 Brandon Yap 2000-10-19 13:53:04 UTC
I'm getting the same error that heckmann is getting too. It seems that sa1 
isn't running everyday so you're going to get errors that the latest summary 
file isn't there by sa2. You should find that sa2 will only work on weekends 
which is the 0,6 crontab setting of sa1.
Looks like a bug to me.