I’m in a bit of a bind. A few days ago things started going crazy on our phones, and we realized it was because we had forgotten to take some of the call recordings off of the server. We removed them, but space just keeps getting filled up. I’ve figured out that it is because of our asterisk logfiles.
How can I delete these safely, and keep them from getting to these huge sizes. like 9G in a day?
We are not currently able to use our system because of this. Thankfully it is happening over the weekend and we were able to forward our calls from a sip provider, but the weekend is coming to a close and this needs to be solved today.
This is the output of /var/log/asterisk $ du -sh *
You can delete old logs safely, current logs can be truncated with cat /dev/null > name_of_file
What should be analyzed is why your log is reaching 9gb in only one day. Maybe it is normal according to the load and activity of your asterisk installation, but maybe it is an indication of possible issues, if your logs are filled with warning messages.
I meant that current log file can be truncated if you don’t want to stop the process writing on it. For example, file “full” is current asterisk log file. To delete it and actually free the space, asterisk must not be running, so you either stop asterisk and delete the file, or you truncate it without the need to stop asterisk.
This is the output. Some I left out the last part, because it was setting some passwords as variables. But It looks like this is the section that contains the secret. I just don’t know how to read it.
== Parsing ‘/etc/asterisk/extconfig.conf’: Found
== Parsing ‘/etc/asterisk/logger.conf’: Found
== Parsing ‘/etc/asterisk/logger_general_additional.conf’: Found
== Parsing ‘/etc/asterisk/logger_general_custom.conf’: Found
== Parsing ‘/etc/asterisk/logger_logfiles_additional.conf’: Found
== Parsing ‘/etc/asterisk/logger_logfiles_custom.conf’: Found
== Parsing ‘/etc/asterisk/asterisk.conf’: Found
== Manager registered action DBGet
== Manager registered action DBPut
== Manager registered action DBDel
== Manager registered action DBDelTree
== Registered custom function ‘MESSAGE’
== Registered custom function ‘MESSAGE_DATA’
== Registered application ‘MessageSend’
== Manager registered action MessageSend
== Manager registered action DataGet
== Parsing ‘/etc/asterisk/codecs.conf’: Found
Asterisk Dynamic Loader Starting:
== Parsing ‘/etc/asterisk/modules.conf’: Found
[2017-12-03 16:20:03] NOTICE[9586]: loader.c:1190 load_modules: 7 modules will b e loaded.
[2017-12-03 16:20:03] WARNING[9586]: loader.c:423 load_dynamic_module: Error loa ding module ‘res_mwi_blf.so’: /usr/lib/asterisk/modules/res_mwi_blf.so: cannot o pen shared object file: No such file or directory
== Parsing ‘/etc/asterisk/res_odbc.conf’: Found
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf1 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf2 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf3 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf4 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf5 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf6 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf7 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf8 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf9 if saved back to disk.
== Parsing ‘/etc/asterisk/res_odbc_custom.conf’: Found
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 24: Same File included more than once! This data will be saved in res_odbc_custom.conf10 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_custom.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf1 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf2 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf3 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf4 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf5 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf6 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf7 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc_custom.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf8 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: config.c:341 ast_include_new: ‘/etc/asteris k/res_odbc.conf’, line 25: Same File included more than once! This data will be saved in res_odbc_additional.conf~~9 if saved back to disk.
[2017-12-03 16:20:03] WARNING[9586]: config.c:2481 ast_config_internal_load: Max imum Include level (10) exceeded
[2017-12-03 16:20:03] ERROR[9586]: config.c:1414 process_text_line: The file ‘re s_odbc_additional.conf’ was listed as a #include but it does not exist.
[2017-12-03 16:20:03] WARNING[9586]: res_odbc.c:785 load_odbc_config: Unable to load config file res_odbc.conf
[2017-12-03 16:20:03] WARNING[9586]: loader.c:423 load_dynamic_module: Error loa ding module ‘res_mwi_blf.so’: /usr/lib/asterisk/modules/res_mwi_blf.so: cannot o pen shared object file: No such file or directory
[2017-12-03 16:20:03] WARNING[9586]: loader.c:902 load_resource: Module ‘res_mwi _blf.so’ could not be loaded.
[2017-12-03 16:20:03] NOTICE[9586]: config.c:2355 ast_config_engine_register: Re gistered Config Engine odbc
Full is increasing like crazy. Probably about a mb a second. How can I fix this? I can’t figure out anything from looking at the logs. I really don’t have the expertise to find the solution on my own. I’m willing to pay for technical support. Who would you suggest?