|
@@ -65,6 +65,7 @@ class HuaweiPonOctetsCommand extends BaseCommand
|
|
|
$subId = $this->d_s;
|
|
|
|
|
|
$t1 = time();
|
|
|
+ $totalIn = $totalOut = 0;
|
|
|
foreach($dataCached as $index => $pon) {
|
|
|
$ponPort = str_replace("/",".",$pon['ponPort']);
|
|
|
|
|
@@ -95,6 +96,9 @@ class HuaweiPonOctetsCommand extends BaseCommand
|
|
|
$outBandwidth = ($diff / ($t1 - $t0)) * 8;
|
|
|
}
|
|
|
|
|
|
+ $totalIn += $inBandwidth;
|
|
|
+ $totalOut += $outBandwidth;
|
|
|
+
|
|
|
$sendData["{$subId}_inbandwidth_pon_{$ponPort}"] = "{$inBandwidth}|g";
|
|
|
$sendData["{$subId}_outbandwidth_pon_{$ponPort}"] = "{$outBandwidth}|g";
|
|
|
|
|
@@ -106,9 +110,15 @@ class HuaweiPonOctetsCommand extends BaseCommand
|
|
|
|
|
|
$this->setData($key_olt_pon_bandwidth, $bandwidthCached, true);
|
|
|
|
|
|
+ $oltBandwidth = array();
|
|
|
+ $oltBandwidth["{$subId}_inbandwidth_olt"] = "{$totalIn}|g";
|
|
|
+ $oltBandwidth["{$subId}_outbandwidth_olt"] = "{$totalOut}|g";
|
|
|
+
|
|
|
+ $statsdService = $this->getContainer()->get('statsd');
|
|
|
+ $statsdService->send($oltBandwidth);
|
|
|
+
|
|
|
if($sendData && $saveHistoric) {
|
|
|
$t_start_script = microtime(true);
|
|
|
- $statsdService = $this->getContainer()->get('statsd');
|
|
|
$statsdService->send($sendData);
|
|
|
$t_end_script = microtime(true);
|
|
|
$time = $t_end_script - $t_start_script;
|