plot/statistics of the processor
Posted: Tue Mar 31, 2020 6:48 pm
Hello, How can I get a plot of the performance of the processor of raspberry pi over the time? I want to export the data to a .csv file so that I can process the data...
A small, affordable computer with free resources to help people learn, make things, and have fun
https://www.raspberrypi.org/forums/
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=269535
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=!
Not sure why it's called bcmstat.sh as it's a python program. Being python should make writing output as CSV even easier.