
47
}
} else {
// We are dropped below the threshold
stop the timer
return FALSE
}
Get total number of connections
1. Get list of Virtual Servers configured in the Public LTM using the
Virtual Server Binding Stub
LocalLBVirtualServerLocator().getLocalLBVirtualServerPort('URL to Public LTM POrtal')
2. Get List of virtual Servers and statistics.
stats = stub.get_statistics(virtual Server List);
for(all the statistics entries) {
// We are only interested in the "vs_GemPet_http" Virtual Server that receives the
traffic for the Pet Store Application in the
// Public Cloud
if(Stat Entry.Server Name == "vs_GemPet_http") {
// Now look fo ronly the cline tside open conection statistic entry
if(Statistic Type ==
CommonStatisticType.STATISTIC_CLIENT_SIDE_CURRENT_CONNECTIONS) {
numberOfConnectios = stat Entry.value();
}
}
}
Commenti su questo manuale