Bug 19286 - cron sends error message about nonexistent files
cron sends error message about nonexistent files
Status: CLOSED DUPLICATE of bug 19129
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: 2000-10-17 17:10 EDT by mw
Modified: 2007-04-18 12:29 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-10-25 01:16:10 EDT
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 mw 2000-10-17 17:10:39 EDT
I get these misterious messages sent by cron to root:

---------------------------------------------
Date: 17 Oct 2000 00:05:01 -0000
From: root@wierdlmpc.msci.memphis.edu (Cron Daemon)
To: root@wierdlmpc.msci.memphis.edu
Subject: Cron <root@moni> /usr/lib/sa/sa2 -A &

Cannot open /var/log/sa/sa16: No such file or directory
-------------------------------------------
Presently, I have

$ ls -l /var/log/sa/*
-rw-r--r--    1 root     root       101305 Oct 15 23:49 /var/log/sa/sa15
-rw-r--r--    1 root     root        98977 Oct 15 19:05 /var/log/sa/sar15
-rw-r--r--    1 root     root            0 Oct 16 19:05 /var/log/sa/sar16

I do have the updated version of sysstat:

# rpm -q sysstat
sysstat-3.2.4-5

Does this have anything to do with the incorrect crontab entry:

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

Thx

Mate
Comment 1 Daniel L. Rall 2000-10-25 00:53:03 EDT
mw@moni.msci.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@despot.finemaltcoding.com (Cron Daemon)
      To: 
         root@despot.finemaltcoding.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
Comment 2 Daniel L. Rall 2000-10-25 01:16:08 EDT
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
Comment 3 Preston Brown 2001-01-05 15:40:20 EST

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

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