nat-spec-surge-client.rcS revision 1362:88a3afa44545
1#!/bin/sh 2# 3# /etc/init.d/rcS 4# 5CLIENT=10.0.0.2 6SERVER=192.168.0.1 7 8echo -n "mounting swap..." 9/sbin/swapon /dev/hdc 10echo "done." 11 12echo -n "setting up network..." 13/sbin/ifconfig eth0 $CLIENT txqueuelen 1000 14/sbin/ifconfig lo 127.0.0.1 15 16echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle 17echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse 18echo "1" > /proc/sys/net/ipv4/tcp_window_scaling 19echo "0" > /proc/sys/net/ipv4/tcp_timestamps 20echo "0" > /proc/sys/net/ipv4/tcp_sack 21echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout 22echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog 23echo "1" > /proc/sys/net/ipv4/tcp_vegas_cong_avoid 24 25echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range 26echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem 27echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem 28echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem 29 30echo "524287" > /proc/sys/net/core/rmem_max 31echo "524287" > /proc/sys/net/core/wmem_max 32echo "524287" > /proc/sys/net/core/optmem_max 33echo "300000" > /proc/sys/net/core/netdev_max_backlog 34 35echo "131072" > /proc/sys/fs/file-max 36echo "done." 37 38echo "changing route table..." 39route add default gw 10.0.0.1 40 41echo "waiting for server..." 42/usr/bin/netcat -c -l -p 8000 43 44echo -n "running surge client..." 45/bin/bash -c "cd /benchmarks/surge && ./spec-m5 1 20 1 $SERVER 5 40000 1000000000 1000" 46echo "done." 47 48echo -n "halting machine" 49m5 exit 50 51echo -n "starting bash shell..." 52/bin/bash 53