user@devops:~$ cat README.md
Thermal Watch
# Description
Thermal Watch (cpp-thermal-watch) is a Linux thermal monitor written in C++23 that reads /sys/class/thermal/thermal_zone*/{temp,type,policy} (temperature in millidegrees, 45000 = 45.0 C), cooling devices /sys/class/thermal/cooling_device*/{type,max_state,cur_state} with throttle percentage (cur/max) and a progress bar with traffic light (red >=80%, yellow >=50%), and per-core frequency/governor from /sys/devices/system/cpu/cpu*/cpufreq/ (scaling_governor, scaling_cur_freq, scaling_max_freq in GHz). Temperature colors: green <60 C, yellow 60-threshold, red >=threshold (default 80 C, adjustable with --threshold N). Live watch mode every N seconds (--watch N) with screen clear and flush (complete output even under timeout/kill), full JSON output for scripting (--json) with {zones[], cooling_devices[], cpus[], summary} structure, graceful handling of systems without thermal sensors (VMs/containers: explicit message, no crash), ANSI colors (--no-color) and 16 self-verification tests (--selftest) validating synthetic millidegree parsing, throttle math, bars, formatting and smoke tests against real sysfs. Zero dependencies: direct build with g++ -std=c++23.
# Key features
$ Thermal zones from /sys/class/thermal/thermal_zone*/{temp,type,policy}: temperature in C (millidegrees 45000 -> 45.0), sensor type (x86_pkg_temp, acpitz) and policy (step_wise, user_space)
$ Temperature colors: green <60 C, yellow 60-threshold, red >=threshold (default 80 C, adjustable with --threshold N)
$ Cooling devices from /sys/class/thermal/cooling_device*/{type,max_state,cur_state}: throttle % (cur/max) with progress bar and traffic light (red >=80%, yellow >=50%)
$ CPU frequency from cpufreq: governor (powersave, performance), current and max frequency per core in GHz
$ Live watch mode every N seconds (--watch N) with screen clear and flush for complete output under timeout/kill
$ Full JSON output for scripting (--json): zones[], cooling_devices[], cpus[] and summary with max_temp
$ Graceful handling of systems without thermal sensors (VMs/containers): explicit message, no crash
$ 16 self-verification tests (--selftest): synthetic millidegree parsing, throttle, bars, formatting and smoke tests against real sysfs
# Gallery
# Technologies used