Database Reference
In-Depth Information
These concerns about losing the AWR information of previous benchmarks can easily be addressed by writing a
small test harness. A sample wrapper script around runit.sh is shown here:
#!/bin/bash
#
# Martin Bach 2013
#
# runit_wrapper.sh is a wrapper to preserve the output of the supporting files from
# individual SLOB version 2 test runs
# list of files to preserve. Not all are necesarrily generated during a test run.
FILES="awr.txt awr.*html awr*.gz iostat.out vmstat.out mpstat.out db_stats.out "
FILES="$FILES sqlplus.out slob.conf"
# setting up ...
[[ ! -f $ORACLE_HOME/bin/sqlplus || -z $ORACLE_SID ]] && {
echo ERR: Your Oracle environment is not set correctly it appears.
echo ERR: source oraenv into your session and try again
exit
}
# Two command line parameters are needed
(( $# != 2 )) && {
echo ERR: wrong number of command line parameters
echo usage: $0 testname num_sessions
exit
}
TESTNAME=$1
NUM_SESSIONS=$2
# The script creates a directory to hold the test results. That will fail
# if the directory already exists
[[ -d $TESTNAME ]] && {
echo ERR: A test with name $TESTNAME has been found already.
echo ERR: Please double check your parameters
exit
}
echo INFO: preparing to preserve output for test $TESTNAME
mkdir $TESTNAME || {
echo ERR: cannot create a directory to store the output for $TESTNAME
exit
}
# set the automatic gathering of snapshots to a very high value.
# Note that turning it off (interval => 0) means you cannot even
# take manual snapshots.
echo INFO: increasing AWR snapshot interval
Search WWH ::




Custom Search