#!/bin/sh # # interfacestat - List parameters of network interfaces. Ver 1.0. # # This prints the values from ndd. # # 24-Jun-2003 Brendan Gregg Created this mini script. Interfaces=`netstat -i | awk '$1 !~ /^(Name|lo0)$/ { if ($1) print $1 }'` for i in $Interfaces do set -- `echo $i | sed 's/\([0-9]*\)$/ \1/` type=$1; num=$2 echo "Interface $i," /usr/sbin/ndd -set /dev/$type instance $num Params=`ndd -get /dev/$type \? | awk '$1 != "?" { print $1}'` for p in $Params do echo " $p: \c" ndd -get /dev/$type $p done done