#!/bin/sh # R3A passive observer (480s side only): ping 172.16.42.1 every ~3 s, log host NCM IPv4 presence. Sends nothing else to the board. O=$1 while :; do t=$(date +%H:%M:%S.%3N) h=$(ip -4 -o addr | awk "/172\.16\.42\.2\//{print \$2}") if ping -c1 -W2 172.16.42.1 >/dev/null 2>&1; then p=OK; else p=--; fi echo "$t ping=$p host_if=${h:-none}" >> $O sleep 1 done