# Monitor Sun-Fire 440 CPU



## csross (Sep 2, 2004)

I have a solaris 8 box that I would like to gather cpu stats. It is a sun-fire v440. I did not set up anything related to this box, it was given to me.

The SNMP server running prtg (a windows box) can get the stats for this Sun network card, but when I try and add a monitor for the cpu, am not presented with the option. I do not have snmpdx running, but I am running mibiisa running. I believe the default sun.mib is installed. I am new to this portion of admin.

I would like to get the mibs for the Sun-fire to see what an snmpwalk presents, but I cannot find them. 

What daemons need to run to accomplish this? Does anyone know where I can get the mibs and where to install them? It is a SUNW,UltraSparc-IIIi cpu (4 of them).

Thank you


----------



## O111111O (Aug 27, 2005)

UC-Davis MIBS will report CPU.

net::SNMP from sourceforge will get them from an SNMPWALK.

One thing to remember is that snmpdx will abend if an abnormal SNMP get is requested from the daemon. There's a switch to throw in the RC for it. I don't recall, but sunsolve has a documented case if you search.


----------



## csross (Sep 2, 2004)

Thank you very much. I do not believe the default mibs that come with solaris 8 have the CPU stats, am I wrong? If not, do you know where I can get a file?

Thanks


----------



## O111111O (Aug 27, 2005)

Yep, they do. The UCD MIB......

UCD-SNMP-MIB::ssCpuRawUser.0
UCD-SNMP-MIB::ssCpuRawSystem.0
UCD-SNMP-MIB::ssCpuRawIdle.0 
UCD-SNMP-MIB::ssCpuRawWait.0
UCD-SNMP-MIB::ssCpuRawKernel.0

The stats you pull would be the same as doing a vmstat from a shell.


----------



## sunosx (Oct 2, 2007)

Can I find these mibs in a default install of Solaris 9 on Sun Fire v440 with 4 UltraSPARC IIIi cpus?


----------



## O111111O (Aug 27, 2005)

It's not on the system, MIB's are on the device doing the polling.

NET::SNMP has it all.


----------



## csross (Sep 2, 2004)

Thanks, I have already tried those, the UCDs. I also have net-snmp installed on the servers. The mibs I'm using are 1.3.6.1.2.1.25.3.3.1.2.768 to 771 on the pollng device. They are included in net-snmp but I'm getting return values of (ie) 70,000,000 and I am wanting/looking for a percentage value. 

Thanks


----------



## O111111O (Aug 27, 2005)

1.3.6.1.2.1.25.3.3.1.2 is correct. That's hrProcessorTable.

NET-SNMP had an issue with multi processors. Still doesn't work with Linux, if you're running Solaris on SPARC this should be working.

What version of NET-SNMP is installed? 5.1 or later is needed.

http://www.oidview.com/mibs/0/HOST-RESOURCES-V2-MIB.html
See hrProcessorTable. Should be a tabular value for each enumerated processor. The interesting thing is that 3.1.2.768 and 76xxxx are typical enumerations for Linux.

Once you have >5.1 NET::SNMP installed, snmpwalk starting at the hrProcessorTable mib. (Don't walk by OID)

With baseline, create script to generate CPU load.


```
#!/bin/bash
for cpu in 1 ; do
( while true; do true; done ) &
done
```
You can compare the hrProcessorTable output with mpstat/vmstat/sar/etc. Some of the OID's display processor load based on idle, some based on Iowait,etc.


----------



## csross (Sep 2, 2004)

Hello.

Thank you. I am using net-snmp v5.4. Thank you for confirming this is the correct OID but I'm not sure how that relates/corresponds to vmstat. They are not even close. Also, what I am looking for is a percentage of cpu usage (ie) cpu 1 is at 10% load. 

These two commands were executed a second apart and there is no similar values. 

mpstat
CPU minf mjf xcal intr ithr csw icsw migr smtx srw syscl usr sys wt idl
0 12 0 173 432 332 38 0 0 2 0 97 4 2 3 92
1 12 0 388 102 100 38 0 1 2 0 103 3 2 2 93
2 12 0 324 211 210 38 0 1 2 0 101 3 2 2 93
3 12 0 468 150 149 36 0 1 2 0 97 3 2 3 92
# /usr/local/bin/snmpwalk -v 2c -c compliance -m ALL localhost .1.3.6.1.2.1.25.3.3.1.2
HOST-RESOURCES-MIB::hrProcessorLoad.768 = INTEGER: 7
HOST-RESOURCES-MIB::hrProcessorLoad.769 = INTEGER: 14
HOST-RESOURCES-MIB::hrProcessorLoad.770 = INTEGER: 4
HOST-RESOURCES-MIB::hrProcessorLoad.771 = INTEGER: 9

Suggestions?


----------

