![]() |
Managing Log and Archive Files |
SYNTAX: fwlogmgmt { -a | -l } FLAGS -a Use this option to manage and maintain archived log files as directed in the /etc/security/logmgmt.cfg file. -l Use this option to compress and archive log files as directed in the /etc/security/logmgmt.cfg file.Crontab Example: A quick method for setting up a crontab is detailed below. To learn more about the AIX crontab function, issue "man crontab" from the AIX command line.
To set up a crontab that will compress and archive all log files (that have been configured to be archived) every Sunday at 2am, follow these steps:
crontab -e(This should bring up an editor session using the editor defined by your $EDITOR variable. If you wish to use another editor, you can either change the value of the $EDITOR variable or issue
minute hour day_of_month month weekday
These fields accept the following values:
So, in order to run the fwlogmgmt field every Sunday at 2am, add the following line to the bottom of the crontab file:
0 2 * * 0 /usr/bin/fwlogmgmt -l
Your crontab file should now look something like this:
------------------------------------------------------------------- # (C) COPYRIGHT International Business Machines Corp. 1989,1994 # All Rights Reserved # Licensed Materials - Property of IBM # # US Government Users Restricted Rights - Use, duplication or # disclosure restricted by GSA ADP Schedule Contract with IBM Corp. # #0 3 * * * /usr/sbin/skulker #45 2 * * 0 /usr/lib/spell/compress #45 23 * * * ulimit 5000; /usr/lib/smdemon.cleanu > /dev/null 0 11 * * * /usr/bin/errclear -d S,O 30 0 12 * * * /usr/bin/errclear -d H 90 0 2 * * 0 /usr/bin/fwlogmgmt -l -------------------------------------------------------------------