File: nhfsrun

package info (click to toggle)
nfs-utils 1%3A1.0.10-6%2Betch.1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 4,232 kB
  • ctags: 2,554
  • sloc: ansic: 24,691; sh: 9,398; makefile: 667
file content (59 lines) | stat: -rwxr-xr-x 794 bytes parent folder | download | duplicates (2)
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 USR1

rm -f $OUTFILE

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