- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- howto check if logroate was running successfully ?
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
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
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
тАО07-07-2005 11:41 AM
тАО07-07-2005 11:41 AM
I have in /etc/cron.daily/
logrotate file with the following entries:
-------------------------------------------------------------
#!/bin/sh
/usr/sbin/logrotate /etc/logrotate.conf
-------------------------------------------------------------
which time exactly, will logrotate start ?
howto check if the last start was successfully ?
kind regards
chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2005 12:03 PM
тАО07-07-2005 12:03 PM
SolutionThis should list a line similar to:
25 6 * * * root test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily
(this is from a Woody system). This means the system starts running the jobs in '/etc/cron.daily/' at 6:25a of a morning. As to what time exactally the 'logrotate' gets done is a bit variable, depending on the other jobs in '/etc/cron.daily', but it will be within a few minute sof 6:25a.
In any case, your '/var/log/syslog' should list when cron jobs are triggered.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-07-2005 11:42 PM
тАО07-07-2005 11:42 PM
Re: howto check if logroate was running successfully ?
your file is in /etc/cron.daily so check up /etc/crontab to find out the time at which cron.daily is scheduled to run.
on my FC4 /etc/crontab entry is:
02 4 * * * root run-parts /etc/cron.daily
which means all the files in /etc/cron.daily will be executed daily at morning 4.20, so check up your system to find out.
if you are not happy to have it run only once in a day then simply remove the logrotate from cron.daily and move it outside and add entry in /etc/crontab to execute it more frequently (at the minimum of once in a minute, or may be at the maximum of once in 4 years)
Hope this helps,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2005 09:16 AM
тАО07-08-2005 09:16 AM
Re: howto check if logroate was running successfully ?
I have on my system in /etc/crontab following entries:
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin
MAILTO=root
#
# check scripts in cron.hourly, cron.daily, cron.weekly, and cron.monthly
#
-*/15 * * * * root test -x /usr/lib/cron/run-crons && /usr/lib/cron/run-crons >/dev/null 2>&1
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 0 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 0 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 0 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2005 09:24 AM
тАО07-08-2005 09:24 AM
Re: howto check if logroate was running successfully ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2005 09:24 AM
тАО07-08-2005 09:24 AM
Re: howto check if logroate was running successfully ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2005 11:05 AM
тАО07-08-2005 11:05 AM
Re: howto check if logroate was running successfully ?
ext:/etc/cron.d # ls -la
total 16
drwxr-xr-x 2 root root 4096 Mar 30 2004 .
drwxr-xr-x 58 root root 8192 Jul 9 01:26 ..
-rw-r--r-- 1 root root 32 Jan 1 2005 yast2-online-update
# /usr/bin/crontab -l
no crontab for root
what exactly do you mean with 'cron' and 'anacron' ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-08-2005 11:36 AM
тАО07-08-2005 11:36 AM
Re: howto check if logroate was running successfully ?
The main one, just 'crond', is a constantly run process which checks the time continually for tasks that need running.
The second one, called 'anacron' which is usually run peridodically from the main 'cron. The purpose of this second cron is to run periodic tasks on machines of which aren't on permenantly (i.e. a normal workstation). It checks if a anacron period has been hit whilst the machine was in a down state, and runs the jobs accordingly.
This cron process uses '/etc/anacrontab' as it's source of jobs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2005 10:20 PM
тАО07-09-2005 10:20 PM