2 # @(#)sfs_ext_mon 2.1 97/10/23
4 # This sample shell script can be used to start and stop
5 # external processes at the beginning and ending of the
6 # sfs load generation period respectively. The name of
7 # this program is pased in via the PRIME_MON_SCRIPT variable
8 # in the sfs_rc or equivalent file. The sfs_prime program
9 # executes this shell script just before it issues the START
10 # message to all the clients ie. "script_name START"; and likewise
11 # another call after all the clients have completed load generation ie.
14 # All environment variables exported from sfs_mgr are available for use.
23 #----------------- START section -----------------
24 # Code section that handles starting of external processes.
25 # ALL PROCESSES SHOULD BE STARTED IN THE BACKGROUND OR ELSE
26 # THE TEST WILL BLOCK WAITING FOR THEIR COMPLETION!!
28 if [ "$1" = "START" ]; then
30 # place commands to start performance monitoring utilities as
31 # background processes here.
33 echo "$0: started external monitoring utilities" >&2
38 #----------------- DONE section -----------------
39 # Code section that handles stopping of external processes.
40 # ALL PROCESSES SHOULD BE STARTED IN THE BACKGROUND OR ELSE
41 # THE TEST WILL BLOCK WAITING FOR THEIR COMPLETION!!
43 if [ "$1" = "DONE" ]; then
45 # place commands to stop performance monitoring utilities as
46 # background processes here.
48 echo "$0: stopped external monitoring utilities" >&2
53 #----------------- ERROR section -----------------
54 # ERROR: BAD PARAMETER
56 echo "$0: bad param. " >&2
57 echo "usage: $0 START | DONE " >&2