mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-22 03:02:35 +00:00
Extends temperature monitoring to collect SMART temps for SATA/SAS disks, addressing issue #652 where physical disk temperatures showed as empty. Architecture: - Deploys pulse-sensor-wrapper.sh as SSH forced command on Proxmox nodes - Wrapper collects both CPU/GPU temps (sensors -j) and disk temps (smartctl) - Implements 30-min cache with background refresh to avoid performance impact - Uses smartctl -n standby,after to skip sleeping drives without waking them - Returns unified JSON: {sensors: {...}, smart: [...]} Backend changes: - Add DiskTemp model with device, serial, WWN, temperature, lastUpdated - Extend Temperature model with SMART []DiskTemp field and HasSMART flag - Add WWN field to PhysicalDisk for reliable disk matching - Update parseSensorsJSON to handle both legacy and new wrapper formats - Rewrite mergeNVMeTempsIntoDisks to match SMART temps by WWN → serial → devpath - Preserve legacy NVMe temperature support for backward compatibility Performance considerations: - SMART data cached for 30 minutes per node to avoid excessive smartctl calls - Background refresh prevents blocking temperature requests - Respects drive standby state to avoid spinning up idle arrays - Staggered disk scanning with 0.1s delay to avoid saturating SATA controllers Install script: - Deploys wrapper to /usr/local/bin/pulse-sensor-wrapper.sh - Updates SSH forced command from "sensors -j" to wrapper script - Backward compatible - falls back to direct sensors output if wrapper missing Testing note: - Requires real hardware with smartmontools installed for full functionality - Empty smart array returned gracefully when smartctl unavailable - Legacy sensor-only nodes continue working without changes |
||
|---|---|---|
| .. | ||
| dev | ||
| lib | ||
| systemd | ||
| tests | ||
| .go-version | ||
| backup-claude-md.sh | ||
| build-release.sh | ||
| bundle.manifest | ||
| bundle.sh | ||
| clean-mock-alerts.sh | ||
| cleanup.sh | ||
| codex-router.sh | ||
| create-sensor-user.sh | ||
| docker-build.sh | ||
| harden-sensor-proxy.sh | ||
| hot-dev.sh | ||
| install-container-agent.sh | ||
| install-docker-agent-v2.sh | ||
| install-docker-agent.sh | ||
| install-docker.sh | ||
| install-go-toolchain.sh | ||
| install-host-agent.ps1 | ||
| install-host-agent.sh | ||
| install-sensor-proxy.sh | ||
| package-helm-chart.sh | ||
| pulse-auto-update.sh | ||
| pulse-proxy-rotate-keys.sh | ||
| pulse-sensor-cleanup.sh | ||
| pulse-sensor-proxy.service | ||
| run-tests-mock.sh | ||
| secure-sensor-files.sh | ||
| setup-log-forwarding.sh | ||
| sync-production-config.sh | ||
| test-vm-disk.sh | ||
| toggle-mock.sh | ||
| uninstall-host-agent.ps1 | ||
| uninstall-host-agent.sh | ||
| validate-release.sh | ||