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

Re: cron.daily logrotate beating up my server



On Mon, Feb 24, 2014 at 11:15:19PM +0200, Andrei POPESCU wrote:
> On Lu, 24 feb 14, 15:06:48, Tazman Deville wrote:
> > On Mon, Feb 24, 2014 at 01:57:02PM +0100, Tazman Deville wrote:
> > > I have a little server running here in my office,
> > > and logrotate kept running at c. 7am, and using up 100% CPU.
> > > I changed the line in /etc/crontab to run cron.daily scripts
> > > at 4:15am, instead of 7:whateveritwas am.
> > > 15 4 * * *
> > > Also, in cron.daily/logrotate
> > > I added 
> > > nice -n 15
> > > I made these changes two days ago,
> > > and still, yesterday and today, logrotate is running at 7:30ami-ish,
> > > and using up almost 100% of CPU cycles.
> > > The "server" is an old refurbed eMachines box,
> > > 3.2ghz single core celeron with 2gb ram (was my work box from 2007 to
> > > 2011), and logrotate is beating it up.
> > > 
> > > How do I get logrotate, first,
> > > to run at a time when the server is not busy with other stuff 
> > > (I'm actively doing stuff on the server at 7am, but not at 4am, which is
> > > why I had made that change).
> > > and/or
> > > limit its abuse of CPU cycles?
> > > 
> > > Why is it seemingly not honouring the changes I made to /etc/crontab
> > > and cron.daily/logrotate?
> > 
> > Off-list someone suggested I restart the cron daemon, which I have done.
> > I won't know if that helped until tomorrow morning, though.
> 
> According to the manpage it is not necessary to restart the daemon, so 
> this should not fix your problem. How about you attach your crontab and 
> the relevant parts from syslog? Also check if you have anacron 
> installed.
> 

First, as Andrei surmised, restarting cron has made no difference.
It's still starting late.

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.

Taz
-- 
http://tazmandevil.info
taz hungry


Reply to: