[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron.daily logrotate beating up my server



On Tue, Feb 25, 2014 at 02:31:43PM +0100, Raffaele Morelli wrote:
> 2014-02-25 13:53 GMT+01:00 Tazman Deville <tazmandevil@gmx.com
> <mailto:tazmandevil@gmx.com>>:
> 
> My /etc/crontab is as follows:
> 
> SHELL=/bin/sh
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
> 
> # m h dom mon dow user �command
> 17 * � �* * * � root � �cd / && run-parts --report /etc/cron.hourly
> 15 4 � �* * * � root � �test -x /usr/sbin/anacron || ( cd / && run-parts
> --report /etc/cron.daily )
> 07 3 � �* * 7 � root � �test -x /usr/sbin/anacron || ( cd / && run-parts
> --report /etc/cron.weekly )
> 52 1 � �1 * * � root � �test -x /usr/sbin/anacron || ( cd / && run-parts
> --report /etc/cron.monthly )
> 
> I DO have anacron installed.
> I do not know what is relevant from syslog.
> I find no mention of cron, crontab, or logrotate in /var/log/syslog
> at all.
> 
> That's quite weird, indeed you should have something like that
> 
> /USR/SBIN/CRON[32528]: (root) CMD ( � cd / && run-parts --report
> /etc/cron.hourly)
> 
> /USR/SBIN/CRON[32528]: (root) CMD ( � cd / && run-parts --report
> /etc/cron.daily)
> 
> etc etc...
> 
> BTW Your crontab is correct
> 
> run
> 
> # run-parts --report /etc/cron.daily
This gives a lot of output.
I did see an error for the existence of two scripts in /etc/logrotate.d
for things I'd removed (popcon, and a friendica installation),
so I removed those.
I had had a problem with popcon logs a while back, where they were
filling up the hdd (at least, used up 100% of my inodes), so had removed
popcon.

> 
> then
> 
> # grep -i cron /var/log/syslog

I did this earlier (actually, I did less /var/log/syslog
then searched with /cron), and found nothing.
Honest, I swear!
Now, I just dug into the older ones, just from this past week,
and found stuff like
Feb 19 19:40:01 tonybaldwin /USR/SBIN/CRON[11248]: (www-data) CMD ([ -x
/usr/share/awstats/tools/update.sh ] &&
/usr/share/awstats/tools/update.sh)
Feb 19 19:50:01 tonybaldwin /USR/SBIN/CRON[12029]: (www-data) CMD ([ -x
/usr/share/awstats/tools/update.sh ] &&
/usr/share/awstats/tools/update.sh)
Feb 19 20:00:01 tonybaldwin /USR/SBIN/CRON[12832]: (root) CMD
(/usr/local/bin/mywebstat.sh)
Feb 19 20:00:01 tonybaldwin /USR/SBIN/CRON[12835]: (www-data) CMD ([ -x
/usr/share/awstats/tools/update.sh ] &&
/usr/share/awstats/tools/update.sh)
Feb 19 20:00:01 tonybaldwin /USR/SBIN/CRON[12836]: (www-data) CMD (if [
-f /usr/share/pnopaste/bin/expired_delete.pl ]; then /usr/bin/perl
/usr/share/pnopaste/bin/expired_delete.pl > /dev/null; fi)


But I'm using neither awstats nor pnopaste, nor have I for some time.
I just purged the box of anything related to either.

It seems this may help with the excessive abuse of CPU cycles,
but I'm still at a loss for why logrotate is running after 7 am,
when my crontab is set to run the cron.daily stuff at 4:15am.

./tony
-- 
http://www.tonybaldwin.me
art, music, software by me, tony
3F330C6E

Attachment: signature.asc
Description: Digital signature


Reply to: