use of org.opencord.aaa.AaaMachineStatisticsService in project aaa by opencord.
the class AaaShowPerMachineCountersCommand method doExecute.
@Override
protected void doExecute() {
String sessionId = deviceId + portNumber;
AaaMachineStatisticsService aaaMachineStatsManager = get(AaaMachineStatisticsService.class);
AuthenticationService aaaManager = get(AuthenticationService.class);
AaaSupplicantMachineStats aaaSupplicantMachineStats = aaaManager.getSupplicantMachineStats(sessionId);
if (aaaSupplicantMachineStats != null) {
print("%30s %10d\n", "SessionDuration", aaaSupplicantMachineStats.getSessionDuration());
print("%30s %10d\n", "TotalOctetRecieved", aaaSupplicantMachineStats.getTotalOctetRecieved());
print("%30s %10d\n", "TotalFramesReceived", aaaSupplicantMachineStats.getTotalFramesReceived());
print("%30s %10d\n", "TotalFramesSent", aaaSupplicantMachineStats.getTotalFramesSent());
print("%30s %10d\n", "TotalOctetSent", aaaSupplicantMachineStats.getTotalOctetSent());
print("%30s %10d\n", "TotalPacketsRecieved", aaaSupplicantMachineStats.getTotalPacketsRecieved());
print("%30s %10d\n", "TotalPacketsSent", aaaSupplicantMachineStats.getTotalPacketsSent());
} else {
print("No such Device Found");
}
}
Aggregations