[asterisk-users] Asterisk 1.2.10 - Continually Restarting Logger

2006-07-28 Thread Kenny Millington
Hi,

We're seeing a problem on Asterisk 1.2.10 where when we get in in the
morning it's continually rotating the logs over and over again,
generating 100's of thousands of log rotated 0 byte files:-

/var/logs/asterisk # find . -type f -maxdepth 1 | wc -l
176930

/var/log/asterisk # find . -type f -maxdepth 1 -size 0 -exec mv {} nulls/ \;

/var/log/asterisk # find . -type f -maxdepth 1 | wc -l
69169

A segment of the relevant log is:-

Jul 25 06:33:42 VERBOSE[9638] logger.c: Asterisk Event Logger restarted
Jul 25 06:33:42 VERBOSE[9638] logger.c: Asterisk Queue Logger restarted
Jul 25 06:33:42 VERBOSE[9635] logger.c: -- Remote UNIX connection
disconnected
Jul 25 06:33:42 VERBOSE[18276] logger.c: -- Remote UNIX connection
Jul 25 06:33:42 VERBOSE[9641] logger.c: Asterisk Event Logger restarted
Jul 25 06:33:42 VERBOSE[9641] logger.c: Asterisk Queue Logger restarted
Jul 25 06:33:42 VERBOSE[9638] logger.c: -- Remote UNIX connection
disconnected
Jul 25 06:33:42 VERBOSE[18276] logger.c: -- Remote UNIX connection
Jul 25 06:33:42 VERBOSE[9644] logger.c: Asterisk Event Logger restarted
Jul 25 06:33:42 VERBOSE[9644] logger.c: Asterisk Queue Logger restarted
Jul 25 06:33:42 VERBOSE[18276] logger.c: -- Remote UNIX connection
Jul 25 06:33:42 VERBOSE[9641] logger.c: -- Remote UNIX connection
disconnected
Jul 25 06:33:42 VERBOSE[9647] logger.c: Asterisk Event Logger restarted
Jul 25 06:33:42 VERBOSE[9647] logger.c: Asterisk Queue Logger restarted

etc...

Has anyone else seen this or have any ideas what the problem may be?

Thanks,
-- 
Kenny Millington
Systems Developer
3aIT Limited

T: 0870 881 5097
F: 01403 248 105
E: [EMAIL PROTECTED]
W: http://www.3ait.co.uk
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.2.10 - Continually Restarting Logger

2006-07-28 Thread Kenny Millington
Filip DrÄ…gowski wrote:
> check your cron jobs.
> mayby there is asterisk -rx "logger rotate" executing too often ?

Nope - nothing in crontab.

>> Hi,
>>
>> We're seeing a problem on Asterisk 1.2.10 where when we get in in the
>> morning it's continually rotating the logs over and over again,
>> generating 100's of thousands of log rotated 0 byte files:-



-- 
Kenny Millington
Systems Developer
3aIT Limited

T: 0870 881 5097
F: 01403 248 105
E: [EMAIL PROTECTED]
W: http://www.3ait.co.uk
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.2.10 - Continually Restarting Logger

2006-07-28 Thread Kenny Millington
Filip DrÄ…gowski wrote:
> on one cosnole a do asterisk -r
> on other i do asterisk -rx "logger rotate"
> and the result is
> -- Remote UNIX connection
> Asterisk Event Logger restarted
> Asterisk Queue Logger restarted
> -- Remote UNIX connection disconnected
> how often new log files are created ? = how many log files are created
> in 1 second  ?

Very often, it slows down as the number of log files in the
/var/log/asterisk directory increases.

> there is some kind of regularity or it is done randomly (10logs/1s and
> another time 20logs/1s) ?

Seems to happen more often than not (the past three days) overnight.
We're assuming that it starts when asterisk does it's daily log rotate
itself and then gets itself into a spin...

-- 
Kenny Millington
Systems Developer
3aIT Limited

T: 0870 881 5097
F: 01403 248 105
E: [EMAIL PROTECTED]
W: http://www.3ait.co.uk
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Asterisk 1.2.10 - Continually Restarting Logger

2006-07-28 Thread Kenny Millington
Koen Van Impe wrote:
> I use logrotate too, because I didn't know of the functionality in Asterisk.
> Logrotate works fine for me though.

Ok, I believe I see the problem here!

I was told (apparently erroneously) that asterisk does rotation itself
because "they didn't rotate before and now they do".

I've just looked in the /etc/logrotate.d/ directory and there's an
asterisk file containing:-

# cat /etc/logrotate.d/asterisk
# system-specific logs may be configured here

/var/log/asterisk/* {
  daily
  postrotate
  /usr/sbin/asterisk -rx "logger rotate"
  endscript
}

Now... If I were to guess I'd guess that the * is matching the logs that
have already been rotated and rotating them, generating yet more files
to be matched by the * and hence rotated... Does that sound plausible?

At any rate, I'm going to specify the files without using a wildcard
match and see how that goes.

-- 
Kenny Millington
Systems Developer
3aIT Limited

T: 0870 881 5097
F: 01403 248 105
E: [EMAIL PROTECTED]
W: http://www.3ait.co.uk
___
--Bandwidth and Colocation provided by Easynews.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users