hjelev / rpi-mqtt-monitor

Raspberry Pi MQTT Monitor gathers system information and sends it to a MQTT server.
GNU General Public License v3.0
176 stars 42 forks source link

Fix division by zero error when no Swap available #92

Closed sunsided closed 5 months ago

sunsided commented 7 months ago

This adds a check to the awk command that prevents divisions by zero.

Addresses (parts of) the following issues:

Tested on Alpine 3.19.1 on a Raspberry Pi 5.