Forum Discussion
Jon_Bartlett_10
Sep 17, 2008Historic F5 Account
Virtual Server Connection Limit
I am having some difficulties with trying to get, print and set the connection limit for a Virtual Server. Below is a snippet of where I am at. Any help would be greatly appreciated.
----------------------------------------------------------------------------
get connection limit
----------------------------------------------------------------------------
sub handle_get()
{
$soapResponse = $VirtualServer->get_connection_limit
(
SOAP::Data->name( virtual_servers => [$sVS] )
);
&checkResponse($soapResponse);
my @connectionlimit = @{$soapResponse->result};
$stat = @connectionlimit;
$type = $stat->{"type"};
$value = $stat->{"value"};
$low = $value->{"low"};
$high = $value->{"high"};
$value64 = ($high<<32)|$low;
print " Virtual Server: $sVS";
print " type: $type Connection Limit: $value64\n";
}
----------------------------------------------------------------------------
set connection limit
----------------------------------------------------------------------------
sub handle_set()
{
$soapResponse = $VirtualServer->set_connection_limit
(
SOAP::Data->name( virtual_servers => [$sVS] ),
SOAP::Data->name( limits => [$sLimit] )
);
&checkResponse($soapResponse);
}
- Ask and you shall receive. Here's a little perl app that will query the virtual servers, and get/set the connection limits.
http://devcentral.f5.com/wiki/default.aspx/iControl/PerlVirtualServerConnLimit.html
- One thing to note about the connection limit. It is limited by a 32bit number so in the "set" method I just set the value as the low 32 bits in the ULong64 structure.
- Jon_Bartlett_10Historic F5 AccountWorks great! Thank you!!
- Glad to help!
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