home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows NT Super Tune-Up Kit
/
PIE-WindowsNTSuperTuneUpKit-1997.iso
/
BNCHMARK
/
SVRBENCH
/
UW21
/
UW21S.TAR
/
svr_gate
< prev
next >
Wrap
Text File
|
1996-03-15
|
1KB
|
56 lines
#!/bin/sh
# svr_gate of ServerBench
# Copy this file to "gate" to enable it.
# svr_m calls gate at each synchronization point
# with the following parameters:
# $1 = process name (eg, "svr_m")
# $2 = state ("request", "initialize", "execute", "report", or "disconnect")
# $3 = mix name, up to 15 characters (null for request and disconnect states)
if [ $# -lt 2 ]
then
exit
fi
if [ $2 = request ]
then
:
# Replace ":" with commands to execute after clients send results of mix.
elif [ $2 = initialize ]
then
:
# Replace ":" with commands to execute before the server creates
# the data files for a mix.
elif [ $2 = execute ]
then
# Insert here commands to execute before the server executes a mix.
# For example:
if [ -w _$3.sar ]
then
rm _$3.sar
fi
/usr/lib/sa/sadc 0 1 _$3.sar
elif [ $2 = report ]
then
# Insert here commands to execute after the server executes a mix.
# For example:
/usr/lib/sa/sadc 0 1 _$3.sar
/usr/bin/sar -bdurf _$3.sar
echo
elif [ $2 = disconnect ]
then
:
# Replace ":" with commands to execute after last mix.
else
echo $1: gate did not recognize state: $2
fi