Problem with log rotation
I've got a problem with log rotating in my isdnutils package:
The daemon (isdnlog) writes a view log files (in /var/log/isdn) which
should be rotated, so that they don't consume much disk space. However,
the daemon doesn't close these files if idle, so I can't just rotate the
files, since the gzip would damage the files (I actually tried this ;-)
So what's the best solution to this problem?
I tried to do log rotating in /etc/init.d/isdn before the daemon is
started, but if one powers the system up and down a few times, one loses
some information of the log files. (Perhaps this wouldn't be a problem. I
will think of it again.)
So what I was thinking of, was to check if the log file was created a day
ago (or even earlier), then I would rotate them, otherwise don't. How can
I test for file creation time? Or is there some easy way to get the last
system bootup time?
Thanks in advance,
Chris
-- _,, Christian Schwarz
/ o \__ schwarz@monet.m.isar.de, schwarz@debian.org,
! ___; schwarz@informatik.tu-muenchen.de, bm955877@muenchen.org
\ /
\\\______/ ! PGP-fp: 8F 61 EB 6D CF 23 CA D7 34 05 14 5C C8 DC 22 BA
\ / http://www.informatik.tu-muenchen.de/~schwarz/
-.-.,---,-,-..---,-,-.,----.-.-
"DIE ENTE BLEIBT DRAUSSEN!"
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: