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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

910 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now