Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N
-----DEBUGGING -----
TEST
NOW DATETIME: 2019-01-26 10:05:34
1 HOUR AGO DATETIME: 2019-01-26 09:05:34
|DELETE from vicidial_manager where entry_date < '2019-01-26 09:35:34';|
- vicidial_manager flush: 0E0 rows
|DELETE from vicidial_dtmf_log where dtmf_time < '2019-01-26 09:35:34';|
- vicidial_dtmf_log flush: 0E0 rows
|DELETE from routing_initiated_recordings where launch_time < '2019-01-26 09:35:34';|
- routing_initiated_recordings flush: 0E0 rows
|DELETE from parked_channels_recent where park_end_time < '2019-01-26 09:35:34';|
- parked_channels_recent flush: 0E0 rows
|DELETE from cid_channels_recent where call_date < '2019-01-26 10:03:33';|
- cid_channels_recent flush: 0E0 rows
|OPTIMIZE table vicidial_manager;|
|asterisk.vicidial_manager|optimize|status|Table is already up to date|
- OPTIMIZE vicidial_manager
|OPTIMIZE table vicidial_dtmf_log;|
|asterisk.vicidial_dtmf_log|optimize|status|Table is already up to date|
- OPTIMIZE vicidial_dtmf_log
|OPTIMIZE table routing_initiated_recordings;|
|asterisk.routing_initiated_recordings|optimize|status|Table is already up to date|
- OPTIMIZE routing_initiated_recordings
|OPTIMIZE table parked_channels_recent;|
|asterisk.parked_channels_recent|optimize|status|Table is already up to date|
- OPTIMIZE parked_channels_recent
|OPTIMIZE table cid_channels_recent;|
|asterisk.cid_channels_recent|optimize|status|Table is already up to date|
- OPTIMIZE cid_channels_recent
|OPTIMIZE table vicidial_live_agents;|
|asterisk.vicidial_live_agents|optimize|status|Table is already up to date|
- OPTIMIZE vicidial_live_agents
|OPTIMIZE table vicidial_drop_rate_groups;|
|asterisk.vicidial_drop_rate_groups|optimize|status|Table is already up to date|
- OPTIMIZE vicidial_drop_rate_groups
|OPTIMIZE table vicidial_campaigns;|
|asterisk.vicidial_campaigns|optimize|status|Table is already up to date|
- OPTIMIZE vicidial_campaigns
|OPTIMIZE table vicidial_lists;|
|asterisk.vicidial_lists|optimize|status|Table is already up to date|
- OPTIMIZE vicidial_lists
|OPTIMIZE table vicidial_inbound_groups;|
|asterisk.vicidial_inbound_groups|optimize|status|Table is already up to date|
- OPTIMIZE vicidial_inbound_groups
|1|SHOW TABLES LIKE "cid_channels_recent_192168000033";|
|DELETE from cid_channels_recent_192168000033 where call_date < '2019-01-26 10:03:33';|
- cid_channels_recent_192168000033 flush: 0E0 rows
|OPTIMIZE table cid_channels_recent_192168000033;|
|asterisk.cid_channels_recent_192168000033|optimize|status|Table is already up to date|
- OPTIMIZE cid_channels_recent_192168000033
192.168.0.33 | mainDB |
| 192.168.0.229 | mn229 |
| 192.168.0.228 | mn228 |
| 192.168.0.227 | mn227 |
alo wrote:I tried running SELECT server_ip,server_id FROM servers where active='Y' and active_asterisk_server='Y'; as Cron user and it listed ther server_ips and the server ids the same as the root user.
I also deleted all the dialing servers and added one from scratch in case there was something weird like a space or character in the server_id.
I wasn't 100% sure where or how you wanted me to add a debugging line, but I did manage to add a few to print $stmtA (showed correct statement) and $sthArows (showed correct number of rows in the servers table)
After I finished messing around and adding the debugging, I did a SVN update to and ran the install script to reset the file. just in case, and its still only clearing the one table.
I have to assume I messed something up but its happening on our other offices system too.
Do you have any specific debugging additions you think might be helpful?
Thanks again.
DELETE from vicidial_manager where entry_date < '2019-01-26 09:35:34';
/srv/www/htdocs/vicidial
/srv/www/htdocs/agc
/usr/share/astguiclient
/var/lib/asterisk/agi-bin
-rw-rw---- 1 mysql mysql 2.1K Nov 11 04:41 cid_channels_recent_010001096020.frm
-rw-rw---- 1 mysql mysql 0 Feb 5 16:11 cid_channels_recent_010001096020.MYD
-rw-rw---- 1 mysql mysql 1.0K Feb 5 16:11 cid_channels_recent_010001096020.MYI
-rw-rw---- 1 mysql mysql 2.1K Nov 11 04:44 cid_channels_recent_010001096021.frm
-rw-rw---- 1 mysql mysql 35G Feb 5 23:36 cid_channels_recent_010001096021.MYD
-rw-rw---- 1 mysql mysql 2.7G Feb 5 23:36 cid_channels_recent_010001096021.MYI
-rw-rw---- 1 mysql mysql 2.1K Nov 11 04:52 cid_channels_recent_010001096022.frm
-rw-rw---- 1 mysql mysql 35G Feb 5 23:36 cid_channels_recent_010001096022.MYD
-rw-rw---- 1 mysql mysql 2.6G Feb 5 23:36 cid_channels_recent_010001096022.MYI
-rw-rw---- 1 mysql mysql 2.1K Nov 22 05:03 cid_channels_recent_010001096031.frm
-rw-rw---- 1 mysql mysql 30G Feb 5 23:36 cid_channels_recent_010001096031.MYD
-rw-rw---- 1 mysql mysql 2.3G Feb 5 23:36 cid_channels_recent_010001096031.MYI
-rw-rw---- 1 mysql mysql 2.1K Dec 18 14:00 cid_channels_recent_010001096040.frm
-rw-rw---- 1 mysql mysql 20G Feb 5 23:36 cid_channels_recent_010001096040.MYD
-rw-rw---- 1 mysql mysql 1.5G Feb 5 23:36 cid_channels_recent_010001096040.MYI
-rw-rw---- 1 mysql mysql 2.1K Feb 4 14:35 cid_channels_recent_010001096078.frm
-rw-rw---- 1 mysql mysql 1.4G Feb 6 01:14 cid_channels_recent_010001096078.MYD
-rw-rw---- 1 mysql mysql 100M Feb 6 01:14 cid_channels_recent_010001096078.MYI
while ($sthArows > $aas)
{
$CCRrec=0;
$stmtA = "SHOW TABLES LIKE \"cid_channels_recent_$PADserver_ip[$aas]\";";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$CCRrec=$sthA->rows;
if($DB){print STDERR "\n|$CCRrec|$stmtA|\n";}
if ($CCRrec > 0)
{
$stmtA = "DELETE from cid_channels_recent_$PADserver_ip[$aas] where call_date < '$SQLdate_NEG_2min';";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
if (!$Q) {print " - cid_channels_recent_$PADserver_ip[$aas] flush: $affected_rows rows\n";}
}
$aas++;
}
while ($sthArows > $aas)
{
$CCRrec=0;
$stmtA = "SHOW TABLES LIKE \"cid_channels_recent_$PADserver_ip[$aas]\";";
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$CCRrec=$sthA->rows;
if($DB){print STDERR "\n|$CCRrec|$stmtA|\n";}
if ($CCRrec > 0)
{
$stmtA = "DELETE from cid_channels_recent_$PADserver_ip[$aas] where call_date < '$SQLdate_NEG_2min';";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T) { $affected_rows = $dbhA->do($stmtA);}
if (!$Q) {print " - cid_channels_recent_$PADserver_ip[$aas] flush: $affected_rows rows\n";}
$stmtA = "OPTIMIZE table cid_channels_recent_$PADserver_ip[$aas];";
if($DB){print STDERR "\n|$stmtA|\n";}
if (!$T)
{
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
$sthArows=$sthA->rows;
@aryA = $sthA->fetchrow_array;
if (!$Q) {print "|",$aryA[0],"|",$aryA[1],"|",$aryA[2],"|",$aryA[3],"|","\n";}
$sthA->finish();
}
if (!$Q) {print " - OPTIMIZE cid_channels_recent_$PADserver_ip[$aas] \n";}
}
$aas++;
}
1,5,9,13,17,21,25,29,33,37,41,45,49,53,57 * * * * /usr/share/astguiclient/AST_flush_DBqueue.pl --seconds=240 --session-flush -q
caller_id_name connected_line_name server_ip call_date channel dest_channel linkedid dest_uniqueid uniqueid
V826141235xxx7860433 V826141235xxx7860433 6x.xxx.xxx.xx7 8/26/2022 14:14:41 Local/TSTC21469xxx5354@default-000915f1;1 SIP/AGTW104-00083065 1661541159 1661541159 1661541159
V826141235xxx7860433 V826141235xxx7860433 6x.xxx.xxx.xx7 8/26/2022 14:14:41 Local/TSTC21469xxx5354@default-000915f1;1 SIP/AGTW104-00083065 1661541159 1661541159 1661541159
V826141235xxx7860433 V826141235xxx7860433 6x.xxx.xxx.xx7 8/26/2022 14:14:40 Local/TSTC21469xxx5354@default-000915f1;1 SIP/AGTW104-00083065 1661541159 1661541159 1661541159
V826141235xxx7860433 V826141235xxx7860433 6x.xxx.xxx.xx7 8/26/2022 14:14:41 Local/TSTC21469xxx5354@default-000915f1;1 SIP/AGTW104-00083065 1661541159 1661541159 1661541159
V826141235xxx7860433 V826141235xxx7860433 6x.xxx.xxx.xx7 8/26/2022 14:14:43 Local/TSTC21469xxx5354@default-000915f1;1 SIP/AGTW104-00083065 1661541159 1661541159 1661541159
V826141235xxx7860433 V826141235xxx7860433 6x.xxx.xxx.xx7 8/26/2022 14:14:43 Local/TSTC21469xxx5354@default-000915f1;1 SIP/AGTW104-00083065 1661541159 1661541159 1661541159
Users browsing this forum: Majestic-12 [Bot] and 91 guests