hjelev / rpi-mqtt-monitor

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

check_memory fails if system language is different than EN #126

Closed rafalkalinski closed 1 month ago

rafalkalinski commented 4 months ago

I had system messages in Polish (because I choose pl_PL during installation) and free is generating something like:

                razem       użyte       wolne    dzielone   buf/cache    dostępne
Pamięć:     944092      115280      185976        4816      642836      758460
Wymiana:      102396       34816       67580

And finally check_memory is not able to find what it's looking for.

I switched to en_GB (removing PL entirely) and it works.

Installed rpi-mqtt-monitor version: 0.9.3

rafalkalinski commented 4 months ago

ChatGPT says:

LC_ALL=C free | grep -i mem | awk 'NR == 1 {print $3/$2*100}'

should do the trick. The hack for German wound not be needed anymore. Briefly checking - it works.

hjelev commented 1 month ago

This is fixed in version 0.9.5