Hello,
I am looking for simple way to write log of signal strength of few or all devices connected to router every 30 second/1 min. Is it possible without much load on system ?
I have below command-
ubus call hostapd.wlan1 get_clients
This gives me lot of information but how do I make this command run every time and generate/overwrite log every 30 mins ?
I'm not super familiar with that command but you could try something like this: (If you want the log file to be overwritten instead of append the logs then change line 9 ">>" to ">")
#!/bin.sh
## CONFIG
log_file="/var/logs/client_log.txt" # log file location
interval_minutes=30 # 30 minutes
### START OF SCRIPT
while true; do
ubus call hostapd.wlan1 get_clients >> "$log_file"
sleep "$interval_minutes"m
done &
### END OF SCRIPT