#!/bin/ksh # Use local hostname if no remote host specified. if [[ -e $1 ]] then HOST=$1 else HOST=`hostname` fi # I came up with 34 second by putting a crossover # cable between two gigabit adapters. echo "A gigabit transfer should take about 34 seconds" echo "enter a hostname to test remotely" # The following could be achieved with the time command # but this solution will yield correct results even # if your keys aren't setp correctly by getting the # time from the debug command. dd if=/dev/zero bs=1048576 count=1024 2>/dev/null \ | ssh -v $HOST dd of=/dev/null 2>&1 | grep Transferred \ | sed 's/^.*bytes\ in//g'