[opensuse] logrotate and crontab



Hi,

I've been having a look on how crontab is setup on default Suse 9.2/10.0/10.1 servers,
since i wanted to find out when logs are being rotated.

as far as i can see, the default crontab entries (in /etc/cron.daily,
etc/cron.hourly etc.) are being scheduled via the /etc/crontab master file:

-*/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 4 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 4 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 4 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly

but at what time does for example /etc/cron.daily/* get run ?

i assume it is the run-crons script that is responsible for this, but i can't see when
exactly all the different cron entries (daily for example) are being run.

it's important for me because i want to schedule sarg (squid statistics generator) at 2 pm and i want to be sure that i always run logrotate (to rotate squid logs) exactly might.

on redhat, the /etc/crontab is a lot clearer about this:

this is /etc/crontab on redhat:

# run-parts
01 * * * * root run-parts /etc/cron.hourly
59 23 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

How can do that in Suse (run-parts don't work on suse?!)

Thanks,


--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx



Relevant Pages

  • Re: [opensuse] logrotate and crontab
    ... I've been having a look on how crontab is setup on default Suse ... 9.2/10.0/10.1 servers, ... since i wanted to find out when logs are being rotated. ...
    (SuSE)
  • Re: [opensuse] logrotate and crontab
    ... I've been having a look on how crontab is setup on default Suse ... 9.2/10.0/10.1 servers, ... since i wanted to find out when logs are being rotated. ...
    (SuSE)
  • Re: linking a dir
    ... MM> Unless you're specifying it at boot, ... MM> Alternatively, if your logs are rotated by newsyslog, you could keep ... as the scripts rotate them automatically.. ... IMAPS server which has its bin, doc, and man dirs under /opt ...
    (freebsd-questions)
  • Re: Apache Rotate Logs and Log Rotate.
    ... Rotate logs makes a new log every ... The newsyslog software is part of FreeBSD's base system, ...
    (freebsd-questions)
  • Re: Squid Logs are not rotating
    ... Logs still do not rotate automatically, only if I issue the command ... Logrotate will not rotate logs from one device to another. ...
    (Ubuntu)