Search in sources :

Example 1 with AaaMachineStatisticsService

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");
    }
}
Also used : AaaSupplicantMachineStats(org.opencord.aaa.AaaSupplicantMachineStats) AaaMachineStatisticsService(org.opencord.aaa.AaaMachineStatisticsService) AuthenticationService(org.opencord.aaa.AuthenticationService)

Aggregations

AaaMachineStatisticsService (org.opencord.aaa.AaaMachineStatisticsService)1 AaaSupplicantMachineStats (org.opencord.aaa.AaaSupplicantMachineStats)1 AuthenticationService (org.opencord.aaa.AuthenticationService)1