Network load test


##############################################################################################################

#!/bin/bash
#  converting MS Batch file for networking testing for use with Linux
#  batch file used to show that network performance with Win10 is 10 times slower than Win7.
#  using this script as a way of comparing Linux performance on identical hardware before loading Win 10 on it.
#
#  john meister  http://LinuxMeister/Microsoft/NETWORK-PERFORMANCE - generic copies - no proprietary info
#
#  2017 May 24 - original batch file text found at http://LinuxMeister/Microsoft/NETWORK-PERFORMANCE
##############################################################################################################
#   REM original Performance test with 3 loops for load testing 19 Oct 2012
#   REM Requires 100MB file.  Create 100MBTEST  by "cat 10MBTEST >> 100MBTEST" ten times
#   REM copy 100MBTEST HOLD-100MTEST  (to prevent deleting it by running the script)
#   REM ###############################################################################
#   REM  set logfile=C:\NET_TEST\%COMPUTERNAME%_net-load-results.txt  (example log file)
#   REM ###############################################################################
#   REM "global replace Host-S with name of system running script"   Host-S - sending
#   REM "global replace Host-D with name of system receiving files"  Host-D - receiving
#   REM ###############################################################################
#   set logfile=C:\NET_TEST\Host-S_to_Host-D_network-times.txt
#   ECHO %logfile%  >  %logfile%
#   set fulltime=%TIME%
#  modfiy Host -D and -S to $HOSTS and $HOSTD
#########################################################
LOGN=~/NETWORK_TEST/network-test-from-`hostname`.`date '+%Y%b%d_%H%M%S'`.txt
HOSTS="`hostname`"
echo "#########################################################" >> $LOGN
echo FIX THIS:  HOSTD=" REPLACE WITH HOSTNAME HERE   ############################### "
HOSTD=" REPLACE WITH HOSTNAME HERE   ############################### "
echo "#########################################################" >> $LOGN
READ "did you change HOSTD to the destination and is there a 100MBTEST file?"
echo $LOGN > $LOGN
FULLTIME="`/bin/date '+%H:%M:%S'`" 
echo "#########################################################" >> $LOGN
echo $FULLTIME >> $LOGN
echo "#########################################################" >> $LOGN
echo "starting network load test" >> $LOGN
echo $HOSTS >> $LOGN
echo $HOSTD >> $LOGN
echo "=========================START================================"  >> $LOGN
echo "echo   Network LOAD-TEST to figure out why Microsoft Win10 is TEN times slower"   >> $LOGN
echo   "TEST BETWEEN $HOSTS and $HOSTD"  >> $LOGN
echo "=============================================================="  >> $LOGN
echo "test conducted: `date` "  >> $LOGN
echo `hostname` >> $LOGN
echo ==============================================================  >> $LOGN
echo "traceroute $HOSTD"  >> $LOGN
traceroute $HOSTD >> $LOGN
echo "#########################################################" >> $LOGN
echo ==============================================================  >> $LOGN
echo "ping -c 3 $HOSTD"  >> $LOGN
ping -c 3 $HOSTD >> $LOGN
echo ==============================================================  >> $LOGN
echo "#########################################################" >> $LOGN
echo "time to copy 100MB files 10 times to $HOSTD"  >> $LOGN
echo total time: subtract start from stop  >> $LOGN
echo ==============================================================  >> $LOGN
echo "mkdir $HOSTD ~/NETWORK_TEST - note: NOT TIMED"  >> $LOGN
ssh $HOSTD "mkdir ~/NETWORK_TEST/"   #  an error will state file exists
ssh $HOSTD "ls -l ~/NETWORK_TEST/ " >> $LOGN    
cp HOLD-100MBTEST 100MBTEST  # make sure you have a local copy
scp HOLD-100MBTEST $HOSTD:~/NETWORK_TEST/    # copy of file for relay testing
scp NET-test.sh $HOSTD:~/NETWORK_TEST        # copy of file for relay testing/
echo ==============================================================  >> $LOGN
echo ============  starting 1st scp cycle to remote host =============================================  >> $LOGN
STARTTIME="`date '+%M:%S'`"     
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-01
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-02
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-03
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-04
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-05
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-06
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-07
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-08
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-09
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-10
echo "============== first scp cycle of 10 copies of 100MBTEST finished ======================================="    >> $LOGN
echo "================= contents after 10 copies:  ===================================="    >> $LOGN
ssh $HOSTD "ls -l ~/NETWORK_TEST/" >> $LOGN
STOPTIME="`date '+%M:%S'`"
ssh $HOSTD "df -h ~/NETWORK_TEST/" >> $LOGN
echo "=======  END COPY CYCLE, deleting files  - not timed =============================================="    >> $LOGN
echo " ssh $HOSTD rm -f  ~/NETWORK_TEST/100MBTEST*" >> $LOGN
ssh $HOSTD "rm -f  ~/NETWORK_TEST/100MBTEST*" >> $LOGN
ssh $HOSTD "ls -l ~/NETWORK_TEST/ " >> $LOGN
ssh $HOSTD "df -h ~/NETWORK_TEST/" >> $LOGN
echo "#########################################################" >> $LOGN
echo ==============================================================  | tee -a $LOGN
echo "FIRST  STOP TIME: $STOPTIME" | tee -a $LOGN
echo "FIRST Start TIME: $STARTTIME" | tee -a  $LOGN
echo "====================================================="    | tee -a $LOGN
echo "#########################################################" >> $LOGN
echo ============  starting 2nd scp cycle to remote host =============================================  >> $LOGN
STARTTIME="`date '+%M:%S'`"     
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-11
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-12
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-13
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-14
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-15
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-16
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-17
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-18
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-19
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-20
echo "============== 2nd scp cycle of 10 copies of 100MBTEST finished ======================================="    >> $LOGN
echo "================= contents after 10 copies:  ===================================="    >> $LOGN
ssh $HOSTD "ls -l ~/NETWORK_TEST/" >> $LOGN
STOPTIME="`date '+%M:%S'`"
ssh $HOSTD "df -h ~/NETWORK_TEST/" >> $LOGN
echo "=======  END 2nd COPY CYCLE, deleting files  - not timed =============================================="    >> $LOGN
echo " ssh $HOSTD rm -f  ~/NETWORK_TEST/100MBTEST*" >> $LOGN
ssh $HOSTD "rm -f  ~/NETWORK_TEST/100MBTEST*" >> $LOGN
ssh $HOSTD "ls -l ~/NETWORK_TEST/ " >> $LOGN
ssh $HOSTD "df -h ~/NETWORK_TEST/" >> $LOGN
echo "#########################################################" >> $LOGN
echo ==============================================================  | tee -a $LOGN
echo "SECOND  STOP TIME: $STOPTIME" | tee -a $LOGN
echo "SECOND Start TIME: $STARTTIME" | tee -a  $LOGN
echo "====================================================="    | tee -a $LOGN
echo "#########################################################" >> $LOGN
#########################################################################################################
echo ============  starting 3rd scp cycle to remote host =============================================  >> $LOGN
STARTTIME="`date '+%M:%S'`"     
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-21
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-22
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-23
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-24
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-25
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-26
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-27
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-28
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-29
ssh $HOSTD "ls -l ~/NETWORK_TEST/"
scp 100MBTEST $HOSTD:~/NETWORK_TEST/100MBTEST-30
echo "============== 3rd scp cycle of 10 copies of 100MBTEST finished ======================================="    >> $LOGN
echo "================= contents after 10 copies:  ===================================="    >> $LOGN
ssh $HOSTD "ls -l ~/NETWORK_TEST/" >> $LOGN
STOPTIME="`date '+%M:%S'`"
ssh $HOSTD "df -h ~/NETWORK_TEST/" >> $LOGN
echo "=======  END 3rd COPY CYCLE, deleting files  - not timed =============================================="    >> $LOGN
echo " ssh $HOSTD rm -f  ~/NETWORK_TEST/100MBTEST*" >> $LOGN
ssh $HOSTD "rm -f  ~/NETWORK_TEST/100MBTEST*" >> $LOGN
ssh $HOSTD "ls -l ~/NETWORK_TEST/ " >> $LOGN
ssh $HOSTD "df -h ~/NETWORK_TEST/" >> $LOGN
echo "#########################################################" >> $LOGN
echo ==============================================================  | tee -a $LOGN
echo "THIRD  STOP TIME: $STOPTIME" | tee -a $LOGN
echo "THIRD Start TIME: $STARTTIME" | tee -a  $LOGN
echo "====================================================="    | tee -a $LOGN
echo "#########################################################" >> $LOGN
echo ==============================================================  >> $LOGN
echo "ping -c 3 $HOSTD"  >> $LOGN
ping -c 3 $HOSTD >> $LOGN
echo ==============================================================  >> $LOGN
echo "#########################################################" >> $LOGN
echo "=================END=================" | tee -a $LOGN
scp $LOGN $HOSTD:~/NETWORK_TEST/        # copy of file to remote host
cat $LOGN | grep TIME: | tee -a $LOGN
##############################################################################################################


Simply Linux: Basics Linux Tackles Microsoft Using BASH on Windows 10
Practical Suggestions for Microsoft Windows
 Full Size Jeep Buyer's Guide
12 hour Video Course by john:
The Art of Linux System Administration
published by O'Reilly Media
Study Guide for the LPIC-2 Certification Exams
search for:
on the internet, or:
JohnMeister.com-fotos
LinuxMeister-Linux
BibleTech- Bible overview

overview of mankind's history
Biblical history:
"Promises and Prophets"

Wagoneers

FULL SIZE JEEPS

JeepMeister
"Jeep is America's
only real sports car."
-Enzo Ferrari


MeisterTech
Diesels +

One Page Overview of Linux Commands

click for an image of the 5 essential Linux commands

An Intro to Linux
AMSOIL product guide,
or, AMSOIL web, or 1-800-956-5695,
use customer #283461

Amsoil dealer since 1983
purchase AMSOIL
at Midway Auto on SR9 in Snohomish,
or at Northland Diesel in Bellingham, WA


SJ - 1962-1991

XJ - 1984-2001

WJ - 1999-2004

KJ - 2002-2007

WK - 2005-2010

Find the recommended
AMSOIL synthetics
for your Jeep

CJ-10A - 1984-1986

Jeepsters

MJ - 1984-1992

Willys - 1946-1965

Other Jeeps (FC)