surge-client.rcS revision 1142
11142Shsul@eecs.umich.edu#!/bin/sh
21142Shsul@eecs.umich.edu#
31142Shsul@eecs.umich.edu# /etc/init.d/rcS
41142Shsul@eecs.umich.edu#
51142Shsul@eecs.umich.edu
61142Shsul@eecs.umich.eduecho -n "mounting swap..."
71142Shsul@eecs.umich.edu/sbin/swapon /dev/hdc1
81142Shsul@eecs.umich.eduecho "done."
91142Shsul@eecs.umich.edu
101142Shsul@eecs.umich.eduecho -n "setting up network..."
111142Shsul@eecs.umich.edu/sbin/ifconfig eth0 192.168.0.10 txqueuelen 1000
121142Shsul@eecs.umich.edu/sbin/ifconfig lo 127.0.0.1
131142Shsul@eecs.umich.edu
141142Shsul@eecs.umich.eduecho "1" > /proc/sys/net/ipv4/tcp_tw_recycle
151142Shsul@eecs.umich.eduecho "1" > /proc/sys/net/ipv4/tcp_tw_reuse
161142Shsul@eecs.umich.eduecho "1" > /proc/sys/net/ipv4/tcp_window_scaling
171142Shsul@eecs.umich.eduecho "0" > /proc/sys/net/ipv4/tcp_timestamps
181142Shsul@eecs.umich.eduecho "0" > /proc/sys/net/ipv4/tcp_sack
191142Shsul@eecs.umich.eduecho "15" > /proc/sys/net/ipv4/tcp_fin_timeout
201142Shsul@eecs.umich.eduecho "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
211142Shsul@eecs.umich.edu                                                                                
221142Shsul@eecs.umich.eduecho "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
231142Shsul@eecs.umich.eduecho "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
241142Shsul@eecs.umich.eduecho "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
251142Shsul@eecs.umich.eduecho "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
261142Shsul@eecs.umich.edu                                                                                
271142Shsul@eecs.umich.eduecho "524287" > /proc/sys/net/core/rmem_max
281142Shsul@eecs.umich.eduecho "524287" > /proc/sys/net/core/wmem_max
291142Shsul@eecs.umich.eduecho "524287" > /proc/sys/net/core/optmem_max
301142Shsul@eecs.umich.eduecho "300000" > /proc/sys/net/core/netdev_max_backlog
311142Shsul@eecs.umich.edu                                                                                
321142Shsul@eecs.umich.eduecho "131072" > /proc/sys/fs/file-max
331142Shsul@eecs.umich.eduecho "done."
341142Shsul@eecs.umich.edu
351142Shsul@eecs.umich.eduecho -n "sleeping until server is running..."
361142Shsul@eecs.umich.edusleep 3
371142Shsul@eecs.umich.eduecho "done."
381142Shsul@eecs.umich.edu
391142Shsul@eecs.umich.eduecho -n "running surge client..."
401142Shsul@eecs.umich.edu/bin/bash -c "cd /benchmarks/surge && ./Surge 2 100 1 192.168.0.1 5"
411142Shsul@eecs.umich.eduecho "done."
421142Shsul@eecs.umich.edu
431142Shsul@eecs.umich.eduecho -n "halting machine"
441142Shsul@eecs.umich.edum5 exit
451142Shsul@eecs.umich.edu
461142Shsul@eecs.umich.eduecho -n "starting bash shell..."
471142Shsul@eecs.umich.edu/bin/bash
48