[mrtg] Re: Need accurate cpu % info using net-snmp and mrtg

Matt Mozur matt.mozur at sourwood.net
Wed Mar 12 06:04:59 MET 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tue, 11 Mar 2003, Michael Cunningham wrote:

> 1. Active cpu usage %
> 2. Kernel % versus Wait %
> 3. User % versus System %
>
> For number 1, I am adding up the responses from
> ssCpuRawSystem, ssCpuRawKernel, ssCpuRawWait, and ssCpuRawUser.
> And mrtg is dividing by the polling interval (like mrtg normally does).
> This should show all active cpu usage minus idle time (ssCpuRawIdle).

...snip

> Unfortunatly it appears that the numbers returned from
> net-snmpd are not usage info but raw kernel time ticks.
> Thus all my numbers are WAY off from reality.

...snip

> Is there anyway to convert these ticks to usage info?
> The email said I should divide by a number but the number is
> platform dependant.. any idea what this number is on
> solaris 2.6, 7, and 8? Any other way to get accurate
> cpu usage info using net-snmpd, mrtg, and the UCD mib
> in perticular?

I have used a Perl script to generate the System & User utilization as a
percentage.  The routine returns:

  1. system cpu
  2. user cpu
  3. host uptime
  4. host name

If you would like to use it, you can grab it from:

  ftp://ftp.sourwood.net/pub/projects/mrtg/cpu.pl

You'll need to edit the script to set the hostname and community.  It
requires Perl 5.6.0 or higher and the Net::SNMP package.

hth

Matt


-----BEGIN PGP SIGNATURE-----
Version: PGP 6.5.8
Comment: Made with pgp4pine 1.75-6

iQA/AwUBPm7ACfcKMP4JTPUAEQKMFQCgyI1CBBd9oQWJkRDp3eg/iBs7ItwAoPKB
N3BfYMpB1hPCkbbj+rLLK4wC
=JRUE
-----END PGP SIGNATURE-----

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list