[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: snmpd package do not have processor load in snmp tree?



On Tue, Jan 09, 2001 at 03:41:07PM +0800, Tam,  Vincent wrote:
> Dear all,
> 
> We're using Debian 2.2 system. We've installed the snmpd package
> and configured read access. The problem is we cannot find any place in 
> the snmp tree that show the processor load?!
> 
> We do an snmpwalk and found that under "host.hrDevice.hrProcessorTable" 
> there is only: 
> host.hrDevice.hrProcessorTable.hrProcessorEntry.hrProcessorFrwID.769 = OID: .ccitt.nullOID
> 
> We can get the processor load in Debian 2.1's snmpd package, is 
> there something changed in Debian 2.2? How do we get it back?

You mean 'load average'?

It's there.  Look at /etc/snmp/snmpd.conf for docs on the UCD stuff:
# % snmpwalk -v 1 localhost public .1.3.6.1.4.1.2021.10
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.1 = 1
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.2 = 2
# enterprises.ucdavis.loadTable.laEntry.loadaveIndex.3 = 3
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.1 = "Load-1"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.2 = "Load-5"
# enterprises.ucdavis.loadTable.laEntry.loadaveNames.3 = "Load-15"
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.1 = "0.49" Hex: 30 2E 34 39
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.2 = "0.31" Hex: 30 2E 33 31
# enterprises.ucdavis.loadTable.laEntry.loadaveLoad.3 = "0.26" Hex: 30 2E 32 36

etc.

You can configure it so that the above values generate 'errors' -- see
snmpd.conf for details.  

CPU usage (as in percentage idle, etc) is actually trickier, since the
kernel doesn't keep track of it in any sort of useful way.  ("Are you
asking for CPU usage over the last 5 minutes?  The last minute?  The last
second?  Right now?  Well right -now-, I'm busy answering you, so I'm
100% utilized, but when that is done, I'll go back to 99% idle...")

-- 
CueCat decoder .signature by Larry Wall:
#!/usr/bin/perl -n
printf "Serial: %s Type: %s Code: %s\n", map { tr/a-zA-Z0-9+-/ -_/; $_ = unpack
'u', chr(32 + length()*3/4) . $_; s/\0+$//; $_ ^= "C" x length; } /\.([^.]+)/g; 



Reply to: