1
0
Files
2022-09-29 17:59:04 +03:00

35 lines
838 B
Bash
Executable File

#!/bin/ksh
#
# Start up network stress tests on all interesting interfaces
#
DIAGDIR=${DIAGDIR:-/usr/diags/os/scripts}
LOGDIR=${LOGDIR:-/usr/tmp}
HINVFILE=$LOGDIR/start_net.hinv
LOGFILE=$LOGDIR/ostests.log
# Obtain system inventory
hinv > $HINVFILE
# Start only the tests for which there are known interface cards
if [[ `grep -c EFast $HINVFILE` -gt 1 ]]; then
echo "Starting EFast tests" | tee -a $LOGFILE
$DIAGDIR/netstress -i fxp -r 2 -c 0 | tee -a $LOGFILE &
sleep 10
fi
if [[ `grep -c FDDIXPress $HINVFILE` -gt 1 ]]; then
echo "Starting FDDIXPress tests" | tee -a $LOGFILE
$DIAGDIR/netstress -i ipg -c 0 | tee -a $LOGFILE &
sleep 10
fi
if [[ `grep -c HIPPI $HINVFILE` -gt 1 ]]; then
echo "Starting HIPPI tests" | tee -a $LOGFILE
$DIAGDIR/netstress -i hip -c 0 | tee -a $LOGFILE &
sleep 10
fi
# Tidy up
rm -f $HINVFILE