4 Knowledge Base

 

 TelecomTrainning.net > Knowledge Base
 Viewing KB Article
Good Evening, - Please register or - log-in to your account.
Search
Search   Saved Questions   Ask a question
Keywords 
 
Available categories
LTE
100 of Questions in LTE
CCNA Certification
CCNA Sample Q & A (1000 + Q &A)
(Network +) Certification
(Network +) Sample Q & A (1000 + Q &A)
Networking
General/Interview Q& A on Networking
Home Networking
General/Interview Q& A on Networking
VOIP, SIP & Asterisk
Q & A on VOIP,Ethereal, SIP & Asterisk
Telecom Test Equipments
Q & A on Telecom Test Equipment
PSTN / Wireline
General / Interview Q & A on PSTN / Wireline
LTE, Wireless, 3G ,Diameter and HSS
General/Interview Q & A on LTE, Wireless, 3G ,Diameter and HSS
Telecom General
Any Q & A in Telecom in General

Top Questions
Friends, Describe Secure storage and distribution of A-Keys?
what is the difference between E1 signal & Ethernet signal ?
How do I monitor SS7 Traffic in spectra2?
Can you tell me about PBGT?
Explain me the difference between a repeater, bridge and router? Relate this to the OSI model.
What is the difference between BRI & PRI ?
Guys what is the purpose of Umbrella Cell Approach in GSM ?
how can we explain media gateway in MSc?
What is GGSN?
What is the difference between Electrical-tilt and Mechanical-tilt of an antenna?
What is BSC?
What is demarc point?
Can any one explain me how sms flow will work using ss7 network ?( from physical layer to application layer)
why cellphone towers are painted in red and white?
Explain SLTA and SLTM messages in MTP3?
Hi guys what is WAP?
wat is the difference betweem MSC & GMSC, & MSS & GCS?
what is EDAp? what is the functions of EDAP?
What is a circuit id?
what is sdh?

Guys explain the logs and how to manage the logs in Asterisk?
adalson007 28-August-2008 04:06:57 PM

Comments


Asterisk activity generates events that will cause the creation of an entry in either the main system logs, or in Asterisk's own logfiles. On a busy system (or a system that is experiencing a severe problem), these logfiles can grow very large, very quickly. If debugging is turned on, the processes involved in writing to these logfiles can begin to have an effect on system performance. By default, Asterisk will simply add to the files until the hard drive is full. Fortunately, Linux provides utilities to handle the rotation of logfiles (so that no single file becomes too large), and also the deletion of older logfiles (which will prevent the system from getting clogged with logfiles).

The logrotate utility is normally run once per day by the operating system. Unfortunately, since there is no script installed to instruct logrotate on how to handle Asterisk, its logfiles will grow unchecked until a rotate script is added to handle them. In order to make that happen, we need to set up parameters for Asterisk in a file in the /etc/logrotate.d directory. This file will need to rotate the current logfile, and then send Asterisk instructions to rotate its own logger (causing it to stop using the now old logfile, and generate a new file.

Posted by adalson007


Managing Logs
Asterisk activity generates events that will cause the creation of an entry in either the
main system logs, or in Asterisk’s own logfiles. On a busy system (or a system that is
experiencing a severe problem), these logfiles can grow very large, very quickly. If de-
bugging is turned on, the processes involved in writing to these logfiles can begin to
have an effect on system performance. By default, Asterisk will simply add to the files
until the hard drive is full. Fortunately, Linux provides utilities to handle the rotation
of logfiles (so that no single file becomes too large), and also the deletion of older logfiles
(which will prevent the system from getting clogged with logfiles).
The logrotate utility is normally run once per day by the operating system. Unfortu-
nately, since there is no script installed to instruct logrotate on how to handle Asterisk,
its logfiles will grow unchecked until a rotate script is added to handle them. In order
to make that happen, we need to set up parameters for Asterisk in a file in the /etc/
logrotate.d directory. This file will need to rotate the current logfile, and then send
Asterisk instructions to rotate its own logger (causing it to stop using the now old logfile,
and generate a new file).
Create a new file /etc/logrotate.d/asterisk and place the following lines in it:
/var/log/asterisk/* /var/log/asterisk/cdr-csv {
missingok
sharedscripts
monthly
rotate 12
postrotate
asterisk -rx "logger rotate" > /dev/null 2> /dev/null
endscript
}
This file tells the logrotate utility to rotate the Asterisk logs every month, save 12 months
worth of logs, and then tell Asterisk that the logfiles have been rotated (which will cause
Asterisk to create new logfiles and begin writing to them). We selected these values
arbitrarily. Feel free to adjust them to suit your needs
Posted by sagitraz

Q&A Rating

Q&A Rating
Rate This Question and Answer

Related Questions
hi.can a person doing telecom engg should do CCNA???wat iz advantage/disadvantage???
I need help; what is the command syntax to set a gateway of last resort in your Cisco router?
Friends I have a doubt that, what command sets encapsulation type to PPP?
 


Search questions via popularity
Top viewed questions  Top emailed questions  Most printed questions  Most saved questions
 
Copyright © Telecom Training, All Rights Reserved