#!/bin/csh

# Run various performance meters for a TPCB run.
# On entry, this script respects certain environment variables listed below:
#
# Variable:		Default Value if Unset in Environment:
# ---------		--------------------------------------
# ORACLE_PSRV		TPCB
# ORACLE_HOSTHOME	/usr/local/orahost
# ORACLE_HOME		$ORACLE_HOSTHOME/orahome
# TPCB_HOME		$ORACLE_HOSTHOME/demo
# NROOTLOCAL		/usr/ncube/current/local
#
# Also, the scripts expects the file $TPCB_HOME/config/$ORACLE_PSRV.params
# to exist and contain your configuration information.  If you have no such
# file, then copy TPCB.params from the same directory and modify it accordingly.

# Set up our environment
if ($?ORACLE_PSRV == 0)     setenv ORACLE_PSRV 	   TPCB
if ($?ORACLE_HOSTHOME == 0) setenv ORACLE_HOSTHOME /usr/local/orahost
if ($?ORACLE_HOME == 0)     setenv ORACLE_HOME     $ORACLE_HOSTHOME/orahome
if ($?TPCB_HOME == 0) 	    setenv TPCB_HOME       $ORACLE_HOSTHOME/demo
if ($?NROOTLOCAL == 0) 	    setenv NROOTLOCAL      /usr/ncube/current/local

# Grab data from the configuration files.
set config_file = $TPCB_HOME/config/$ORACLE_PSRV.params
if ( ! -r $config_file ) then
  echo "Before running this script, you need to create "
  echo "a personalized $config_file"
  exit
endif
source $config_file
source $TPCB_HOME/config/general.params

# Grab data from the configuration files.
set config_file = $TPCB_HOME/config/$ORACLE_PSRV.params
if ( ! -r $config_file ) then
  echo "Before running this script, you need to create "
  echo "a personalized $config_file"
  exit
endif
source $config_file
source $TPCB_HOME/config/general.params

set sharepid = "`xnc $NROOTLOCAL/bin/ncube/nspcmd lookup ${ORACLE_PSRV}nhold`"

xncpu -sp $sharepid -geo +411+0 &
xncmsg -sp $sharepid -geo +220+0 &
#xniostat -sp $sharepid -geo +0+0 -files "{$DBDIR/{acct,bran,brani,ctrl,db,hist,tell,telli,undo},$LOGDIR/{log1,log2}}" &

# Display lock manager meter if you like.
xlk -geo +0+0 &



