Found asterisk log files growing big very fast and hard disk no more, how?

Posted on 2015-01-08
Last Modified: 2015-01-24
This is using Linux server. There are 40 GB hard disk space allocated for /. However, found that in /var/log/asterisk, the log file - messages, grows very fast; and within a week or 2, all disk space used up and consequencely, the application stops working. Is there a way to "rotate" the log file, let's say a new log file create if the log hits 500 mb or so?

Appreciate your help, thanks!
Question by:MichaelBalack
  • 2
LVL 11

Expert Comment

by:Tej Pratap Shukla ~Dexter
ID: 40539611
Yes, Linux offers a utility to handle the log files. It will automatically create the new log file if log hits to the threshold that you have set on it

/var/log/asterisk/cdr-csv/Master.csv /var/log/asterisk/debug /var/log/asterisk/event_log /var/log/asterisk/messages {
rotate 9
size 512000k
Refer the following link in case if you feeling any difficulty

Accepted Solution

MichaelBalack earned 0 total points
ID: 40539617
Hi Dexter,

Give me some times to read through...

Author Closing Comment

ID: 40567985
It works

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question