Logrotate query/issue

Hi Team,

I have setup the following logrotate config file to housekeep the oracle alert log:

/oraadm/diag/rdbms/devh/DEVH/trace/alert_DEVH.log {
compress
dateext
daily
rotate 7
notifempty
missingok
copytruncate
}

I run it with the following command:

oracle@LDN_ORA_DEV:/home/oracle/logrotateconf $ logrotate -v /home/oracle/logrotateconf/devh_alert.conf -s /home/oracle/devh_alert.tmp >/home/oracle/logrotateconf/devh_alert.log
reading config file /home/oracle/logrotateconf/devh_alert.conf
Allocating hash table for state file, size 15360 B

Handling 1 logs

rotating pattern: /oraadm/diag/rdbms/devh/DEVH/trace/alert_DEVH.log after 1 days (7 rotations)
empty log files are not rotated, old logs are removed
considering log /oraadm/diag/rdbms/devh/DEVH/trace/alert_DEVH.log
log does not need rotating (log has been already rotated)set default create context

I see the output above but I'm wondering why I don't see any new compressed alert logs?

This is first time I've run it.

Should I wait 24 hours and run the command and then be able to see any rotated logfiles?

Thanks for any assistance.

jd

Either wait 24 hours, or run logrotate with -f (or --force ):
logrotate -fv ...

You have dateext configured, so it should create files like
/oraadm/diag/rdbms/devh/DEVH/trace/alert_DEVH.log-YYYYMMDD

1 Like

Thank you thats big help.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.