Page 1 of 1

Manage Hard Drive Space

PostPosted: Thu Oct 13, 2011 8:33 pm
by dj mondo
If i wanted to maintain hard drive space, what files or folders, would i need to look at, that would be the biggest files. Logs, recordings, which ones would be the ones i would like to maintain and make sure the drive space is maintainable?

Thank you
Armando

PostPosted: Fri Oct 14, 2011 12:34 pm
by mflorell
/var/log/astguiclient/
/var/log/asterisk/
/var/spool/asterisk/monitorDONE/

PostPosted: Tue Oct 18, 2011 4:39 am
by boybawang
you can delete the /var/spool/asterisk/monitorDONE/ORIG/* folder contents since they take much of your diskspace because they are raw and unprocessed audio WAV files

you also have to check out /var/log/apache2 or /var/log/httpd the files grow when un noticed

you can check disk space in mb by doing the following :


df -m


to check disk usage:

du -m /var/

shows the sizes on each folder under /var/

Re: Manage Hard Drive Space

PostPosted: Thu Jan 09, 2020 11:21 am
by ramizuabhalim
Hi,

Once I'm monitor the Vicidial.. Probably the hard disk quite fast going full because of the database which is /var/lib/mqsl/asterisk.. how to maintain from the hdd full without any impact the reporting or else.

Re: Manage Hard Drive Space

PostPosted: Fri Jan 10, 2020 3:31 pm
by covarrubiasgg
what hard drives are you using, the database should not be a problem to maintain unless you are using ridiculously low capacity drives.

Re: Manage Hard Drive Space

PostPosted: Fri Jan 10, 2020 3:59 pm
by williamconley
There are many log tables, some of which serve no purpose. There is a log archiving routine in crontab that is commented out. For Necessary log data it can archive (instead of delete) which doesn't save any room ... but: There are options for that script which can empty many of the unused tables. For instance, carrier logging is not used in any reports and is really only needed under very special circumstances. Carrier logs can be HUGE.

Re: Manage Hard Drive Space

PostPosted: Fri Jan 10, 2020 5:08 pm
by mflorell
I can't think of any log tables that serve no purpose at all, although there are several that are really only there to help with debugging.

As for managing them, we have added several 'trim' options to the "ADMIN_archive_log_tables.pl" script that we have set up for several clients that will wipe out old logs in some of the larger log tables.

Code: Select all
# /usr/share/astguiclient/ADMIN_archive_log_tables.pl --help
allowed run time options:
  [--daily] = only archives call_log, vicidial_log_extended, vicidial_dial_log and vicidial_drop_log tables, only last 24 hours kept
  [--carrier-daily] = will also archive the vicidial_carrier_log table when --daily is run
  [--vlog-daily] = will also archive the vicidial_log table when --daily is run
  [--days=XX] = number of days to archive past, default is 732(2 years)
  [--months=XX] = number of months to archive past, default is 24(2 years) If 'days' used then 'months' ignored
  [--queue-log] = archive QM queue_log records
  [--only-trim-archive-level-one] = will not perform normal archive process, instead this will only delete records
                                    that are older than XX months from least important log archive tables:
                               call_log_archive, vicidial_log_extended_archive, vicidial_dial_log_archive, vicidial_drop_log
  [--only-trim-archive-level-two] = same as --only-trim-archive-level-one, except includes tables:
                               vicidial_carrier_log_archive, vicidial_api_log_archive, vicidial_rt_monitor_log_archive
  [--only-trim-archive-level-three] = same as --only-trim-archive-level-two, except includes tables:
                               vicidial_log_archive, vicidial_agent_log_archive, vicidial_closer_log_archive, vicidial_xfer_log_archive
  [--recording-log-days=XX] = OPTIONAL, number of days to archive recording_log table only past
  [--did-log-days=XX] = OPTIONAL, number of days to archive vicidial_did_log table only past
  [--cpd-log-purge-days=XX] = OPTIONAL, number of days to purge vicidial_cpd_log table only past
  [--wipe-closer-log] = OPTIONAL, deletes all records from vicidial_closer_log after archiving
  [--wipe-all-being-archived] = OPTIONAL, deletes all records from most tables after archiving
  [--quiet] = quiet
  [--calc-test] = date calculation test only
  [--test] = test