Forum Discussion
Sung_85708
Nimbostratus
Jan 15, 2010Returning the bandwidth usage for an interface
Is there any command that able to return current bandwidth usage for a given interface or total? I need the LTM able to send out a message if over a specific bandwidth.
Thanks.
Hamish
Cirrocumulus
Jan 16, 2010Assuming you mean iControl, ye there is.. If you pull the interface counters you can calculate the bandwidth over time. The code to pull the interface counters is something like the one below
my $Interface = SOAP::Lite
-> uri('urn:iControl:Networking/Interfaces')
-> proxy("$sProtocol://$icUser:$icPass\@$icServer:$icPort/iControl/iControlPortal.cgi", cookie_jar => $cookieJar);
HNM (This bit just reads a list of interfaces from a DB)
$sql_query{sel_nt_4stat}->execute($devID);
while ( my $row = $sql_query{sel_nt_4stat}->fetchrow_hashref()) {
dbprint "getNetworkStats: adding interface $row->{name}\n";
push(@nList, $row->{name});
}
my $soapResponse = $Interface->get_statistics(SOAP::Data->name(interfaces => [@nList]));
my ($status, $text)=&checkResponse($soapResponse);
$StatList = $soapResponse->result;
H
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