What's new

[TEMPMON] HND CPU Temperature Logging

  • 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!

Maverickcdn

Senior Member
Simple HND Router CPU temperature logging

Polls CPU temp at set interval and calculates period average for set logging interval. Records time/date/temp of CPU Alltime High/Low Temps.

To download, scripts must be enabled, from an SSH terminal, copy/paste
Code:
curl --retry 3 "https://raw.githubusercontent.com/maverickcdn/tempmon/master/tempmon.sh" -o "/jffs/scripts/tempmon.sh" && chmod a+rx "/jffs/scripts/tempmon.sh"

To start polling the CPU Temperature and begin automatic logging
Code:
sh /jffs/scripts/tempmon.sh
To manually log currently polled temps (forces new logging period)
Code:
sh /jffs/scripts/tempmon.sh logging

Default install will log every 6 hours with 20s CPU temperature polling. Edit the variables within tempmon.sh to suit your desires. (4 times per/day is less spammy than hourly but better averages than 1 day logging)

Polling monitor does not survive reboots, if you wish to have script run on reboot, call this script with the start polling command in the background within a /jffs/scripts/services-start script
Sass:
sh /jffs/scripts/tempmon.sh &

All time High/Low CPU temps do not survive reboots, they're meant to reflect uptime high/low
Try not to set low poll rates (eg 2sec) with long log periods (eg days) polled temps are saved to /tmp (ram) and unsure how long it would take to run the logging

Github

Happy routing.

V1.10 May 8 2024 Changed the way the output logging looks, added date/time for high/low temps

start.JPG
edit.JPG (use nano and edit these lines in the file for log_interval log_interval_unit and poll_freq)

tempmon logging.jpg

tempmon.jpg
 
Last edited:
Now how do we take this, and turn it into a user page like spdMerlin and have it graph, etc. :)
 
Now how do we take this, and turn it into a user page like spdMerlin and have it graph, etc. :)
One day, although really my unit only fluctuates 4C throughout a day. Maybe users running more CPU intensive tasks see greater fluctuation

I would like to fork out my wicens script into its own Emailer script and then could have this script Email hightemp warnings or something.

I can consult if needed :)
Thats why github is so damn handy, I can just snoop everyone else's (much higher quality) work!


Side note, hit a new low of 36.5C :p
Capture.JPG

How I got so low
 
Was that a bird? Was that a plane?

No!

That was @Jack Yaz!

With JYSSE emblazoned across his shirt! Jack Yaz, Super Scripter Extraordinaire! Fighting mild, text-based scripts everywhere! And making them rock! :D
 
This is a great idea that seemed to stall... (the main threads are still noisy). I was also thinking there might be a CFE version component to why some do and some dont have the issue.

I also have a mesh node - any way to automate and read that one? (maybe even script an ssh sessions to cat out the /proc/sys/.... value

FWIW, My main RT-AC86U routers's CFE is 1.0.0.8 and it wants to run at 86C-90C on 386_1 final with CPU Wait enabled, as it should be. My node is an older, and its CFE is 1.0.0.7. I dont know what temp it is running at, and at this point it probably wouldn't provide value since its in a cold (5C-7C) workshop.
 
FWIW, My main RT-AC86U routers's CFE is 1.0.0.8 and it wants to run at 86C-90C on 386_1 final with CPU Wait enabled, as it should be.
I've now disconnected my fan and the temp has stabilized at 81C; same router, cfe and firmware as you. On .19 I was at 80C, with B4b I was 90 with pwr enabled and 85 without, so it looks like something about .1 has settled things down for me. I noticed this because with the fan on I was 3 degrees cooler than I had been with B4b (57C vs 60C). 81C is fine for me.
 
I just posted earlier this evening that a customer's RT-AC86U was once again at 81C on the 386.1_0 RMerlin code (post got deleted) after a couple of days letting it do whatever work it needed doing, internally.

At another customer with a 2018 RT-AC86U in a slightly cooler location, the temperature is showing 76C.
 
I was mid 70s on 384.19 (and prior on 1.0.0.7) so +/- 10% isnt that crazy, and no saying the WIFI chips arent running hotter as well because of AiMesh2.0 or other under hood changes

I guess if anything you could do the copper mod then have all the windows replaced in your house on a 0C day....

Capture.JPG
 
I've changed tempmon.sh to save ath_log, atl_log, and temp_avg_log to USB, but left temp_log and temp_start_log in the tmp directory to create some persistence on highs/lows and long term averages.....

Foresee any issues with that long term (logging wise or information wise)?
 
Foresee any issues with that long term (logging wise or information wise)?
As long as the USB is never inaccessible it should be fine. If ever it goes to log and it cant read those files (usb not mounted) it just wont display any temps in the logging for ath/atl/and alltime-avg, and if run manually from the command line it will spew a bunch of file creation errors but the script will still calc/log avgs based off the info it can obtain
 
This is my rough idea of what I hope this eventually turns into some day (nudge nudge @Jack Yaz )

Because I'm so familiar with the graphs in spdMerlin, I had the notion that with what Tempmon is putting out there....(and I have mine configured for a 30 minute reporting of temps), from the "mock up", it would display the range of the period it was monitoring, and the average would be indicated within that range. Hovering the mouse over it would display the date / time, and the values of hi/low/average......and then the bottom would have the all time high/lows/average.....and much like the spdmerlin graph, options for date ranges. Probably wouldn't want the fill option for the graphing either. No clue on how to, or if it could easily (ha! relative term) be done....but, it's the image in my head on it's own page.....

Graph.jpg
 
Not sure if anyone is still/wants to use this but I pushed an update with some updates to appearance and better recording of details on high/temps
v1.10 :)
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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

Staff online

Top