1#!/bin/sh
2#
3# /etc/init.d/rcS
4#
5
6echo -n "mounting swap..."
7/sbin/swapon /dev/hdc
8echo "done."
9
10echo -n "setting up network..."
11/sbin/ifconfig eth0 10.0.0.2 txqueuelen 1000
12/sbin/ifconfig lo 127.0.0.1
13
14echo "1" > /proc/sys/net/ipv4/tcp_tw_recycle
15echo "1" > /proc/sys/net/ipv4/tcp_tw_reuse
16echo "1" > /proc/sys/net/ipv4/tcp_window_scaling
17echo "0" > /proc/sys/net/ipv4/tcp_timestamps
18echo "0" > /proc/sys/net/ipv4/tcp_sack
19echo "15" > /proc/sys/net/ipv4/tcp_fin_timeout
20echo "16384" > /proc/sys/net/ipv4/tcp_max_syn_backlog
21echo "262144" > /proc/sys/net/ipv4/ip_conntrack_max
22echo "1024 65535" > /proc/sys/net/ipv4/ip_local_port_range
23echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_rmem
24echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_wmem
25echo "10000000 10000000 10000000" > /proc/sys/net/ipv4/tcp_mem
26echo "524287" > /proc/sys/net/core/rmem_max
27echo "524287" > /proc/sys/net/core/wmem_max
28echo "524287" > /proc/sys/net/core/optmem_max
29echo "300000" > /proc/sys/net/core/netdev_max_backlog
30echo "131072" > /proc/sys/fs/file-max
31echo "10" > /proc/sys/vm/dirty_writeback_centisecs
32echo "done."
33
34echo -n "starting nfs client..."
35/sbin/portmap &
36/sbin/lockd &
37echo "done."
38
39echo -n "waiting for server..."
40/usr/bin/netcat -c -l -p 8000
41
42echo -n "mounting remote share..."
43mkdir /nfs
44mount 10.0.0.1:/nfs /nfs
45echo "done."
46
47cd /nfs
48
49initparam=`m5 initparam`
50
51if test X$initparam == X0; then
52    /sbin/m5 checkpoint 100000000 2000000000
53    dd if=/dev/zero of=foo bs=1024k count=512
54else
55    /sbin/m5 checkpoint 1000000000 2000000000
56    /benchmarks/dbench/dbench $initparam
57fi
58
59/sbin/m5 exit
60