Forum Discussion
Nicolas_Menant
Employee
Apr 10, 2008Retrieve number of current connections ?
Hi,
i developp an iControl api that will interact with the servers depending on the number of connection on each.
I have some issue to retrieve the number of current connections on each pool member:
Here is a test i do:
Here is the code
for (j = 0; j < mbstat[0].statistics[1].statistics.Length; j++)
if (mbstat[0].statistics[1].statistics[j].type == iControl.CommonStatisticType.STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS)
MessageBox.Show(mbstat[0].statistics[1].statistics[j].type.ToString() + ":" + mbstat[0].statistics[1].statistics[j].value.high.ToString());
I retrieve some value, it seems to always be 0 with high and with low i seem to have the proper value... what is the difference between the high and low value ?
When i add another test equivalent to this one i crash the application:
for (j = 0; j < mbstat[0].statistics[1].statistics.Length; j++)
if (mbstat[0].statistics[1].statistics[j].type == iControl.CommonStatisticType.STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS)
MessageBox.Show(mbstat[0].statistics[1].statistics[j].type.ToString() + ":" + mbstat[0].statistics[1].statistics[j].value.high.ToString());
if (mbstat[0].statistics[1].statistics[j].type == iControl.CommonStatisticType.STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS)
essageBox.Show(mbstat[0].statistics[1].statistics[j].type.ToString() + ":" + mbstat[0].statistics[1].statistics[j].value.high.ToString());
I have this error: Index was outside the bounds of the array. ... looks like it doesn't like STATISTIC_SERVER_SIDE_MAXIMUM_CONNECTIONS ?
Thanks for your help !
3 Replies
- Don_MacVittie_1Historic F5 AccountHi nmenant!
- Nicolas_Menant
Employee
i'm ashamed for the curly brace issue -_-' - Don_MacVittie_1Historic F5 AccountYou're correct. I wonder if the Web GUI is showing idle persistent connections? Those would only die if they were up and something got sent over them.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects