Reading out the Temperature

  • Hi,

    i use mrtg to track my traffic.
    is it possible to read the temp via snmp as well?
    Thank you!

  • Hi Renegade,

    I am just going through the same snmp config.

    I did a snmpwalk on my pfsense box and found this, hopefully when i convert this into an OID it will return the temps..

    HOST-RESOURCES-MIB::hrDeviceDescr.104 = STRING: amdtemp0: AMD CPU On-Die Thermal Sensors

    Hope this helps,


  • Hello Nick and Renegade

    Did you ever find the temperature reading in any OID? I need to setup monitor and looking for a way to get the values in an OID.

  • Rebel Alliance Developer Netgate

    Use the NET-SNMP package. On the Host Information tab, setup an Extended Command:

    • Type: extend
    • Name: gettemps
    • Program: /root/

    Then in /root/, put:

    /sbin/sysctl dev.cpu | /usr/bin/awk '/temperature/ {print $2;}'

    Set it executable, and then use the line-by-line extended OID to access it:

    : snmpwalk -c mycommunity -v 2c nsExtendOutLine.\"gettemps\"
    NET-SNMP-EXTEND-MIB::nsExtendOutLine."gettemps".1 = STRING: 42.0C
    NET-SNMP-EXTEND-MIB::nsExtendOutLine."gettemps".2 = STRING: 42.0C
    NET-SNMP-EXTEND-MIB::nsExtendOutLine."gettemps".3 = STRING: 41.0C
    NET-SNMP-EXTEND-MIB::nsExtendOutLine."gettemps".4 = STRING: 42.0C

Log in to reply