[comp.unix.questions] CRON with no logging?

pjh@mccc.UUCP (Pete Holsberg) (08/09/88)

I'm running SysV R3.1.2 on a 3B2/400.  Every now and then, cron seems to
stop logging its activities to /usr/lib/cron/log.  Apparently, cron is
still running -- just no more logging.

Does anyone know what causes logging to stop and what I can do to
prevent that from happening again?  Thanks.

Pete Holsberg                   UUCP: {rutgers!}princeton!mccc!pjh
Technology Division             CompuServe: 70240,334
Mercer College                  GEnie: PJHOLSBERG
Trenton, NJ 08690               Voice: 1-609-586-4800

haugj@pigs.UUCP (Joe Bob Willie) (08/11/88)

In article <750@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes:
>
>I'm running SysV R3.1.2 on a 3B2/400.  Every now and then, cron seems to
>stop logging its activities to /usr/lib/cron/log.  Apparently, cron is
>still running -- just no more logging.
>
>Does anyone know what causes logging to stop and what I can do to
>prevent that from happening again?  Thanks.

an fuser of cron/log should show that no one has it open, not even
cron.  if you are periodically moving cron/log to, say, cron/oldlog,
an fuser of cron/oldlog should reveal that cron is still using the
old log.  cron never closes and reopens the log file ...

the solution seems to be to copy the cron/log to someplace else,
and zero the file.  to make matters worse, removing the file completely
seems to cause the file to never be unlinked and to grow without
bound.  a crash in this situation will generate an unreferenced file
when you fsck that drive.  boo, hiss.

this can be proven by cranking up crash and looking at the user
structure for cron to find out what files it still has open.  one
of them is going to be the log file.  scanning the file system for
the appropriate i-numbers will locate the missing log file.
-- 
 jfh@rpp386.uucp	(The Beach Bum at The Big "D" Home for Wayward Hackers)
     "Never attribute to malice what is adequately explained by stupidity"
                -- Hanlon's Razor