Forum Discussion
Claret_Carvalho
Nimbostratus
Sep 08, 2009CPU reporting of F5 devices
Hi,
Has anyone successfully managed to get SevOne tool (www.sevone.com) to do performance reporting of LTM/GTM devices, specifically on CPU and Memory utilization? Just a general question, does anyone what snmp oid's the RRDtool uses and how they derive the utilization figure to generate graphs locally on the device? I have read the snmp configuration guides but it is still not clear.
Thanks,
Claret
- hoolio
Cirrostratus
Hi Claret, - JRahm
Admin
Pre-v.10, you have to do all manual calculations. New in v10 is a ratio oid for 5 second, 1 minute, & 5 minute cpu usage, per processor and globally. These are:!/usr/bin/perl -w This code is not supported by F5 Network and is offered under the GNU General Public License. Use at your own risk. use strict; use Net::SNMP qw(:snmp); my ($host, $snmp_comm); $host = $ARGV[0]; $snmp_comm = $ARGV[1]; chomp ($host , $snmp_comm); my $cpuID = ".1.3.6.1.4.1.3375.2.1.7.5.2.1.3.1.48"; my $cpuIndex = ".1.3.6.1.4.1.3375.2.1.7.5.2.1.2.1.48"; my $cpuUsageRatio5s = ".1.3.6.1.4.1.3375.2.1.7.5.2.1.19.1.48."; my $cpuUsageRatio1m = ".1.3.6.1.4.1.3375.2.1.7.5.2.1.27.1.48."; my $cpuUsageRatio5m = ".1.3.6.1.4.1.3375.2.1.7.5.2.1.35.1.48."; my $gcpuUsageRatio5s = ".1.3.6.1.4.1.3375.2.1.1.2.20.21.0"; my $gcpuUsageRatio1m = ".1.3.6.1.4.1.3375.2.1.1.2.20.29.0"; my $gcpuUsageRatio5m = ".1.3.6.1.4.1.3375.2.1.1.2.20.37.0"; my ($session, $error) = Net::SNMP->session( -hostname => $host, -community => $snmp_comm, -port => 161, -version => 'snmpv2c', -nonblocking => 0 ); if (!defined $session) { print "Received no SNMP response from $host\n"; print STDERR "Error: $error\n"; exit -1; } my $allCPU = $session->get_table ( -baseoid => $cpuIndex ); my %cpu_table = %{$allCPU}; my $x = 0; print "\n\nCPU Utilization:\t5s\t1m\t5m\n\n"; foreach my $key (sort keys %cpu_table) { my @oid_index = split(/\./, $key); my $ltm_cpu5s = $cpuUsageRatio5s . $oid_index[-1]; my $ltm_cpu1m = $cpuUsageRatio1m . $oid_index[-1]; my $ltm_cpu5m = $cpuUsageRatio5m . $oid_index[-1]; my $oid_ratios = $session->get_request( -varbindlist => [$ltm_cpu5s, $ltm_cpu1m, $ltm_cpu5m] ); print "\tCPU$x\t\t$oid_ratios->{$ltm_cpu5s}\t$oid_ratios->{$ltm_cpu1m}\t$oid_ratios->{$ltm_cpu5m}\n"; $x++; } my $oid_gratios = $session->get_request( -varbindlist => [$gcpuUsageRatio5s, $gcpuUsageRatio1m, $gcpuUsageRatio5m] ); print "\tGlobal\t\t$oid_gratios->{$gcpuUsageRatio5s}\t$oid_gratios->{$gcpuUsageRatio1m}\t$oid_gratios->{$gcpuUsageRatio5m}\n\n\n";
vadmin@vadmin:/tmp$ ./ltmcpu.pl 10.10.20.5 public CPU Utilization: 5s 1m 5m CPU0 3 3 3 CPU1 2 3 3 Global 2 3 3
- JRahm
Admin
BTW, if these intervals (5s/1m/5s) don't work for you, you can still use the other oids and do the calculations manually, as you have to do for the TMM utilization as well. They are:
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