- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- logs rotation at 22:15
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2011 01:57 PM
08-23-2011 01:57 PM
logs rotation at 22:15
how can I rotate logs daily at 22:15
following is my syslog-ng configuration in logrotate:
/var/log/vta.log {
dateext
rotate 365
daily
missingok
copytruncate
create 640 root root
postrotate
/etc/init.d/syslog reload
endscript
}
Please help
Regards
Maaz
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2011 08:43 AM
08-25-2011 08:43 AM
Re: logs rotation at 22:15
If you want to rotate all daily-rotatable logs at 22:15, you should modify the time when your daily logrotate task runs.
Typically, logrotate is started by a script in /etc/cron.daily (or one of the other /etc/cron.* directories). If that is the case, then /etc/crontab (or in some cases, /etc/cron.d/anacron) determines the time when the tasks in /etc/cron.daily and similar directories are run. When you find the right entry, modify it to make it run at the time you want.
If you want to rotate only a specific set of logfiles at 22:15 daily, make a separate logrotate configuration file in some custom location (e.g. /etc/my-logrotate.conf) for those logfiles, and set up a cron job to start logrotate with that configuration file on 22:15 daily.
The cron job might look like this:
15 22 * * * /usr/sbin/logrotate /etc/my-logrotate.conf