If I have already known the client IP, I know there's /var/log/dnsmasq.log
and it contains logs such as
Jun 13 12:22:42 dnsmasq-dhcp[499]: DHCPACK(wlan0) 172.24.1.110 34:12:98:11:80:bd ones-iPad
Jun 13 13:19:44 dnsmasq-dhcp[499]: DHCPDISCOVER(wlan0) d4:97:32:61:4f:73
Jun 13 13:19:44 dnsmasq-dhcp[499]: DHCPOFFER(wlan0) 172.24.1.82 d4:97:0b:61:4f:23
Jun 13 13:19:44 dnsmasq-dhcp[499]: DHCPREQUEST(wlan0) 172.24.1.82 d4:97:9f:61:4f:73
Jun 13 13:19:44 dnsmasq-dhcp[499]: DHCPACK(wlan0) 172.24.1.82 d4:97:0b:23:4f:73 android-ef9f423f7ecaca3c
In router
In this way, we can parse the log every time to see the latest MAC address.
But can we know what the client mac without parsing this long big file every time. It drags down CPU.
Thank you!
updated
I found another place containing it
cat /var/lib/misc/dnsmasq.leases
Still it's a file. Or I have to parse the file every time?