#!/bin/ksh
#
# Script to terminate the network tests started by start_net
#

DIAGDIR=${DIAGDIR:-/usr/diags/os/scripts}
LOGDIR=${LOGDIR:-/usr/tmp}
OSLOG=$LOGDIR/ostests.log

#
# Shut down network tests
#
killall netstress
killall runttcp
killall ttcp

#
# Parse the scripts
#
for DEVICE in fxp ipg hip; do
	ls $LOGDIR/net-$DEVICE.* > /dev/null 2>&1
	if [[ $? -eq 0 ]]; then
		echo ""
		echo ""
		echo "==============================================================================" | tee -a $OSLOG
		echo "==============================================================================" | tee -a $OSLOG
		echo "         Network log for \"$DEVICE\" device(s)" `date` | tee -a $OSLOG
		echo "==============================================================================" | tee -a $OSLOG
		echo "==============================================================================" | tee -a $OSLOG
		sed -f $DIAGDIR/parsenetmsgs.sed $LOGDIR/net-$DEVICE.* | tee -a $OSLOG
	fi
done


