Using cron
Use the AIX® cron utility to automate scheduled maintenance and to monitor the system.
Using cron to automate maintenance of log files
Use this utility to automate some of the administrative functions that need to be done on a regular basis. Some of the PowerHA® SystemMirror® log files need cron jobs to ensure that they do not use up too much space.
Use crontab -e to edit /var/spool/cron/crontabs/root.
Cron will recognize the change without need for rebooting.
You should establish a policy for each log, depending how long you want to keep the log, and what size you will allow it to grow. hacmp.out is already set to expire after it cycles more than 7 times.
The RSCT logs are stored in the /var/ha/log directory. These logs are trimmed regularly. If you want to save information for a longer period of time, you can either redirect the logging to a different directory, or change the maximum size file parameter (using SMIT).
Using cron to set up an early warning system
Use cron to set up jobs to proactively check out the system:
- Run a custom verification daily and send a report to the system administrator.
- Check for full file systems (and take action if necessary).
- Check that certain processes are running.