Tag

cleanup disk asterCC server

How to cleanup disk for asterCC server

By | Tutorials | No Comments

Note:  After you login to the server and execute the “df” command, you can check the current server file system disk space usage. You can use the command to get the hard disk is occupied by how much space, there is still have how much space and other information. Execute “du -sh” to view the total size of all files in the current directory.

1、AsterCC log

1.1、Script log

The fastest and easiest, check the log files are located in the /opt/asterisk/scripts/astercc/ directory, ending in “.log” and “.gz”. If very large can be empty them.
Under the path /opt/asterisk/scripts/astercc you can execute, empty them as follows:
> astcc_sysevents.log
rm astcc_sysevents.log.gz

Tips : If the emptied log has been released enough space, the following can be omitted. But if you want to cleanup more files look down.

1.2、System log

Completely closed asterCC system log,  need to modify /etc/astercc.conf file, set debug = 0 and save the file, execute command “service asterccd restart” to take effect. The command needs to be done when nobody is using the system.

1.3、System file

1.3.1、It is usually advisable to migrate the “data” and “statistics” directories in the /var/www/ html/asterCC/ to a directory with large disk space, and then back to execute command “ln -s” connect it.

1.3.2、In /var/www/html/asterCC/data directory, will store some downloaded audio files, such as: monitor_download directory, This is the path for download pbxcdr recording.

1.3.3、In /var/www/html/asterCC/statistics directory,store some Statistical data files.

1.3.4、PBX recording files stored in /var/spool/asterisk/ monitor directory, if useless then you can delete it. Whether monitor directory is moved to a larger disk space directory, and then execute command “ln-s” to connect it.

1.3.5、Agents evevts log is in directory /tmp/astcceventslog/ stored like name astercc eventsfile_date.log files, make sure agents events have no error, you can delete it.

2、Asterisk log

In directory /var/log/asterisk/,have files “full ” and “messages”, it is asterisk’s log file. Cleanup execute command “> full “, “> messages” , don’t need execute “stop” or “restart” command . If need close asterisk log,need modify /etc/asterisk/logger.conf file, to the end of the file the lines “full” and “messages” before add the “;”,save and exit file execute command asterisk -rx “logger reload” will be ready.

3、MySQL log

3.1、Move the database file location

In /var/lib/mysql directory,astercc10 is the asterCC’s database,when nobody is using the system,you can move it to other large space,afetr you can execute command  “ln -s ” to connect it.

3.2、mysql log

The mysql log file is /var/log/mysqld.log ,you can cleanup execute command “>/var/log/mysqld.log”.

4、Http log

http’s access log is file /var/www/html/asterCC/http-log/access.log , you can cleanup execute command “>/var/www/html/asterCC/http-log/access.log “.

5、PHP log

In /var/log/php-fpm directory,stored php’s log file “error.log ” and “www-error.log”.

6、Other logs

In /var/log/ directory,maillog、messages、cron、secure、yum、vmstart and other log files,the logs execute command “> file.log” to empty.