Re: [logs] compress log error (was PIX logging)

From: Daniel Deremiah (Daniel.Deremiahat_private)
Date: Wed Oct 09 2002 - 13:09:08 PDT

  • Next message: Ganu Skop: "[logs] Fight Back"

    remove the compress line and add the gzip command to the postrotate 
    sequence.  What is happening is you are renaming the file out of under the 
    rotate script.
    
    -- 
    -dand
    
    =============================================================
    Dan Deremiah                        Unix System Administrator
    Wind River Systems, Alameda CA              510/749-2033 Desk
    =============================================================
    
    On Fri, 6 Sep 2002, Allen Crawford wrote:
    
    > Ok, I've got the PIX logging working now I believe.  I had to create a
    > separate logrotate script and run it at a specific time (11:55pm) because I
    > just realized that the daily cron job was running at 4:02 pm, which isn't
    > when I want my Cisco logs to be rotated.
    > 
    > Anyway, the only problem I'm having now is getting them to compress.  Here's
    > the logrotate script for the PIX that I'm using:
    > 
    > /var/log/cisco_pix_515e/pix {
    > 	daily
    > 	rotate 4
    > 	create
    > 	compress
    > 	   postrotate
    > 	      /usr/bin/killall -HUP syslogd; mv
    > /var/log/cisco_pix_515e/pix.1 /var/log/cisco_pix_515e/pix$(date +%Y%m%d)
    > 	   endscript
    > }
    > 
    > 
    > For testing I'm calling it with the following line:
    > 
    > logrotate -f /etc/cisco_pix_515e_logrotate_script
    > 
    > After running that, it rotates it correctly and starts logging to the new
    > file.  However, with the compress line left in the script, I get the
    > following error:
    > 
    > gzip: /var/log/cisco_pix_515e/pix.1: No such file or directory
    > failed to compress log /var/log/cisco_pix_515e/pix.1
    > 
    > Any tips on what I am doing wrong here?
    > 
    > Thanks a lot,
    > Allen
    > _______________________________________________
    > LogAnalysis mailing list
    > LogAnalysisat_private
    > http://lists.shmoo.com/mailman/listinfo/loganalysis
    > 
    
    
    _______________________________________________
    LogAnalysis mailing list
    LogAnalysisat_private
    http://lists.shmoo.com/mailman/listinfo/loganalysis
    



    This archive was generated by hypermail 2b30 : Thu Oct 10 2002 - 06:27:23 PDT