Bug 19286
| Summary: | cron sends error message about nonexistent files | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | mw |
| Component: | sysstat | Assignee: | Preston Brown <pbrown> |
| Status: | CLOSED DUPLICATE | QA Contact: | David Lawrence <dkl> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.0 | CC: | dlr, mw |
| 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-25 05:16:10 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
mw
2000-10-17 21:10:39 UTC
mw.memphis.edu is right. I have the updated version of systat:
root@despot:sa$ rpm -qf /usr/lib/sa/sa2
sysstat-3.2.4-5
I've got the same damn problem:
-----------
Subject:
Cron <root@despot> /usr/lib/sa/sa2 -A &
Date:
Tue, 24 Oct 2000 19:05:00 -0700
From:
root.com (Cron Daemon)
To:
root.com
Cannot open /var/log/sa/sa24: No such file or directory
-----------
Here's my patch to make the /usr/lib/sa/sa2 script not try to read records from
a file that doesn't exist:
root@despot:sa$ diff -u sa2-ORIG sa2
--- sa2-ORIG Tue Oct 24 21:28:45 2000
+++ sa2 Tue Oct 24 21:28:04 2000
@@ -8,5 +8,7 @@
ENDIR=/usr/bin
DFILE=/var/log/sa/sa${DATE}
cd ${ENDIR}
-${ENDIR}/sar $* -f ${DFILE} > ${RPT}
+if [ -f ${DFILE} ] ; then
+ ${ENDIR}/sar $* -f ${DFILE} > ${RPT}
+fi
find /var/log/sa \( -name 'sar*' -o -name 'sa*' \) -mtime +7 -exec rm -f {} \;
I don't know if this is the Right Thing, since I don't really know what the sar
binary does, but it makes it so I don't get emailed an error message every
night, and I like that. ;P
-- Daniel Rall
The /etc/crontab entries for both the sa{1,2} scripts look just fine. However,
for some reason, I don't always have system activity data logged to /var/sa for
sar to generate the reports from:
root@despot:sa$ la /var/log/sa
total 660
drwxr-xr-x 2 root root 4096 Oct 24 19:05 ./
drwxr-xr-x 7 root root 4096 Oct 22 04:02 ../
-rw-r--r-- 1 root root 155737 Oct 21 23:50 sa21
-rw-r--r-- 1 root root 153577 Oct 22 23:50 sa22
-rw-r--r-- 1 root root 0 Oct 19 19:05 sar19
-rw-r--r-- 1 root root 0 Oct 20 19:05 sar20
-rw-r--r-- 1 root root 167911 Oct 21 19:05 sar21
-rw-r--r-- 1 root root 164853 Oct 22 19:05 sar22
-rw-r--r-- 1 root root 0 Oct 23 19:05 sar23
-rw-r--r-- 1 root root 0 Oct 24 21:22 sar24
The /usr/lib/sa/sa1 script should be logging this data to the saDD files through
its invokation of sadc.
- Daniel
|