Started network monitoring docu

This commit is contained in:
Brad Treloar 2024-12-26 01:17:55 +10:30
parent 64ad0e8c10
commit 35ad02beb0

View file

@ -0,0 +1,14 @@
# Network monitoring
Discover all devices connected to the local network:
```bash
#!/bin/bash
subnet="192.168.0"
for suffix in $(seq 101 199); do
ip_address="$subnet.$suffix"
# Only wait 1 second for each response: ping should only take a few
# milliseconds on LAN.
ping -c 1 -W 1 $ip_address | grep "64 bytes from $ip_address" | awk '{ print $4 }' | sed s/://
done
```