# CPU Temperature Data Format (from nvidia-gpu-monitor) The monitor script has been extended to write CPU temperatures alongside GPU data. ## cpu.txt (added by cockpit-custom-packages SKILL.md user session) Written by the same systemd service (`nvidia-gpu-monitor`) that writes GPU data, every 5 seconds. ``` 48,43,46 ``` Comma-separated integers (no spaces): | Index | Sensor | Source | Notes | |-------|--------|--------|-------| | 0 | CPU Package | `/sys/class/thermal/thermal_zone3/temp` | Main CPU temp, integer °C | | 1 | PCH | `/sys/class/thermal/thermal_zone2/temp` | Platform Controller Hub temp | | 2 | ACPI | `/sys/class/thermal/thermal_zone0/temp` | ACPI zone temp | **Parsing**: `data.trim().split(',')` gives a 3-element array. Check `s.length >= 3` before accessing. **Reading from shell**: `cat /sys/class/thermal/thermal_zone3/temp` returns millidegrees (e.g. `48000` = 48°C). Divide by 1000 for °C. ## Adding to the monitor script Insert this block before the `sleep 5` in the monitor loop: ```bash # CPU temps pkg=$(cat /sys/class/thermal/thermal_zone3/temp 2>/dev/null || echo 0) pch=$(cat /sys/class/thermal/thermal_zone2/temp 2>/dev/null || echo 0) acpi=$(cat /sys/class/thermal/thermal_zone0/temp 2>/dev/null || echo 0) echo "$((pkg/1000)),$((pch/1000)),$((acpi/1000))" > /usr/share/cockpit/nvidia-gpu/cpu.txt ``` ## Adding a CPU Card to the Dashboard Use the `accent-cyan` color class to distinguish from GPU cards: ```css .card.accent-cyan{border-top:3px solid #06b6d4} ``` HTML pattern (compact, big-temp + mini stats): ```html