#!/bin/ksh # 2004-01-20 Tom Kranz (tom@siliconbunny.com) # This script is distributed under the GNU Public License (GPL) with the # following extra conditions: # - attritbution must be maintained # - CD-ROM or similar media for commercial distribution without the prior # approval of the author # This script is a nice wrapper for kstat, giving us some nice output about # settings for a specified nic and instance # Make sure we got our command line args if [[ ${1} == "" ]] || [[ ${2} == "" ]] then echo "" echo "Usage:" echo "kstat_check.ksh " echo "" echo "eg. kstat_check.ksh ce 0" echo "" exit 1 fi # Path to kstat KSTAT=/usr/bin/kstat echo "" # What is possible with this nic instance? echo "Port capabilities for ${1} instance ${2}" ${KSTAT} -p ${1}:${2}::"/^cap_/" echo "" # What is actually set for this nic instance? echo "Current settings in effect for ${1} instance ${2}" ${KSTAT} -p ${1}:${2}::"/^link_/" echo "" # What can our link partner do? echo "Link partner capabilities for ${1} instance ${2}" ${KSTAT} -p ${1}:${2}::"/^lp_cap_/" echo "" exit 0