Forum Discussion
CLDU
Nimbostratus
Aug 17, 2007cpu monitoring
Hello,
I try to monitor tmm cpu usage on a 9.2.4 bigip
a top command says cpu used at 100%
how can i get the real tmm cpu used?
thanks for your help
Clement
- JRahm
Admin
Here's a stdout version of a perl script I use to graph TMM utilization in cacti:!/usr/bin/perl Usage: tmm-cpu.pl use Net::SNMP qw(:snmp); my $host = $ARGV[0]; my $snmp_comm = $ARGV[1]; chomp $host; chomp $snmp_comm; my $oid_tmm_tc = '.1.3.6.1.4.1.3375.2.1.1.2.1.41.0'; my $oid_tmm_ic = '.1.3.6.1.4.1.3375.2.1.1.2.1.42.0'; my $oid_tmm_sc = '.1.3.6.1.4.1.3375.2.1.1.2.1.43.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; } poll CPU oids my $polled_oids = $session->get_request( -varbindlist => [$oid_tmm_tc, $oid_tmm_ic, $oid_tmm_sc] ); calculate CPU Utilization my $tmm_cpu = ( ( $polled_oids->{$oid_tmm_tc} - ( $polled_oids->{$oid_tmm_ic} + $polled_oids->{$oid_tmm_sc} ) ) / $polled_oids->{$oid_tmm_tc} ) * 100 ; Round to integer $tmm_cpu = int($tmm_cpu + .5); print CPU Utilization to stdout for cli validation print $tmm_cpu;
- JRahm
Admin
..hmm, didn't like my lt / gt brackets on the usage line, edited the post for clarity - JRahm
Admin
Actually, doesn't look like the edit link exists on this forum. Usage is: - Deb_Allen_18Historic F5 AccountThanks, citizen_elah.
:SAMPLE_CATEGORIES: ,MgmtScript,
- hoolio
Cirrostratus
A much less robust option than Citizen's perl script for SNMP polling (but closer to top functionality) would be to run tmstat from the CLI. The CPU stats in the upper left are accurate for CPU1, the TMM CPU. - CLDU
Nimbostratus
Hello,
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