nat-spec-surge-client.rcS revision 1648:4214fd0ea44d
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
24echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
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
29echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
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
34echo "131072" > /proc/sys/fs/file-max
35echo "done."
36
37echo "changing route table..."
38route add default gw 10.0.0.1 
39
40echo "waiting for server..."
41/usr/bin/netcat -c -l -p 8000
42
43echo -n "running surge client..."
44/bin/bash -c "cd /benchmarks/surge && ./spec-m5 1 20 1 $SERVER 5 40000 1000000000 1000"
45echo "done."
46
47echo -n "halting machine"
48m5 exit
49
50echo -n "starting bash shell..."
51/bin/bash
52