anaelorlinski / OpenWrt-NanoPi-R2S-R4S-Builds

OpenWRT Builds for NanoPi R2S & R4S from official Openwrt source code with minimal set of patches
MIT License
170 stars 57 forks source link

No thermal zone for monitoring? #6

Closed mercyground closed 2 years ago

mercyground commented 2 years ago

Tried enabling thermal monitoring with collectd and also manually pulling via a script but interfaces don't exist?

https://github.com/friendlyarm/cpu-temperature-test-script

./capture_cpufreq_and_temp.sh: line 14: can't open /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq: no such file
./capture_cpufreq_and_temp.sh: line 18: can't open /sys/class/thermal/thermal_zone0/temp: no such file

include script

#!/bin/bash

rm -f /tmp/cpufreq.txt
rm -f /tmp/cpu_temperature.txt

for j in $(seq $(grep -c processor /proc/cpuinfo))
do
    dd if=/dev/zero of=/dev/null bs=1 &
done 

ps | grep dd > /tmp/cpufan_testing_started
for i in {1..1800}
do
    awk '{printf ("%0.0f\n",$1/1000); }' </sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq >> /tmp/cpufan_testing_cpu-freq.txt
    if [ -f /sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq ]; then
        awk '{printf ("%0.0f\n",$1/1000); }' </sys/devices/system/cpu/cpu4/cpufreq/cpuinfo_cur_freq >> /tmp/cpufan_testing_cpu4-freq.txt
    fi
    awk '{printf ("%0.1f\n",$1/1000); }' </sys/class/thermal/thermal_zone0/temp >> /tmp/cpufan_testing_cpu-temperature.txt
    sleep 1
done
ps | grep dd > /tmp/cpufan_testing_done

for dd in $(jobs -p) ; do kill ${dd} ; done
anaelorlinski commented 2 years ago

r2s or r4s ? which build ?

mercyground commented 2 years ago

OpenWrt-AO-21.02-20211005.1342-NanoPi-r4s-ext4-full.img

latest build for r4s.

anaelorlinski commented 2 years ago

I upgraded to latest version on my side and it works ...

BusyBox v1.33.1 (2021-10-02 15:41:59 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 21.02-SNAPSHOT, r16299-76d90a5eaf
 -----------------------------------------------------

AO Build@2021.10.05

root@Router2102:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
600000
root@Router2102:~# cat /sys/class/thermal/thermal_zone0/temp
47500
root@Router2102:~#
mercyground commented 2 years ago

Well... how bizzare.

I turned it on this morning and did the same.

Only thing i can think of is that i'd not rebooted from its initial boot. unsure if that would have made a difference but its definately working now. Sorry about that!

BusyBox v1.33.1 (2021-10-02 15:41:59 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 21.02-SNAPSHOT, r16302-9b258f220f
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# [   31.708166] vbus_typec: disabling

root@OpenWrt:/# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
1008000
root@OpenWrt:/# cat /sys/class/thermal/thermal_zone0/temp
39375