A collection of scripts that monitor hardware metrics, including CPU load, temperature, RAM/SWAP usage, and optionally, NVIDIA GPU usage (using nvidia-smi). Data is temporarily stored and shared privately through a Dockerized Telegram API call written in Python.
Require two configuration files. The file .config contains a single int specifying the thermal zone where CPU temperature is collected. For x86 architectures, this information can be retrieved by inspecting which sensor has type x86_pkg_temp after running
cat /sys/class/thermal/thermal_zone*/typeand save its value in .config. The file secrets.json contains the Telegram ChatID and Bot API used by data2api.py, with template
{
"chatID": "-12345",
"token": "12345:ABCDE"
}For instruction on creating and maintaining a Telegram Bot, check BotFather. For security implications, never commit secrets.json.
The telemetry script (Bash) can natively run on the system. The Telegram communication (Python) is containerized in rootless Docker by first running ./build.sh. Start collecting data by running
./telemetry.sh [OPTIONS]
# [OPTIONS]
# -t, --timestep <seconds> Set the timestep in seconds (default: 30)
# --nogpu Disable GPU monitoringThe repository has the following structure
build.sh # Builds the Docker image
requirements.txt # Python dependencies
data2api.py # Data analysis and Telegram API call (containerized)
telemetry.sh # Metrics collection and container call