This repository has been archived on 2025-12-23. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2025IoT-project-ThingsBoard/scripts/memory_used.sh
2025-12-19 19:53:45 +01:00

8 lines
235 B
Bash
Executable file

#!/bin/bash
while true; do
mem_used=$(free -m | grep 'Mem' | awk '{print $3}')
curl -s -X POST http://localhost:8080/api/v1/$KEY/telemetry --header Content-Type:application/json --data "{mem_used:$mem_used}"
sleep 1
done