• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 200
  • Last Modified:

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

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!
0
MichaelBalack
Asked:
MichaelBalack
  • 2
1 Solution
 
Tej Pratap Shukla ~DexterCommented:
hi..
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 {
weekly
missingok
rotate 9
size 512000k
copytruncate
endscript
}
Refer the following link in case if you feeling any difficulty
http://www.voip-info.org/wiki/view/logrotate
0
 
MichaelBalackAuthor Commented:
Hi Dexter,

Give me some times to read through...
0
 
MichaelBalackAuthor Commented:
It works
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now