Take a look at vmstat (see "man vmstat" for info).
Code: Select all
#!/bin/bash
Counter=14
DisplayHeader="Time Temp CPU Core Health Vcore"
while true ; do
let ++Counter
if [ ${Counter} -eq 15 ]; then
echo -e "${DisplayHeader}"
Counter=0
fi
Health=$(perl -e "printf \"%19b\n\", $(vcgencmd get_throttled | cut -f2 -d=)")
Temp=$(vcgencmd measure_temp | cut -f2 -d=)
Clockspeed=$(vcgencmd measure_clock arm | awk -F"=" '{printf ("%0.0f",$2/1000000); }' )
Corespeed=$(vcgencmd measure_clock core | awk -F"=" '{printf ("%0.0f",$2/1000000); }' )
CoreVolt=$(vcgencmd measure_volts | cut -f2 -d= | sed 's/000//')
echo -e "$(date '+%H:%M:%S') ${Temp} $(printf '%4s' ${Clockspeed})MHz $(printf '%4s' ${Corespeed})MHz $(printf '%020u' ${Health}) ${CoreVolt}"
sleep 10
done
Of course it runs!
nice!, its even showing gpu mem, so you can tell if you have too much or too little gpu_mem=!
bcmstat looks like a shell script, as is the script I showed above.
Not sure why it's called bcmstat.sh as it's a python program. Being python should make writing output as CSV even easier.