Over the past 2 months my ADSL performance has been degrading heavily, with the average ping being around 1500ms during periods between 19:00 and 23:00 with the latency sometimes getting as high as 30000ms (yes, 30 SECONDS).
Multiple ISP's have beem tested, ports have been recreated multiple times, and friends in the same complex have reported the exact same issues with their ADSL line. All indications point to massive congestion at the exchange, but multiple support requests to Afrihost (who manage my line), and their subsequent forwarding of the complaint on to Telkom has yielded nothing. Friends in the same complex, and on the same exchange have also reported the issue to Telkom, but all that is ever done is the port is recreated, and the fault marked as resolved.
The fault has never been resolved.
The main problem is if you are ever lucky enough to receive a phone call from Telkom regarding the issue, it is always at a time when there is no congestion, ie. during business hours. Thus I have begun automated monitoring of the line and log the worst/best/average traceroute (using mtr) to the Google DNS servers (8.8.8.8). This provides historic data that shows there is an ongoing issue that isn't being resolved by a simple port reset.
Telkom keep wanting to push up everyones ADSL speeds to try make themselves look good, but are failing to upgrade the exhanges to handle the additional traffic. During the evening, when it is most logical for me to use my 4MB ADSL line, I manage to get average download speeds of about 18KB/s, and just browsing websites is painfully slow as I need to wait over a minute for the average website to load.
The exchange in question is Gordon's Bay (WGDB)
The following graph shows the average ping from the second hop in a tractroute. This represents the hop from the exchange onwards. More detailed information can be found the the mtr_report.txt file.
![Graph] (https://github.com/SilverCode/ExchangeCongestion/blob/master/exchange_congestion.png)
This script parses the report generated by the "mtr" command, takes the average value of the 2nd hop (so at the exchange) and outputs it in a graph format.
I have configured cron to run mtr every 30 minutes and output the results to a log file (mtr_report.txt), which this program is then run against. The data output by this script is in a standard CSV format that can then be used in a spreadsheet program (LibreOffice Calc) in my case, where I can render the graph.
PHP cli and MTR
$ sudo apt-get install php5-cli mtr
NOTE: /tmp/ is used for illustrative purposes. If you want information to persist across reboots, you should probably use your home folder.
To generate the data, the following is added to crontab to execute the script every 30 minutes.
$ crontab -e
*/30 * * * * /tmp/run_mtr_report
Once some data has been generated and placed in /tmp/mtr_report.txt, you can run the php script against it
$ php -f report.php /tmp/mtr_report.php