Alert log file rotation in Linux Platform

Alert log file rotation in Linux Platform

Step 1: Create a job in Crontab as follows:
Make a new line of job and choose the time when you want to run the crontab job:

00 9 * * 1 /usr/sbin/logrotate -s /u01/app/oracle/config/alertrotate.status /u01/app/oracle/config/alertrotate.conf

Step 2: Open the file alertrotate.status see the code writen or copy paste the following file for creating alert rotate status file.
Alertrotate.status has path of the alert log file.

oracle@: /u01/app/oracle/script # more /u01/app/oracle/config/alertrotate.status
logrotate state -- version 2
"/u01/app/oracle/diag/rdbms//trace/alert_.log" 2013-7-22

Step 3: Alert rotate config file mention the parameter on what bases it rotate , weekly monthly etc, compress etc

oracle@: /u01/app/oracle/script # more /u01/app/oracle/config/alertrotate.conf
/u01/app/oracle/diag/rdbms//trace/alert_.log {
weekly
missingok
rotate 7
compress
create
}

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.