summaryrefslogtreecommitdiffstats
path: root/utils/nhfsstone/nhfsrun
blob: dfc24eb05dd5f7ec4baa4cd62b41b880e951b67f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/sh
#
# @(#)nhfsrun.sh 1.3 89/07/07 Copyright (c) 1989, Legato Systems, Inc.
#
# See DISCLAIMER file for restrictions
#

#
# Usage: nhfsrun [suffix]
#
# Run nhfsstone with a range of different loads and put
# results in a file called run.<suffix>
#

if [ $# -gt 1 ]; then
	echo "usage: $0 [suffix]"
	exit 1
fi

#
# Output file
#
if [ $# -eq 1 ]; then
	OUTFILE=run.$1
else
	OUTFILE=run.out
fi

#
# Starting load
#
START=10

#
# Ending load
#
END=80

#
# Load increment
#
INCR=10

#
# Catch SIGUSR1 and ignore it.
# SIGUSR1 is used by nhfsstone to synchronize child processes.
#
nothing() { echo -n ""; }
trap nothing 30

rm -f $OUTFILE

LOAD=$START
while [ $LOAD -le $END ]; do
	echo nhfsstone -l $LOAD
	nhfsstone -l $LOAD >> $OUTFILE
	tail -1 $OUTFILE
	LOAD=`expr $LOAD + $INCR`
done