]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/nhfsstone/nhfsrun
Imported Debian patch 1.0.7-11
[nfs-utils.git] / utils / nhfsstone / nhfsrun
1 #!/bin/sh
2 #
3 # @(#)nhfsrun.sh 1.3 89/07/07 Copyright (c) 1989, Legato Systems, Inc.
4 #
5 # See DISCLAIMER file for restrictions
6 #
7
8 #
9 # Usage: nhfsrun [suffix]
10 #
11 # Run nhfsstone with a range of different loads and put
12 # results in a file called run.<suffix>
13 #
14
15 if [ $# -gt 1 ]; then
16         echo "usage: $0 [suffix]"
17         exit 1
18 fi
19
20 #
21 # Output file
22 #
23 if [ $# -eq 1 ]; then
24         OUTFILE=run.$1
25 else
26         OUTFILE=run.out
27 fi
28
29 #
30 # Starting load
31 #
32 START=10
33
34 #
35 # Ending load
36 #
37 END=80
38
39 #
40 # Load increment
41 #
42 INCR=10
43
44 #
45 # Catch SIGUSR1 and ignore it.
46 # SIGUSR1 is used by nhfsstone to synchronize child processes.
47 #
48 nothing() { echo -n ""; }
49 trap nothing USR1
50
51 rm -f $OUTFILE
52
53 LOAD=$START
54 while [ $LOAD -le $END ]; do
55         echo nhfsstone -l $LOAD
56         nhfsstone -l $LOAD >> $OUTFILE
57         tail -1 $OUTFILE
58         LOAD=`expr $LOAD + $INCR`
59 done