/sbc_temperature_monitor

collection of temperature monitoring and stress notes/tools for SBCs like (Linux) ARM based Raspberry Pi and Rock64. Log and graph/plot temperatures over time

Primary LanguagePythonApache License 2.0Apache-2.0

sbc_temperature_monitor

collection of temperature monitoring and stress notes/tools for SBCs like (Linux) ARM based Raspberry Pi and Rock64

Tools

  • speedtemp.sh - (bash) shell script for monitoring CPU speed and temperature (on Raspberry Pi also includes throttling information). Relies on; vcgencmd, perl, awk, sed
  • stressmon.py - Python 2 or 3 with no external module dependecies to run stress and monitor temperature usage - essentially a portable/light weight version of stressberry-plot. Requires stress, and will use vcgencmd if available. Generates json log files suitable for stress_plot.py (below). Runs for 10 mins by default (configurable)
    • TODO log throttling information is available
    • TODO allow monitor only mode without stress
    • TODO alow alternative stress tools
    • TODO Update output with more status information (e.g. currently idling/testing, along with time-progress (to help determine finish time) to avoid scrolling back
  • stress_plot.py - python (2 or 3) script for plotting multiple json files that contain temperature readings. Generates an interactive SVG (using https://github.com/Kozea/pygal/)

Running

stress_plot.py needs pygal:

pip install pygal


./stressmon.py pi3_py2.json  # needs vcgencmd (i.e. Raspbian for Raspberry Pi)

python stressmon.py  -t /sys/class/thermal/thermal_zone0/temp -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq --cooldown 0 -n 'rock64_armbian_pi_box_lid_fan_on' rock64_armbian_pi_box_lid_fan_on.json  # should work for more devices/processors under Linux with default CPU info, e.g. armbian, DietPi, x86 Ubuntu

env PYTHONIOENCODING=utf-8 python stressmon.py  -t /sys/class/thermal/thermal_zone0/temp -f /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq --cooldown 0 -n 'rock64_armbian_pi_box_lid_fan_on' rock64_armbian_pi_box_lid_fan_on.json


./stress_plot.py | gzip > demo.svgz

Useful resources