A lightweight hardware monitoring utility written in Go that tracks CPU temperature and reports its status.
HRDWSTATUS reads CPU temperature data from the Linux hwmon system interface and categorizes temperatures into three levels:
- LOW: Temperature ≤ 25°C
- OK: Temperature between 26°C and 59°C
- HIGH: Temperature ≥ 60°C
The application is designed to be simple and efficient, with minimal resource usage.
- Real-time CPU temperature monitoring
- Temperature status categorization
- Structured logging using Go's slog package
- Easy to run as a daemon service
- Go 1.20 or later
- Linux-based operating system with access to
/sys/class/hwmon/
git clone https://github.com/yourusername/hrdwstatus.git
cd hrdwstatus
go build./hrdwstatusThe project includes a systemd service file (hrdwstsd.service) that can be used to run HRDWSTATUS as a daemon:
-
Copy the service file to the systemd directory:
sudo cp hrdwstsd.service /etc/systemd/system/
-
Reload systemd:
sudo systemctl daemon-reload
-
Enable and start the service:
sudo systemctl enable hrdwstsd.service sudo systemctl start hrdwstsd.service
HRDWSTATUS can be deployed in an Incus container for testing or production use:
- Create an Incus container
- Install the application inside the container
- Set up the daemon using the provided hrdwstsd.service file
HRDWSTATUS/
├── cmd/
│ └── main.go # Main application entry point
├── deamon/
│ └── hrdwstsd.service # Systemd service file for running as daemon
├── go.mod # Go module definition
├── go.sum # Go module checksums
└── readme.md # This file
- Currently only detects AMD CPUs with the "k10temp" sensor
- Limited to Linux systems with access to
/sys/class/hwmon/
- Add support for more CPU types
- Include GPU temperature monitoring
- Implement real-time alerts for prolonged high temperatures
- Add configuration file for customizing temperature thresholds
[Insert your chosen license here]
Contributions are welcome! Please feel free to submit a Pull Request.