[Oct 09] Stock Android 7.1.2 (20180921) - RockPro64 | [Sept 25] KDE Neon (20180917) - Pinebook / Slackware Aarch64 Miniroot (20180901) - ROCK64 | [Aug 6] Debian Stretch Minimal 64bit (0.7.8) / Ubuntu 18.04 Bionic LXDE Desktop Image (0.7.8) / Ubuntu 18.04 Bionic minimal 64bit / 32bit Image (0.7.8) / Ubuntu 18.04 Bionic Containers Image (0.7.8) / Stretch OpenMediaVault OS Image armhf / Stretch OpenMediaVault OS Image arm64 ( 0.7.8) - ROCK64

Project Inspiration | Get Started | IRC Logs | Forum Rules/Policy


rock64_health.sh
#1
Hello,
  I hated it to type sudo everytime for the simple rock64_health.sh-command, so I did some shell-voodoo to get the needed values from /sys without uid=0.
I was always interested in the gpu-temperature, too and with rockpro64 the frequency and governor of the A53/A72 cores. So I pimped the script further and got the attached one.
It should work on rock64 and 4.1x.x, too, but I have not tested it yet. Can some good soul can me give feedback on this?

Works like this:
Code:
$ rock64_health.sh
CPU count      : 6  
CPU 0-3
 freq         : 600.00 MHz
 gov          : ondemand  
CPU 4-5
 freq         : 408.00 MHz
 gov          : ondemand  
SOC Temp       : 26.88 C
GPU Temp       : 27.50 C



TIA,
hunderteins


Attached Files
.txt   rock64_health.sh.txt (Size: 1,016 bytes / Downloads: 17)
Reply
#2
I on my rockpro use a script:

Code:
#!/bin/sh

while true :
do
 now=$(date "+%F,%H:%M:%S")
 temp1=$(cat /sys/class/thermal/thermal_zone0/temp)
 temp2=$(cat /sys/class/thermal/thermal_zone1/temp)
 freq0=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)
 freq1=$(cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq)
 freq2=$(cat /sys/devices/system/cpu/cpu2/cpufreq/scaling_cur_freq)
 freq3=$(cat /sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq)
 freq4=$(cat /sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq)
 freq5=$(cat /sys/devices/system/cpu/cpu5/cpufreq/scaling_cur_freq)
 pwm1=$(cat /sys/class/hwmon/hwmon0/pwm1)
 echo $now,$(( freq0 /1000 )),$(( freq1 /1000 )),$(( freq2 /1000 )),$(( freq3 /1000 )),$(( freq4 /1000 )),$(( freq5 /1000 )),$(( temp1 / 1000 )),$(( temp2 / 1000 )),$(( pwm1 )) >> /var/log/temperature.log
 sleep 5
done

running a script from /etc/rc.local
The result of the log can be found here.
____________________________________________________________________________________________________________________________________________________________
my SOHO NAS RockPro64 4GB v2.1 / eMMC 32GB / PCIe -> SATA / 2*SATA HDD 3.5" 4TB + 2.5" 750GB / SD-card 64 GB / NAS Casing / image Debian Stretch Minimal / Kernel 4.4.xxx ayufan
my Multimedia desktops: ODROIDs -XU4, -XU3, -C2, -C1;
my trash BananaPi; RPi B, B+; ODROID-W
Reply
#3
I run gkrellm from my startup scripts - from a generation that cant cope unless I can see the lights flashing Big Grin 
   
ROCKPro64 v2.1 2GB, SM961 128GB NVMe for rootfs, HDMI video & sound, Bluetooth keyboard & mouse
Started Bionic minimal - now Cosmic, Openbox desktop for general purpose daily PC.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)