Forum Discussion
Zdenda
Cirrus
Oct 15, 2013Pool member control issue when non-default partition is used
Hi, I use script from https://devcentral.f5.com/wiki/iControl.PsPoolMemberControl.ashx. My problem is when I call function Disable-Member, I get error 16908336. I run this script command by command a...
Zdenda
Cirrus
Oct 24, 2013Hi, the code is mentioned above your code (last my post where is also printscreen attached). Anyway, I tried also your code and the result is still the same (I run v11.3)..
(Get-F5.iControl).ManagementPartition.set_active_partition( (,"MyPartition") )
$address = New-Object -TypeName iControl.CommonAddressPort;
$address.address ="/MyPartition/10.147.140.61"
$address.port = 80;
$MemberStatisticsA = (Get-F5.iControl).LocalLBPool.get_member_statistics( ("/MyPartition/lipe_pool"), $address);- Eugene_Reznik_1Oct 24, 2013
Nimbostratus
Try using the server name instead of the IP address. I had an issue with using the IP. Also the case matters. - ZdendaOct 24, 2013
Cirrus
name is 10.147.140.61%1, so I used this: $address.address ="/MyPartition/10.147.140.61%1" and I got this: Exception calling "get_member_statistics" with "2" argument(s): "There is an error in XML document (226, 74)." At line:1 char:73 + $MemberStatisticsA = (Get-F5.iControl).LocalLBPool.get_member_statistics <<<< ( ("/MyPartition/lipe_pool"), $address); + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : DotNetMethodException - ZdendaOct 30, 2013
Cirrus
Ok, this was solved by IcontrolSnapin reinstalation. I don't know if I had old version or if it was corrupted or something like that - lbaldwin123_537Nov 26, 2013
Nimbostratus
I had a problem with the code above. Running iControl 11.2 with against BIG-IP 11.3.0 Build 3144.0 Hotfix HF8. I was only able to get this working by removing the partition from the $address.address. (Get-F5.iControl).ManagementPartition.set_active_partition( (,"dev") ) $address = New-Object -TypeName iControl.CommonAddressPort; $address.address = "SERVERNAME" $address.port = 80; $MemberStatisticsA = (Get-F5.iControl).LocalLBPool.get_member_statistics( ("/dev/poolname"), $address); $MemberStatisticEntry = $MemberStatisticsA[0].statistics[0]; $Statistics = $MemberStatisticEntry.statistics; foreach ($Statistic in $Statistics) { $type = $Statistic.type; $value = $Statistic.value; if ( $type -eq "STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS" ) { just use the low value. Odds are there aren't over 2^32 current connections. If your site is this big, you'll have to convert this to a 64 bit number. $cur_connections = $value.low; Write-Host "Current Connections: $cur_connections" } } hope this helps
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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