Add CPU package temperature to CPU module.

This is done by looking for a specified thermal zone in
/sys/class/thermal/thermal_zone*/ .
Unfortunately there is no better way to find the
temperature, then to check all registered zones.
This still needs to be extended to support other hardware,
right now only x86 CPUs and Raspberry pi are tested.
Maybe the FF_CPU_THERMAL_ZONES array could be user configurable,
but I could not figure out how to add an array as a config parameter.
This commit is contained in:
xzvf
2022-06-15 16:14:46 +02:00
parent ae8b5bde65
commit d8bb36f119
3 changed files with 68 additions and 3 deletions
+2 -1
View File
@@ -236,7 +236,7 @@ static inline void printCommandHelp(const char* command)
}
else if(strcasecmp(command, "cpu-format") == 0)
{
constructAndPrintCommandHelpFormat("cpu", "{2} ({7}) @ {14}GHz", 14,
constructAndPrintCommandHelpFormat("cpu", "{2} ({7}) @ {15}GHz ({8}°C)", 15,
"CPU name",
"Prettified CPU name",
"CPU Vendor name (Vendor ID)",
@@ -244,6 +244,7 @@ static inline void printCommandHelp(const char* command)
"CPU logical core count configured",
"CPU physical core count",
"Always set core count",
"CPU package temperature",
"frequency bios limit",
"frequency scaling max",
"frequency scaling min",