aerosense-ai / data-gateway

Data influx for Aerosense.
https://www.aerosense.ai/
Other
3 stars 1 forks source link

Consider adding diagnostics like RPi cpu monitors to the gateway code #75

Open thclark opened 2 years ago

thclark commented 2 years ago

Feature request

There are some CPU frequency and monitoring scripts on the raspberry pi:

cpu_freq.sh

#!/bin/bash
temp=`head -n 1 /sys/class/thermal/thermal_zone0/temp | xargs -I{} awk "BEGIN {printf \"%.2f\n\", {}/1000}"`
echo $((`cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq`/1000)) MHz, $temp degrees

cpu_monitor.sh

while : ; do date; sh cpu_freq.sh; sleep 600; done

Use Case

This will get scrubbed with reinstalls, consider whether that's useful information to have, and if so, add a subprocess to periodically determine (e.g. hourly) and add to results.