Started network monitoring docu
This commit is contained in:
parent
64ad0e8c10
commit
35ad02beb0
1 changed files with 14 additions and 0 deletions
14
docs/home-network/admin/monitoring.md
Normal file
14
docs/home-network/admin/monitoring.md
Normal 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
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue