Re: cron.daily logrotate beating up my server

2014-02-27 Thread Tazman Deville
On Wed, Feb 26, 2014 at 06:43:36AM -0500, Tony Baldwin wrote:
 On Wed, Feb 26, 2014 at 06:41:22AM -0500, Tony Baldwin wrote:
  On Wed, Feb 26, 2014 at 12:09:05PM +0200, Andrei POPESCU wrote:
   On Ma, 25 feb 14, 13:53:39, Tazman Deville wrote:

I DO have anacron installed.
   
   Well, purge (not remove) it then, or adjust /etc/anacrontab as needed ;)
   
   Kind regards,
   Andrei
  
  Thanks, Andrei,
  But could you explain why I want to purge anacron, please?
  
 
 Actually, you know what?
 The server does NOT have anacron installed.
 I must have searched for it in the wrong terminal.
 It IS installed on this desktop, but not on that server.
 Doh...

My server had anacron, which I purged, and this issue now appears
to be resolved.

Thanks!

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140227110602.ga27...@myownsite.me



Re: cron.daily logrotate beating up my server

2014-02-26 Thread Andrei POPESCU
On Ma, 25 feb 14, 13:53:39, Tazman Deville wrote:
 
 I DO have anacron installed.

Well, purge (not remove) it then, or adjust /etc/anacrontab as needed ;)

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-26 Thread Tony Baldwin
On Wed, Feb 26, 2014 at 12:09:05PM +0200, Andrei POPESCU wrote:
 On Ma, 25 feb 14, 13:53:39, Tazman Deville wrote:
  
  I DO have anacron installed.
 
 Well, purge (not remove) it then, or adjust /etc/anacrontab as needed ;)
 
 Kind regards,
 Andrei

Thanks, Andrei,
But could you explain why I want to purge anacron, please?

Tony
-- 
https://tonybaldwin.info
art, music, software by me, tony
3F330C6E


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-26 Thread Tony Baldwin
On Wed, Feb 26, 2014 at 06:41:22AM -0500, Tony Baldwin wrote:
 On Wed, Feb 26, 2014 at 12:09:05PM +0200, Andrei POPESCU wrote:
  On Ma, 25 feb 14, 13:53:39, Tazman Deville wrote:
   
   I DO have anacron installed.
  
  Well, purge (not remove) it then, or adjust /etc/anacrontab as needed ;)
  
  Kind regards,
  Andrei
 
 Thanks, Andrei,
 But could you explain why I want to purge anacron, please?
 

Actually, you know what?
The server does NOT have anacron installed.
I must have searched for it in the wrong terminal.
It IS installed on this desktop, but not on that server.
Doh...

Tony
-- 
https://tonybaldwin.info
all tony, all day long...


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-26 Thread Raffaele Morelli
2014-02-26 12:43 GMT+01:00 Tony Baldwin t...@tonybaldwin.info:

 On Wed, Feb 26, 2014 at 06:41:22AM -0500, Tony Baldwin wrote:
  On Wed, Feb 26, 2014 at 12:09:05PM +0200, Andrei POPESCU wrote:
   On Ma, 25 feb 14, 13:53:39, Tazman Deville wrote:
   
I DO have anacron installed.
  
   Well, purge (not remove) it then, or adjust /etc/anacrontab as needed
 ;)
  
   Kind regards,
   Andrei
 
  Thanks, Andrei,
  But could you explain why I want to purge anacron, please?
 

 Actually, you know what?
 The server does NOT have anacron installed.
 I must have searched for it in the wrong terminal.
 It IS installed on this desktop, but not on that server.
 Doh...


The output of...

ps ax| grep cron
dpkg -l cron*


Re: cron.daily logrotate beating up my server

2014-02-26 Thread Andrei POPESCU
On Mi, 26 feb 14, 06:41:22, Tony Baldwin wrote:
 On Wed, Feb 26, 2014 at 12:09:05PM +0200, Andrei POPESCU wrote:
  On Ma, 25 feb 14, 13:53:39, Tazman Deville wrote:
   
   I DO have anacron installed.
  
  Well, purge (not remove) it then, or adjust /etc/anacrontab as needed ;)
 
 Thanks, Andrei,
 But could you explain why I want to purge anacron, please?

You are not the OP, so I have no idea why *you* would want/need to purge 
anacron :p but I'll explain anyway (using my /etc/crontab as example):

# m h dom mon dow user  command
17 ** * *   rootcd /  run-parts --report /etc/cron.hourly
25 6* * *   roottest -x /usr/sbin/anacron || ( cd /  run-parts 
--report /etc/cron.daily )
47 6* * 7   roottest -x /usr/sbin/anacron || ( cd /  run-parts 
--report /etc/cron.weekly )
52 61 * *   roottest -x /usr/sbin/anacron || ( cd /  run-parts 
--report /etc/cron.monthly )
#
   ^^

The 'test ... ||' part makes sure that if you have the /usr/sbin/anacron 
binary on your system the other part will *not* be executed at all. If 
you do however need anacron, but want to adjust the time where the 
equivalent task is run you will have to adjust /etc/anacrontab instead 
as I've written above (because anacron will be running it). In my case 
it's:

# These replace cron's entries
1   5   cron.daily  run-parts --report /etc/cron.daily
7   10  cron.weekly run-parts --report /etc/cron.weekly
@monthly15  cron.monthlyrun-parts --report /etc/cron.monthly

According to anacrontab(5) the first number represents a period (in 
days) and the second a delay (in minutes). At first sight there doesn't 
appear to be an easy way to control the exact time where a job is run, 
so I'd say it's easier to just remove anacron and work only with cron ;)

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-25 Thread Tazman Deville
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 ** * *   rootcd /  run-parts --report /etc/cron.hourly
15 4* * *   roottest -x /usr/sbin/anacron || ( cd /  run-parts
--report /etc/cron.daily )
07 3* * 7   roottest -x /usr/sbin/anacron || ( cd /  run-parts
--report /etc/cron.weekly )
52 11 * *   roottest -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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140225125339.ga13...@myownsite.me



Re: cron.daily logrotate beating up my server

2014-02-25 Thread Tazman Deville
On Mon, Feb 24, 2014 at 07:38:24PM -0300, André Nunes Batista wrote:
 On Mon, 2014-02-24 at 13:57 +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
 
 If you do not want this process to take precedence, why did you choose
 such a low niceness to other processes? Shouldn't you have chosen
 something above 10 or at least above 0?

Perhaps I misunderstand, but from reading man nice,
my understanding is that -20 is the hightest priority,
and 19 is the lowest, so I assume 15 was low priority.
I've tried to renice the process in htop now that it's running again,
and that doesn't seem to be working.

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20140225125513.gb13...@myownsite.me



Re: cron.daily logrotate beating up my server

2014-02-25 Thread Darac Marjal
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.

Logrotate *itself* shouldn't use much CPU. But there are a couple of
things I can think that might make it do so:
 * A badly-behaved {pre,post}rotate script. These would, I suspect, show
   up as separate processes, though.
 * Compression of a large and/or corrupt log file.

In both cases, check through your logrotate config files and try running
logrotate yourself (probably with --debug).

 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.

A couple more points. Is logrotate running at 7:30 simply because it's
STILL running then?

Also note that nicing a process won't, by itself, make the process use
less that 100% CPU. It'll just make other processes more favoured. If
the rest of the system is idle, then a nice process can easily use 100%.

 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?
 
 Taz
 --
 http://tazmandevil.info
 taz hungry
 
 
 -- 
 To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
 with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
 Archive: http://lists.debian.org/20140224125702.ga16...@myownsite.me
 


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-25 Thread Tony Baldwin
On Tue, Feb 25, 2014 at 01:10:38PM +, Darac Marjal 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.
 
 Logrotate *itself* shouldn't use much CPU. But there are a couple of
 things I can think that might make it do so:
  * A badly-behaved {pre,post}rotate script. These would, I suspect, show
up as separate processes, though.

How would one diagnose this? I'm having a similar problem,
but I haven't altered post/pre scripts, only the /etc/logrotate.d/
scripts for specific logs.

  * Compression of a large and/or corrupt log file.

This shouldn't happen on a regular basis, though, should it?
Unless something is routinely writing huge and/or corrupt logs,
but if they're rotated daily, I can't imagine them getting huges,
so we'd have to assume that maybe something is writing corrupt logs?
How would I diagnose that?

 
 A couple more points. Is logrotate running at 7:30 simply because it's
 STILL running then?

Not, it seems to be starting around that time.
Runs for about 30 to 60 minutes on any given day.

./tony
-- 
https://tonybaldwin.info
all tony, all day long...


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-25 Thread Raffaele Morelli
2014-02-25 13:53 GMT+01:00 Tazman Deville tazmande...@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 ** * *   rootcd /  run-parts --report /etc/cron.hourly
 15 4* * *   roottest -x /usr/sbin/anacron || ( cd /  run-parts
 --report /etc/cron.daily )
 07 3* * 7   roottest -x /usr/sbin/anacron || ( cd /  run-parts
 --report /etc/cron.weekly )
 52 11 * *   roottest -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

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


/r


Re: cron.daily logrotate beating up my server

2014-02-25 Thread Tony Baldwin
On Tue, Feb 25, 2014 at 02:31:43PM +0100, Raffaele Morelli wrote:
 2014-02-25 13:53 GMT+01:00 Tazman Deville tazmande...@gmx.com
 mailto:tazmande...@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


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-24 Thread Tazman Deville
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.

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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140224140648.ga18...@myownsite.me



Re: cron.daily logrotate beating up my server

2014-02-24 Thread Andrei POPESCU
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.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser
Offtopic discussions among Debian users and developers:
http://lists.alioth.debian.org/mailman/listinfo/d-community-offtopic
http://nuvreauspam.ro/gpg-transition.txt


signature.asc
Description: Digital signature


Re: cron.daily logrotate beating up my server

2014-02-24 Thread André Nunes Batista
On Mon, 2014-02-24 at 13:57 +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

If you do not want this process to take precedence, why did you choose
such a low niceness to other processes? Shouldn't you have chosen
something above 10 or at least above 0?

-- 
André N. Batista
GNUPG/PGP KEY: 6722CF80



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1393281504.28660.36.camel@tagesuhu-pc