At least on RPi it would be useful to know the temperature and throttling status.
One way to do it would be the vcgencmd
$ vcgencmd measure_temp
temp=54.0'C
$ vcgencmd get_throttled
throttled=0x0
get_throttled
get_throttled
Returns the throttled state of the system. This is a bit pattern - a bit being set indicates the following meanings:
Bit Meaning
──── ────────────────────────────────────
0 Under-voltage detected
1 Arm frequency capped
2 Currently throttled
3 Soft temperature limit active
16 Under-voltage has occurred
17 Arm frequency capping has occurred
18 Throttling has occurred
19 Soft temperature limit has occurred
A value of zero indicates that none of the above conditions is true.
To find if one of these bits has been set, convert the value returned to binary, then number each bit along the top. You can then see which bits are set. For example:
0x50000 = 0101 0000 0000 0000 0000
Adding the bit numbers along the top we get:
19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
From this we can see that bits 18 and 16 are set, indicating that the Pi has previously been throttled due to under-voltage, but is not currently throttled for any reason.