#!/bin/sh

echo ""
echo "These results represent actual drive validation experiments"

echo ""
echo "QUANTUM_QM39100TD-SW (rms should be about 0.378)"
nice ../src/disksim atlas_III.parv atlas_III.outv validate atlas_III.trace 0
../src/rms atlas_III.outv atlas_III.outv -1 -1 1

echo ""
echo "SEAGATE_ST32171W (rms should be about 0.349)"
nice ../src/disksim barracuda.parv barracuda.outv validate barracuda.trace 0
../src/rms barracuda.outv barracuda.outv -1 -1 1

echo ""
echo "SEAGATE_ST34501N (rms should be about 0.318)"
nice ../src/disksim cheetah4LP.parv cheetah4LP.outv validate cheetah4LP.trace 0
../src/rms cheetah4LP.outv cheetah4LP.outv -1 -1 1

echo ""
echo "SEAGATE_ST39102LW (rms should be about 0.107)"
nice ../src/disksim cheetah9LP.parv cheetah9LP.outv validate cheetah9LP.trace 0
../src/rms cheetah9LP.outv cheetah9LP.outv -1 -1 1

echo ""
echo "IBM_DNES-309170W (rms should be about 0.135)"
nice ../src/disksim ibm18es.parv ibm18es.outv validate ibm18es.trace 0
../src/rms ibm18es.outv ibm18es.outv -1 -1 1

echo ""
echo "QUANTUM_TORNADO (rms should be about 0.159)"
nice ../src/disksim atlas10k.parv atlas10k.outv validate atlas10k.trace 0
../src/rms atlas10k.outv atlas10k.outv -1 -1 1

echo ""
echo "HP_C2247_validate (rms should be about 0.090)"
nice ../src/disksim parv.hpc2247 outv.hpc2247 validate trace.hpc2247 0
../src/rms outv.hpc2247 outv.hpc2247 -1 -1 1

echo ""
echo "HP_C3323_validate (rms should be about 0.306)"
nice ../src/disksim parv.hpc3323 outv.hpc3323 validate trace.hpc3323 0
../src/rms outv.hpc3323 outv.hpc3323 -1 -1 1

echo ""
echo "HP_C2490_validate (rms should be about 0.254)"
nice ../src/disksim parv.hpc2490 outv.hpc2490 validate trace.hpc2490 0
../src/rms outv.hpc2490 outv.hpc2490 -1 -1 1

echo ""
echo "Seagate_ST41601N_validate (rms should be about 0.083)"
nice ../src/disksim parv.seagate outv.seagate validate trace.seagate 0
../src/rms outv.seagate outv.seagate -1 -1 1

echo ""
echo "DEC_RZ26_validate (rms should be about 0.438)"
nice ../src/disksim parv.decrz26 outv.decrz26 validate trace.decrz26 0
../src/rms outv.decrz26 outv.decrz26 -1 -1 1

echo ""
echo "The remaining tests exercise other DiskSim components"

echo ""
echo "Open synthetic workload (avg. resp. should be about 47.3ms)"
nice ../src/disksim par.synthopen out.synthopen ascii 0 1
grep "IOdriver Response time average" out.synthopen

echo ""
echo "Closed synthetic workload (avg. resp. should be about 87.6ms)"
nice ../src/disksim par.synthclosed out.synthclosed ascii 0 1
grep "IOdriver Response time average" out.synthclosed

echo ""
echo "Mixed synthetic workload (avg. resp. should be about 24.4ms)"
nice ../src/disksim par.synthmixed out.synthmixed ascii 0 1
grep "IOdriver Response time average" out.synthmixed

echo ""
echo "RAID 5 at device driver (avg. resp. should be about 22.8ms)"
nice ../src/disksim par.synthraid5 out.synthraid5 ascii 0 1
grep "IOdriver Response time average" out.synthraid5

echo ""
echo "Cache at controller (avg. resp. should be about 23.0ms)"
nice ../src/disksim par.synthcache out.synthcache ascii 0 1
grep "IOdriver Response time average" out.synthcache

echo ""
echo "Checkpoint/restore version of cache at controller (should be same as above)"
nice ../src/disksim checkpoint.synthcache
grep "IOdriver Response time average" out.synthcache

echo ""
echo "Simpledisk instead of original model (avg. resp. should be about 13.5ms)"
nice ../src/disksim par.synthsimpledisk out.synthsimpledisk ascii 0 1
grep "IOdriver Response time average" out.synthsimpledisk

echo ""
echo "Simpledisk together with original disk model"
echo "(avg. resps. should be about 13.4ms, 20.3, 13.3 and 20.6)"
nice ../src/disksim par.synthmultidevice out.synthmultidevice ascii 0 1
grep "IOdriver #0 device #0 Response time average" out.synthmultidevice
grep "IOdriver #0 device #1 Response time average" out.synthmultidevice
grep "IOdriver #0 device #2 Response time average" out.synthmultidevice
grep "IOdriver #0 device #3 Response time average" out.synthmultidevice

echo ""
echo "Note: this validates HP trace input, *not* the corresponding traced disk"
echo "HP srt trace input (avg. resp should be about 48.8ms)"
nice ../src/disksim par.hplajw out.hplajw hpl ajw.1week.srt 0
grep "IOdriver Response time average" out.hplajw

echo ""
echo "Checkpoint/restore version of HP srt trace input (should be same as above)"
nice ../src/disksim checkpoint.hplajw
grep "IOdriver Response time average" out.hplajw

echo ""
echo "ASCII input (avg. resp should be about 13.8ms)"
zcat trace.ascii.Z | nice ../src/disksim par.ascii out.ascii ascii stdin 0
grep "IOdriver Response time average" out.ascii

echo ""
echo "syssim: externally-controlled DiskSim (avg. resp should be about 19.6ms)"
../src/syssim parv.seagate out.syssim 2676846 0
grep "IOdriver Response time average" out.syssim

echo ""
echo "syssim2: dual externally-controlled DiskSim instances (avg. resps should same as previous and 0.0ms, respectively)"
../src/syssim parv.seagate out.syssim2 2676846 1
grep "IOdriver Response time average" out.syssim2
grep "IOdriver Response time average" out.syssim22

echo ""

