What's new

System temperature(s) available via SNMP?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Is there a system temperature OID that's exposed on current Merlin releases? Specifically wondering about AC68U/AC68P.

I don't think Asus exposed them, because they aren't normally available to end users either.
 
I used to have an entry in the snmp.conf on the router to have it fire up following script temp.sh:

Code:
#!/bin/ash
wl -i eth1 phy_tempsense | awk '{print $1}'
wl -i eth2 phy_tempsense | awk '{print $1}'

then in snmpd.conf:
Code:
exec .1.3.6.1.4.1.2021.99 temp /bin/ash /tmp/mnt/sharkoon/scripts/temp.sh

so if you snmpwalk to the oid .1.3.6.1.4.1.2021.99 you should get the temperatures back of the wifi cards. Since I do not monitor things anymore I don't have it in place anymore but it used to work
 
I used to have an entry in the snmp.conf on the router to have it fire up following script temp.sh:

Code:
#!/bin/ash
wl -i eth1 phy_tempsense | awk '{print $1}'
wl -i eth2 phy_tempsense | awk '{print $1}'

then in snmpd.conf:
Code:
exec .1.3.6.1.4.1.2021.99 temp /bin/ash /tmp/mnt/sharkoon/scripts/temp.sh

so if you snmpwalk to the oid .1.3.6.1.4.1.2021.99 you should get the temperatures back of the wifi cards. Since I do not monitor things anymore I don't have it in place anymore but it used to work
Your post is a few years old at this stage, but it pointed me in the right direction, so many thanks for that! :)

In case anyone else comes across this thread looking for a working approach to this topic (as I have), below is my updated script that works on the current version of the fw (386.1_2) on an RT-AX86U.
Bash:
#!/bin/ash

# CPU Temperature with mC->C calculation performed
cat /sys/class/thermal/thermal_zone0/temp | awk '{print $1 / 1000}'

# Wireless Temperature command with calculations performed (eth6: 2.4GHz, eth7: 5GHz)
wl -i eth6 phy_tempsense | awk '{print $1 / 2 + 20}'
wl -i eth7 phy_tempsense | awk '{print $1 / 2 + 20}'

One more thing: I've taken advantage of the custom config files functionality to append the /tmp/snmpd.conf file, as it gets dynamically generated during every boot sequence.
 
Your post is a few years old at this stage, but it pointed me in the right direction, so many thanks for that! :)

In case anyone else comes across this thread looking for a working approach to this topic (as I have), below is my updated script that works on the current version of the fw (386.1_2) on an RT-AX86U.
Bash:
#!/bin/ash

# CPU Temperature with mC->C calculation performed
cat /sys/class/thermal/thermal_zone0/temp | awk '{print $1 / 1000}'

# Wireless Temperature command with calculations performed (eth6: 2.4GHz, eth7: 5GHz)
wl -i eth6 phy_tempsense | awk '{print $1 / 2 + 20}'
wl -i eth7 phy_tempsense | awk '{print $1 / 2 + 20}'

One more thing: I've taken advantage of the custom config files functionality to append the /tmp/snmpd.conf file, as it gets dynamically generated during every boot sequence.
How do you determine what eth interface you use for the 2 WiFi bands? I think mine might be different from yours.
 
Is there a system temperature OID that's exposed on current Merlin releases? Specifically wondering about AC68U/AC68P.

I've seen the Asus MIBs here, but these just contain system configuration related entries:

https://github.com/RMerl/asuswrt-me...router/net-snmp-5.7.2/agent/mibgroup/asus-mib

Thanks.
I decided to remove the top cover on my 86U. I mounted the router on a stand with the top cover removed. I use a temperature gun to keep track of temps. When it gets cold, I point the router towards me as a space heater.
 
Try this:
Code:
# nvram get wl_ifnames
eth1 eth2
Ah, good to know.
I took a much more low-tech approach of running the command for all the interfaces starting with eth1 and matching up the results with what I was seeing in the Temperature tab in the GUI. :)

Relatedly, I've been picking up some nvram commands from various posts and I'm wondering, is there a good place of reference for these, a place that lists and describes all of them (or at least the most useful ones)?
 
Relatedly, I've been picking up some nvram commands from various posts and I'm wondering, is there a good place of reference for these, a place that lists and describes all of them (or at least the most useful ones)?
There's no real documentation for the nvram variables. You have to work it out from forum posts and/or looking at the source code.

Another thing you can do if you vaguely know what you're looking for is to search through all of the nvram variables and make an educated guess. So for example, if you want to see all the variables that contain "eth2" you could do this:
Code:
# nvram show | sort | grep "eth2"
size: 57857 bytes (7679 left)
acs_ifnames=eth2
lan_ifnames=vlan1 eth1 eth2 wl0.1
wl1_ifname=eth2
wl_ifname=eth2
wl_ifnames=eth1 eth2
 
There's no real documentation for the nvram variables. You have to work it out from forum posts and/or looking at the source code.

Another thing you can do if you vaguely know what you're looking for is to search through all of the nvram variables and make an educated guess. So for example, if you want to see all the variables that contain "eth2" you could do this:
Code:
# nvram show | sort | grep "eth2"
size: 57857 bytes (7679 left)
acs_ifnames=eth2
lan_ifnames=vlan1 eth1 eth2 wl0.1
wl1_ifname=eth2
wl_ifname=eth2
wl_ifnames=eth1 eth2
Thanks for the great tip!
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top