Page 1 of 1

AST_DB_optimize.pl doesn't work

PostPosted: Wed Jul 20, 2016 5:48 am
by brando16
Hi all,

i have one server GoautoDial in production for few months and the log table are very large 2 milions and more of record. I see in the crontab ther is this instruction:

2 1 * * * /usr/share/astguiclient/AST_reset_mysql_vars.pl
and
3 1 * * * /usr/share/astguiclient/AST_DB_optimize.pl

I read some topic indicate this script clean the server from log and move all record into _archive tables i need to this script work beacause this server work an high volume of calls.

I try to execute from shell with argument -t but nothing happens. :cry:

Someone have idea why?

thanks to all in advantages

Re: AST_DB_optimize.pl doesn't work

PostPosted: Thu Jul 21, 2016 5:57 am
by udy786
Hi,

If you are you running then try to run like

Code: Select all
perl /usr/share/astguiclient/AST_DB_optimize.pl


If till you are getting any error then please post your error logs here and also don't forget to include system details like vicidial, asterisk version, OS etc and installation method.

Thanks
Uday.

Re: AST_DB_optimize.pl doesn't work

PostPosted: Thu Jul 21, 2016 6:24 am
by brando16
I have just try run with "perl" but nothing happens. I don't any error. The script run approximately 0,001 sec and the command promt appear, but nothing happens.

i have inserted in the crontab this line because i read in some forum this is the right script:

Code: Select all
30 1 * * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl


but i forget the --daily argument and then some tables log are copied into _archive table, but doesn't delete original record.
To night run the same script with argument and then i check if clean log tables.

Thanks for the reply.

Re: AST_DB_optimize.pl doesn't work

PostPosted: Fri Jul 22, 2016 5:58 am
by brando16
I found the correct command:

Code: Select all
30 1 * * * /usr/share/astguiclient/ADMIN_archive_log_tables.pl --days 1 --daily


But vicidial_log doens't processed by this script only call_log, vicidial_log_extended, vicidial_dial_log, vicidial_api_log. I found more query with SHOW PROCESSLIST and do more select count from vicidial_log and vicidial_agent_log. this last two table are too big and then i need to archive it.

this two scripts AST_DB_optimize.pl and AST_reset_mysql_vars.pl run all night but nothing do.

Any idea? Which arguments i need to pass into this two scripts?

thanks a lot

Re: AST_DB_optimize.pl doesn't work

PostPosted: Fri Jul 22, 2016 6:06 pm
by williamconley
Code: Select all
/usr/share/astguiclient/ADMIN_archive_log_tables.pl --help


This works with almost any of the perl scripts in this folder. And of course when you want to observe it running, use "--debugX" so you can see what it's actually doing. Running some of these scripts without options will often result in ... nothing as they have no output without debug being invoked.