mirror of
https://github.com/Telecominfraproject/wlan-cloud-opensync-controller.git
synced 2025-10-31 18:47:57 +00:00
Add log to track WIFI-1237: Radio/Channel Utilization is more than 100% (#22)
* Add log to track WIFI-1237: Radio/Channel Utilization is more than 100% Co-authored-by: Lynn Shi <lynn.shi@netexperience.com>
This commit is contained in:
@@ -138,7 +138,7 @@ import wc.stats.IpDnsTelemetry.WCStatsReport;
|
|||||||
public class OpensyncExternalIntegrationMqttMessageProcessor {
|
public class OpensyncExternalIntegrationMqttMessageProcessor {
|
||||||
|
|
||||||
private static final Logger LOG = LoggerFactory.getLogger(OpensyncExternalIntegrationMqttMessageProcessor.class);
|
private static final Logger LOG = LoggerFactory.getLogger(OpensyncExternalIntegrationMqttMessageProcessor.class);
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private EquipmentServiceInterface equipmentServiceInterface;
|
private EquipmentServiceInterface equipmentServiceInterface;
|
||||||
@Autowired
|
@Autowired
|
||||||
@@ -1670,19 +1670,23 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
busySelf += surveySample.getBusySelf() * surveySample.getDurationMs();
|
busySelf += surveySample.getBusySelf() * surveySample.getDurationMs();
|
||||||
totalDurationMs += surveySample.getDurationMs();
|
totalDurationMs += surveySample.getDurationMs();
|
||||||
noiseList.add(getNegativeSignedIntFrom8BitUnsigned(surveySample.getNoise()));
|
noiseList.add(getNegativeSignedIntFrom8BitUnsigned(surveySample.getNoise()));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (totalDurationMs > 0) {
|
if (totalDurationMs > 0) {
|
||||||
RadioUtilization radioUtil = new RadioUtilization();
|
RadioUtilization radioUtil = new RadioUtilization();
|
||||||
radioUtil.setTimestampSeconds((int) ((survey.getTimestampMs()) / 1000));
|
radioUtil.setTimestampSeconds((int) ((survey.getTimestampMs()) / 1000));
|
||||||
int pctBusyTx = busyTx / totalDurationMs;
|
int pctBusyTx = busyTx / totalDurationMs;
|
||||||
|
checkIfOutOfBound("pctBusyTx", pctBusyTx, survey, totalDurationMs, busyTx, busyRx, busy, busySelf);
|
||||||
|
|
||||||
radioUtil.setAssocClientTx(pctBusyTx);
|
radioUtil.setAssocClientTx(pctBusyTx);
|
||||||
int pctBusyRx = busyRx / totalDurationMs;
|
int pctBusyRx = busyRx / totalDurationMs;
|
||||||
|
checkIfOutOfBound("pctBusyRx", pctBusyRx, survey, totalDurationMs, busyTx, busyRx, busy, busySelf);
|
||||||
radioUtil.setAssocClientRx(pctBusyRx);
|
radioUtil.setAssocClientRx(pctBusyRx);
|
||||||
|
|
||||||
double pctIBSS = (busyTx + busySelf) / totalDurationMs;
|
double pctIBSS = (busyTx + busySelf) / totalDurationMs;
|
||||||
radioUtil.setIbss(pctIBSS);
|
radioUtil.setIbss(pctIBSS);
|
||||||
int nonWifi = (busy - (busyTx + busyRx)) / totalDurationMs;
|
int nonWifi = (busy - (busyTx + busyRx)) / totalDurationMs;
|
||||||
|
checkIfOutOfBound("nonWifi", nonWifi, survey, totalDurationMs, busyTx, busyRx, busy, busySelf);
|
||||||
radioUtil.setNonWifi(nonWifi);
|
radioUtil.setNonWifi(nonWifi);
|
||||||
|
|
||||||
radioType = OvsdbToWlanCloudTypeMappingUtility
|
radioType = OvsdbToWlanCloudTypeMappingUtility
|
||||||
@@ -1709,7 +1713,6 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
|
|
||||||
apNodeMetrics.setChannelUtilization(radioType, totalUtilization.intValue());
|
apNodeMetrics.setChannelUtilization(radioType, totalUtilization.intValue());
|
||||||
capacityDetails.put(radioType, cap);
|
capacityDetails.put(radioType, cap);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1724,6 +1727,16 @@ public class OpensyncExternalIntegrationMqttMessageProcessor {
|
|||||||
|
|
||||||
updateDeviceStatusRadioUtilizationReport(customerId, equipmentId, radioUtilizationReport);
|
updateDeviceStatusRadioUtilizationReport(customerId, equipmentId, radioUtilizationReport);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void checkIfOutOfBound(String checkedType, int checkedValue, Survey survey, int totalDurationMs,
|
||||||
|
int busyTx, int busyRx, int busy, int busySelf) {
|
||||||
|
if (checkedValue > 100 || checkedValue < 0) {
|
||||||
|
LOG.warn("Calculated value for {} {} is out of bounds on totalDurationMs {} for survey.getBand {}. busyTx {} busyRx {} busy {} busySelf {} "
|
||||||
|
+ " survey.getTimestampMs {}, survey.getSurveyListList {}",
|
||||||
|
checkedType, checkedValue, totalDurationMs, survey.getBand(), busyTx, busyRx, busy, busySelf,
|
||||||
|
survey.getTimestampMs(), survey.getSurveyListList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void updateNetworkAdminStatusReport(int customerId, long equipmentId, ApNodeMetrics apNodeMetrics) {
|
private void updateNetworkAdminStatusReport(int customerId, long equipmentId, ApNodeMetrics apNodeMetrics) {
|
||||||
apNodeMetrics.getNetworkProbeMetrics().forEach(n -> {
|
apNodeMetrics.getNetworkProbeMetrics().forEach(n -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user