Re: [Asterisk-Users] Syslog file size

2005-09-12 Thread Tzafrir Cohen
On Mon, Sep 12, 2005 at 01:00:45PM +1000, YT Lim wrote:
 Does anyone know how to limit syslog file size?
 Logrotate only rotates log files (i.e. irrelevant of
 file size), and a log file size can grow extremely
 large before it is rotated.

Logrotate is invoked (by default) as a daily cron job and then decides if 
it should rotate/delete logs . Usually it only rotates by dates, but it 
can also rotate by log file size.

Still, it won't monitor the log files constantly and rotate as soon as
the logs reach a certain size, if that is what you need.

Weekly rotation is usually good enough. Daily rotation won't save you
enough time behind. Try to make your programs less verbose.

-- 
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il |   | a Mutt's  
[EMAIL PROTECTED] |   |  best
ICQ# 16849755 |   | friend
___
--Bandwidth and Colocation sponsored by Easynews.com --

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


Re: [Asterisk-Users] Syslog file size

2005-09-12 Thread Paul

Tzafrir Cohen wrote:


On Mon, Sep 12, 2005 at 01:00:45PM +1000, YT Lim wrote:
 


Does anyone know how to limit syslog file size?
Logrotate only rotates log files (i.e. irrelevant of
file size), and a log file size can grow extremely
large before it is rotated.
   



Logrotate is invoked (by default) as a daily cron job and then decides if 
it should rotate/delete logs . Usually it only rotates by dates, but it 
can also rotate by log file size.


Still, it won't monitor the log files constantly and rotate as soon as
the logs reach a certain size, if that is what you need.

Weekly rotation is usually good enough. Daily rotation won't save you
enough time behind. Try to make your programs less verbose.

 

You can have a cron job do /usr/sbin/logrotate someconfigfile as often 
as you want. Just make sure someconfigfile has reasonable parameters for 
things like size so it won't be doing rotation and compression unless 
needed. To get an idea of resources used when no rotation is needed just 
do something like time /usr/bin/logrotate someconfigfile when the size 
argument is met and then do it again right away. Here is what I get when 
the asterisk logs don't need to be rotated:


real0m0.002s
user0m0.001s
sys 0m0.001s

___
--Bandwidth and Colocation sponsored by Easynews.com --

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


[Asterisk-Users] Syslog file size

2005-09-11 Thread YT Lim
Does anyone know how to limit syslog file size?
Logrotate only rotates log files (i.e. irrelevant of
file size), and a log file size can grow extremely
large before it is rotated.

/Y.T.






 
Do you Yahoo!? 
The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full 
Actor Database. 
http://au.movies.yahoo.com
___
--Bandwidth and Colocation sponsored by Easynews.com --

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


RE: [Asterisk-Users] Syslog file size

2005-09-11 Thread Brad Hughes
Not possible to do natively

Write a script yourself to monior it's size and invoke logrotate to
rotate it when that size is reached. And cron your script however often
you want (ie 10 times a day?)




-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of YT Lim
Sent: Monday, 12 September 2005 1:01 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: [Asterisk-Users] Syslog file size


Does anyone know how to limit syslog file size?
Logrotate only rotates log files (i.e. irrelevant of
file size), and a log file size can grow extremely
large before it is rotated.

/Y.T.






 
Do you Yahoo!? 
The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos
and full Actor Database. 
http://au.movies.yahoo.com
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
___
--Bandwidth and Colocation sponsored by Easynews.com --

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


RE: [Asterisk-Users] Syslog file size

2005-09-11 Thread YT Lim
Thanks. I'm afraid that's the case. But I remember
reading somewhere that some syslog variants of syslogd
actually have the file size limit build-in.


--- Brad Hughes [EMAIL PROTECTED] wrote:

 Not possible to do natively
 
 Write a script yourself to monior it's size and
 invoke logrotate to
 rotate it when that size is reached. And cron your
 script however often
 you want (ie 10 times a day?)
 
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On
 Behalf Of YT Lim
 Sent: Monday, 12 September 2005 1:01 PM
 To: Asterisk Users Mailing List - Non-Commercial
 Discussion
 Subject: [Asterisk-Users] Syslog file size
 
 
 Does anyone know how to limit syslog file size?
 Logrotate only rotates log files (i.e. irrelevant of
 file size), and a log file size can grow extremely
 large before it is rotated.
 
 /Y.T.
 
 
   
 
   
   
 
 
 Do you Yahoo!? 
 The New Yahoo! Movies: Check out the Latest
 Trailers, Premiere Photos
 and full Actor Database. 
 http://au.movies.yahoo.com
 ___
 --Bandwidth and Colocation sponsored by Easynews.com
 --
 
 Asterisk-Users mailing list
 Asterisk-Users@lists.digium.com

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

http://lists.digium.com/mailman/listinfo/asterisk-users
 ___
 --Bandwidth and Colocation sponsored by Easynews.com
 --
 
 Asterisk-Users mailing list
 Asterisk-Users@lists.digium.com

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

http://lists.digium.com/mailman/listinfo/asterisk-users
 







 
Do you Yahoo!? 
The New Yahoo! Movies: Check out the Latest Trailers, Premiere Photos and full 
Actor Database. 
http://au.movies.yahoo.com
___
--Bandwidth and Colocation sponsored by Easynews.com --

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


Re: [Asterisk-Users] Syslog file size

2005-09-11 Thread Samy Antoun
Hi,

This page
http://linuxcommand.org/man_pages/logrotate8.html

has a sample config file with a file size option






__ 
Yahoo! for Good 
Watch the Hurricane Katrina Shelter From The Storm concert 
http://advision.webevents.yahoo.com/shelter 

___
--Bandwidth and Colocation sponsored by Easynews.com --

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