See https://www.Raspberrypi.com/documentation/computers/os.html#vcgencmd and man vcgencmd
vcgencmd get_throttled if hex 0 then ok, otherwise check the manual
vcgencmd measure_temp
vcgencmd measure_clock arm