You are here: Foswiki>ATLAS Web>NetworkTestSkript (31 Jan 2008, MatthiasLInden)Edit Attach

master script

This script just uses dsh to call the various tests on the nodes. UDP_STREAM and TCP_STREAM are run first in single and in dual direction mode (without any synchronization effort). Finally TCP_RR is run on each node.

 #!/bin/sh
 
 ETHTOOL="auto off tx off rx off"
 CONGEST="cubic"
 for i in `seq 1500 1500 9000`; do
 
    echo "############################################################"
    echo "############################################################"
    echo "############################################################"
    echo "####################### MTU = $i  ########################"
    echo "############################################################"
    echo "############################################################"
    echo "############################################################"
    date
    # set MTU size
    dsh -cM --file machines.list /sbin/ifconfig eth1 mtu $i
    dsh -cM --file machines.list /sbin/ifconfig eth1 | grep MTU
    sleep 2
 
    # set ethtool
    dsh -cM --file machines.list /usr/sbin/ethtool -A eth1 $ETHTOOL >/dev/null 2>/dev/null
    dsh -cM --file machines.list /usr/sbin/ethtool -a eth1
    sleep 2
 
    # set congestion control
    dsh -cM --file machines.list echo $CONGEST > /proc/sys/net/ipv4/tcp_congestion_control
    dsh -cM --file machines.list echo "Congestion control: `cat /proc/sys/net/ipv4/tcp_congestion_control`"
    sleep 2
 
    echo "*****************************************************"
    echo "NETPERF UDP SINGLE"
    echo "*****************************************************"
    # start netperf UDP_STREAM single
    dsh -cM --file machines.1 /root/netperf.sh UDP_STREAM 20
    dsh -cM --file machines.2 /root/netperf.sh UDP_STREAM 20
 
    echo "*****************************************************"
    echo "NETPERF UDP DUAL"
    echo "*****************************************************"
    # start netperf UDP_STREAM dual
    dsh -cM --file machines.list /root/netperf.sh UDP_STREAM 20
 
    echo "*****************************************************"
    echo "NETPERF TCP SINGLE"
    echo "*****************************************************"
    # start netperf TCP_STREAM single
    dsh -cM --file machines.1 /root/netperf.sh TCP_STREAM 20
    dsh -cM --file machines.2 /root/netperf.sh TCP_STREAM 20
 
    echo "*****************************************************"
    echo "NETPERF TCP DUAL"
    echo "*****************************************************"
    # start netperf TCP_STREAM dual
    dsh -cM --file machines.list /root/netperf.sh TCP_STREAM 20
 
    echo "*****************************************************"
    echo "NETPERF TCP RR"
    echo "*****************************************************"
    # start netperf TCP_RR single
    dsh -cM --file machines.1 /root/netperf.sh TCP_RR 20
    dsh -cM --file machines.2 /root/netperf.sh TCP_RR 20
 
    echo "ROUND DONE"
 done

skript on the nodes

This simple script does nothing fancy. It prints the current time, collects the current IRQ values from /proc/interrupts (sorry, need to improve my shell-programming capabilities to arrays), runs netperf with its partner, collcts the IRQ values again and prints the average IRQ/s.

 #!/bin/sh
 date  --rfc-3339=s
 BEFORE0=`awk '/eth1/ {print $2}' /proc/interrupts`
 BEFORE1=`awk '/eth1/ {print $3}' /proc/interrupts`
 BEFORE2=`awk '/eth1/ {print $4}' /proc/interrupts`
 BEFORE3=`awk '/eth1/ {print $5}' /proc/interrupts`
 netperf -t $1 -l $2 -H 172.20.1.203
 AFTER0=`awk '/eth1/ {print $2}' /proc/interrupts`
 AFTER1=`awk '/eth1/ {print $3}' /proc/interrupts`
 AFTER2=`awk '/eth1/ {print $4}' /proc/interrupts`
 AFTER3=`awk '/eth1/ {print $5}' /proc/interrupts`
 let "IRQ0= ($AFTER0 - $BEFORE0) / $2"
 let "IRQ1= ($AFTER1 - $BEFORE1) / $2"
 let "IRQ2= ($AFTER2 - $BEFORE2) / $2"
 let "IRQ3= ($AFTER3 - $BEFORE3) / $2"
 echo "eth1 IRQ/s on cores 0-3: $IRQ0 $IRQ1 $IRQ2 $IRQ3"
Topic revision: r1 - 31 Jan 2008, MatthiasLInden
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback