I read about a few articles on line, but I still do not get how logrotate works.
My config file is as follows:
/var/log/usage.log {
rotate 10
daily
size 1G
missingok
notifempty
sharedscripts
postrotate
/usr/local/bin/cond_pkill.sh -s HUP /var/run/production.pid java
endscript
}
I notice that my main service performance dip a little bit whenever logrotate starts. I am trying to find out the reason.
I can think of two things right now.
One is logrotate actually copies the files around instead of renaming them. Is this true? I understand that logrotate config has an option called copy. If I do not set that option, will logrotate still copy the files? My files are large, > 2G each.
Another thing is HUP signal causes my service performance to dip. I will follow up on that.
Thanks, Jerry