How to monitor the Windows CPU and fan temperature by SNMP or other ways

advertisements

I want to monitor 3 kinds of data for windows machines: cpu temperature, fan temperature
and fan speed, retrieving these data every 5 minutes. If these data can be retrieved by SNMP, that's my first choice.

I am wondering whether these data's root data source comes from Microsoft or the vendor of the motherboard. If they come from Microsoft, their OID should starts with 1.3.6.1.4.1.311, if they come from motherboard vendor, their OID should starts with 1.3.6.1.4.1.[motherboard vendor private snmp vendor OID], for example 1.3.6.1.4.1.11 for a HP server machine, 11 represents HP's private snmp vendor OID.


If you simply want to know how to query a Windows machine for the relevant SNMP data, this is possibly not the right site to ask this question on as it is a site for Q&A specific to software development. You may have better success asking at Server-Fault - here is a similar question to yours on there.

The OIDs for hardware specific SNMP monitoring are usually vendor specific. Typically you would need the Management Information Base (MIB) files that apply to your specific hardware in order to extract the information about which OIDs pertain to the data you require - as far as I know, CPU and Fan temperature are not generic SNMP properties.

If you cannot find the MIBs for your hardware sets (or there is no SNMP agent for your specific hardware), there is a piece of Windows software called SpeedFan that has an SNMP plugin that allows you to monitor the CPU and fan temperatures via SNMP. However this would require the Speedfan software to run in the background on all machines you wish to monitor. The OIDs for the SpeedFan software SNMP plugin are:

Temperature: .1.3.6.1.4.1.30503.1.5.x
Fans:        .1.3.6.1.4.1.30503.1.6.x
Voltages:    .1.3.6.1.4.1.30503.1.7.x

To get started monitoring this SNMP data on a Windows client machine you typically would need to:

  1. install SNMP agent service
  2. configure the SNMP service
  3. Install speedfan
  4. Install the Speedfan SNMP plugin
  5. determine which OIDs are pertinent to your hardware (either using SpeedFan or vendor specific MIBs)
  6. use an SNMP tool to perform an SNMP walk or an SNMP get to fetch the relevant SNMP data.

Using the command-line tool netsnmp you can walk the SNMP tree like so:

snmpwalk -v 2c -c public 127.0.0.1 .1.3.6.1.4.1.30503.1.5

(Assuming that your community string is "public" and you want to walk the "SpeedFan termperatures" sub-tree of your machine in this example).

A handy client tool with a gui for viewing snmp data is mibbrowser

The linked to Server-Fault Q&A has other useful information and links to various SNMP monitoring software solutions such as nagios, opennms etc.