NETWORK PRESENCE ABOUT SERVICES PRODUCTS TRAINING CONTACT US SEARCH SUPPORT
 


Search
display results
words begin  exact words  any words part 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[FW-1] R: [FW-1] Log switching with a Cron Job---Please Help



Hi

I have this single line in my cron file and it works fine for me:
        (FWDIR=/usr/lpp/CPfw1-41; export FWDIR; /usr/lpp/CPfw1-41/bin/fw
logswitch)
If you do not give any parameter to logswitch it creates a file named
according to the following mask: DDMMMYYYY-HH:MM:SS
where MMM is the three letters initials of the month.
I'm using FireWall-1 4.1 Build 41716 on AIX 4.3.3.

That said, if you want to move the switched files to a different location
you may want to add a specific mv command with proper wild characters.

HTH.

Roberto

-----Messaggio originale-----
Da:     Joseph J. Gallo [SMTP:[email protected]]
Inviato:        venerdi 5 aprile 2002 18.59
A:      [email protected]
Oggetto:        Re: [FW-1] Log switching with a Cron Job---Please Help

Chuck,

I was not aware that I could use the date command in the logswitch.
That makes a lot more sense to do it in one step. Thanks for the
pointer.

Joe Gallo


-----Original Message-----
From: Sterling, Chuck [mailto:[email protected]]
Sent: Friday, April 05, 2002 10:52 AM
To: [email protected]
Subject: Re: [FW-1] Log switching with a Cron Job---Please Help
Importance: Low


Two things.
First, are the double quotes in the date command format string
necessary? I
use the following:
DATETIME=`date +%d%b%Y_%T`
$BINDIR/fw logswitch ${DATETIME}

This yields log files with the following name convention:
22Mar2002_23:55:00.log

Second, why do it in two steps? I feed the date to the fw logswitch
command
as shown above and let fw rename the log file rather than do that later
with
mv.



Chuck Sterling
System / Network Administrator
NASA White Sands Test Facility
Las Cruces, New Mexico, USAIn theory, theory and practice are the same. In practice, they aren't.

> ----------
> From:         Joseph J. Gallo[SMTP:[email protected]]
> Reply To:     Mailing list for discussion of Firewall-1
> Sent:         Friday, April 05, 2002 7:00 AM
> To:   [email protected]
> Subject:      [FW-1] Log switching with a Cron Job---Please Help
>
> I have the following CRON Job set up to run on FW-1 daily:
>
> 59 11 * * * /opt/pkg/FW/bin/fw logswitch old.log (This works fine in
> switching out the log file)
> 05 0 * * * mv /opt/pkg/FW/log/old.log /var/test/logs/`date
> +"%m%d%y-%H%M"`.log (This line generates an error file---see below)
> "
> "
> "
> "
>
> When the cron job runs I get the following error message in my inbox
the
> next day:
> "Syntax error: EOF in backquote substitution"
>
> If I run the line manually from the console: mv /opt...../old.log
> /var.../`date +"%m..."`.log  It works fine.
>
> Am I setting up the cron job incorrectly?  Or should I be using a
> different way to switch out the logs?
>
> Thank you in advance for your help.
>
> Joe
>
> =================================================
> To set vacation, Out Of Office, or away messages,
> send an email to [email protected]
> in the BODY of the email add:
> set fw-1-mailinglist nomail
> =================================================
> To unsubscribe from this mailing list,
> please see the instructions at
> http://www.checkpoint.com/services/mailing.html
> =================================================
> If you have any questions on how to change your
> subscription options, email
> [email protected]
> =================================================
>

=================================================
To set vacation, Out Of Office, or away messages,
send an email to [email protected]
in the BODY of the email add:
set fw-1-mailinglist nomail
=================================================
To unsubscribe from this mailing list,
please see the instructions at
http://www.checkpoint.com/services/mailing.html
=================================================
If you have any questions on how to change your
subscription options, email
[email protected]
=================================================

=================================================
To set vacation, Out Of Office, or away messages,
send an email to [email protected]
in the BODY of the email add:
set fw-1-mailinglist nomail
=================================================
To unsubscribe from this mailing list,
please see the instructions at
http://www.checkpoint.com/services/mailing.html
=================================================
If you have any questions on how to change your
subscription options, email
[email protected]
=================================================

=================================================
To set vacation, Out Of Office, or away messages,
send an email to [email protected]
in the BODY of the email add:
set fw-1-mailinglist nomail
=================================================
To unsubscribe from this mailing list,
please see the instructions at
http://www.checkpoint.com/services/mailing.html
=================================================
If you have any questions on how to change your
subscription options, email
[email protected]
=================================================



 
----------------------------------

ABOUT SERVICES PRODUCTS TRAINING CONTACT US SEARCH SUPPORT SITE MAP LEGAL
   All contents © 2004 Network Presence, LLC. All rights reserved.