AST_DB_optimize.pl doesn't work

General and Support topics relating to ViciDialNow and GoAutoDial ISO installers

Moderators: enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, s0lid

AST_DB_optimize.pl doesn't work

Postby brando16 » Wed Jul 20, 2016 5:48 am

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
Vicibox VERSION: 2.14-580a | BUILD: 161029-2304 | OpenSuSE v.42.1 64-bit | Kernel v.4.1.13 | Asterisk v.11.25.1-vici | DAHDI v.2.10.2 | LibPRI v.1.4.14 | Amfletec VoiceSync v.1.3.8 | ViciDial SVN Trunk v.2.12-533a build 161205-1650 revision 2461
brando16
 
Posts: 88
Joined: Tue Jul 30, 2013 11:00 am

Re: AST_DB_optimize.pl doesn't work

Postby udy786 » Thu Jul 21, 2016 5:57 am

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.
udy786
 
Posts: 148
Joined: Fri Jul 19, 2013 10:55 am

Re: AST_DB_optimize.pl doesn't work

Postby brando16 » Thu Jul 21, 2016 6:24 am

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.
Vicibox VERSION: 2.14-580a | BUILD: 161029-2304 | OpenSuSE v.42.1 64-bit | Kernel v.4.1.13 | Asterisk v.11.25.1-vici | DAHDI v.2.10.2 | LibPRI v.1.4.14 | Amfletec VoiceSync v.1.3.8 | ViciDial SVN Trunk v.2.12-533a build 161205-1650 revision 2461
brando16
 
Posts: 88
Joined: Tue Jul 30, 2013 11:00 am

Re: AST_DB_optimize.pl doesn't work

Postby brando16 » Fri Jul 22, 2016 5:58 am

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
Vicibox VERSION: 2.14-580a | BUILD: 161029-2304 | OpenSuSE v.42.1 64-bit | Kernel v.4.1.13 | Asterisk v.11.25.1-vici | DAHDI v.2.10.2 | LibPRI v.1.4.14 | Amfletec VoiceSync v.1.3.8 | ViciDial SVN Trunk v.2.12-533a build 161205-1650 revision 2461
brando16
 
Posts: 88
Joined: Tue Jul 30, 2013 11:00 am

Re: AST_DB_optimize.pl doesn't work

Postby williamconley » Fri Jul 22, 2016 6:06 pm

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.
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20018
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to ViciDialNow - GoAutoDial

Who is online

Users browsing this forum: No registered users and 50 guests