System Lagging Alert, Temperature Alert In Arbitrary Device
Learn how to measure system responsiveness and temperature using Python, set alert thresholds for notifications, and install monitoring software as a daemon on various devices.
The system sometimes feels lagging, less responsive. The only way to fix is to reboot.
Although monitor task completion time is helpful, but not general enough.
Simple hack:
1 | import subprocess |
Lagging related package:
1 | apt install nohang oomd psi-notify |
Temperature monitoring packages:
1 | pip3 install gpustat |
Create temperature statistics (high, low, mean) for all crucial components.
Set alert threshold, only trigger alert if temperature reoccurs for several times.
Send ntfy.sh
notification as well as making audible alerts.
Notification shall specify device name, component name, current temperature, threshold, statistics.
Every device shall be equipped with this software as daemon, be it smartphone, MacBook, Linux PC, Windows PC.