|
@@ -118,9 +118,12 @@ class FiberhomePonOctetsCommand extends BaseCommand
|
|
$oltBandwidth["{$subId}_inbandwidth_olt"] = "{$totalIn}|g";
|
|
$oltBandwidth["{$subId}_inbandwidth_olt"] = "{$totalIn}|g";
|
|
$oltBandwidth["{$subId}_outbandwidth_olt"] = "{$totalOut}|g";
|
|
$oltBandwidth["{$subId}_outbandwidth_olt"] = "{$totalOut}|g";
|
|
|
|
|
|
|
|
+ $div = 1073741824; //bytes => giga
|
|
|
|
+ $consIn = number_format(($totalConsIn / $div),3);
|
|
|
|
+ $consOut = number_format(($totalConsOut / $div),3);
|
|
$oltConsumption = array();
|
|
$oltConsumption = array();
|
|
- $oltConsumption["{$subId}_inconsumption_olt"] = "{$totalConsIn}|g";
|
|
|
|
- $oltConsumption["{$subId}_outconsumption_olt"] = "{$totalConsOut}|g";
|
|
|
|
|
|
+ $oltConsumption["{$subId}_inconsumption_olt"] = "{$consIn}|g";
|
|
|
|
+ $oltConsumption["{$subId}_outconsumption_olt"] = "{$consOut}|g";
|
|
|
|
|
|
$statsdService = $this->getContainer()->get('statsd');
|
|
$statsdService = $this->getContainer()->get('statsd');
|
|
$statsdService->send($oltBandwidth);
|
|
$statsdService->send($oltBandwidth);
|