RE: log rotation

From: Remko Lodder (remko_at_elvandar.org)
Date: 03/15/04

  • Next message: Kris Kennaway: "Re: Why .tgz packages for 4.x"
    To: "Wayne Sierke" <ws+freebsd-questions@au.dyndns.ws>, "Bart Silverstrim" <bsilver@chrononomicon.com>
    Date: Mon, 15 Mar 2004 13:29:38 +0100
    
    

    you can also write a script, cp -p the logfile and immediatly after that :>
    the file

    cp -p oldfile newfile && :> oldfile
    this keeps the file descriptors intact and might work

    Since i cannot test this, it's just a guess.

    Cheers

    --
    Kind regards,
    Remko Lodder
    Elvandar.org/DSINet.org
    www.mostly-harmless.nl Dutch community for helping newcomers on the
    hackerscene
    -----Oorspronkelijk bericht-----
    Van: owner-freebsd-questions@freebsd.org
    [mailto:owner-freebsd-questions@freebsd.org]Namens Wayne Sierke
    Verzonden: maandag 15 maart 2004 13:00
    Aan: Bart Silverstrim
    CC: FreeBSD Questions Mailing List
    Onderwerp: Re: log rotation
    On Mon, 2004-03-15 at 10:37, Bart Silverstrim wrote:
    > Quick questions:
    > I've run across some mumblings in the ClamAV lists about Clamd not
    > logging anymore (or not scanning anymore?) when the maximum
    > logfile size is reached.  Is anyone in FreeBSD running this, and if so,
    > are you using Newsyslog to rotate the logs?  What are your settings
    > (how would I set it up)?
    >
    Having recently installed clamav I was interested in getting log
    rotation enabled too (5.2-RELEASE). As an experiment I set the when
    entry in newsyslog.conf to 1 hour. After the log rotation I'm not
    getting any new entries written to the logfile. I believe I saw
    somewhere someone claiming that logrotate was working for them (but
    probably on Linux). Might have to try that instead.
    Wayne
    > Elaborations:
    > I didn't know what would be a safe way to do this, since I also have
    > an every-four-hour update running for the clamav and I didn't know
    >   what would happen if
    > A) the update for the database falls at a moment when the log is
    >   rotating
    > B) I didn't find the "proper" way to rotate the log so Clamd doesn't
    > have an open file handle on a log being rotated and/or have clamd
    > try writing to the file while it's being rotated
    > C) how can clamd have the file rotated without being "temporarily
    > disabled" running into problems because that disabled clamd may
    > be called on in that period by amavisd-new to do a virus scan on
    > a mail message...
    >
    > Anyone got a good log rotation scheme in place to handle this
    > automatically without running into problems?
    >
    > Thanks!
    > -Bart
    >
    > _______________________________________________
    > freebsd-questions@freebsd.org mailing list
    > http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    > To unsubscribe, send any mail to
    "freebsd-questions-unsubscribe@freebsd.org"
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Kris Kennaway: "Re: Why .tgz packages for 4.x"

    Relevant Pages

    • Re: log rotation
      ... > I've run across some mumblings in the ClamAV lists about Clamd not ... > are you using Newsyslog to rotate the logs? ... > Anyone got a good log rotation scheme in place to handle this ...
      (freebsd-questions)
    • Re: [squid-users] log rotation
      ... I have looked at wiki but cannot find information about log rotation ... # rotate log files weekly ... # create new log files after rotating old ones ...
      (freebsd-questions)
    • RE: Log rotation
      ... Before you rotate the log are you stopping the syslog service? ... > I have my pix writing to a box via syslog. ... > log rotation schedule via webmin in the log rotation module. ...
      (RedHat)
    • Re: Daily security report oddity...
      ... If you look at the syntax of the logfile, you will see no year is ... Most likely the whole file is parsed on security run. ... to rotate you logfiles once a year just in case... ... security patches for the OS will at some point mandate a reboot - and ...
      (freebsd-questions)
    • busy log file rotation - solaris 8.
      ... On solaris 8 I have a busy mail server logging messages to /var/log/maillog. ... I need to rotate the files daily. ... Ive been searching the web for the best ... What's the lists opinion on the best log rotation scripts available? ...
      (SunManagers)