Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
How do I change time of daily logrotate? ( hour and minute )
I know when set daily configure for logrotate , this uses cron.daily setting. but I want to distinguish between logrotates ( for example : apache logrotate, daliy : 04:00AM , and syslog daily 06:00 AM )
thanks
i'd really suggest you don't bother, what are you goign to benefit from changing something that is working just fine on millions and millions of servers worldwide?
If you really have to, you'd need to split the logrotate configs out to separate files and call each on directly from a new cron entry, referencing a different config, e.g. logrotate-messages.conf. I really wouldn't do this though.
I know this fact about logrotate, but server status is critical at this time!
When logrotate script runs , load average goes up and services would be disrupted!
I need to resolve this problem , just at this time not forever!
thanks
as an example of what to tweak and add to /etc/crontab. After that you're responsible for the extra maintenance burden so document it and don't complain if something breaks.
cause of this problem is constraint of hardware on this server( RAM & CPU). I decide to migrate to another server, but I need to resolve this problem at this time,
thanks
cause of this problem is constraint of hardware on this server( RAM & CPU).
Unless you use prerotate / postrotate processing in the logrotate script all it does is delete the oldest log, create a new file and possibly compress the rotated log. So find out what exactly is hogging resources. On newer machines you could check if you could wedge the process into some low-priority cgroup, on older machines you could try execute that logrotate instance with ionice + nice (though child processes like gzip don't inherit any ionicing IIRC) or if logs are way large you could opt for processing them multiple times a day instead. Using a separate syslog server alleviates all of that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.