#!/bin/ksh # First, we must set the environment . . . . ORACLE_SID=edi1 ORACLE_HOME=`cat /etc/oratab|grep $ORACLE_SID|cut -f2 -d':'` PATH=$ORACLE_HOME/bin:$PATH MON=`echo ~oracle/mon` #---------------------------------------- # If it is not running, then start it . . . #---------------------------------------- check_stat=`ps -ef|grep get_vmstat|wc -l`; oracle_num=`expr $check_stat` if [ $oracle_num -ne 2 ] then nohup $MON/get_vmstat.ksh > /dev/null 2>&1 & fi HOUR=`date +"%H"` if [ $HOUR -gt 19 ] then kill -9 `ps|grep get_vmstat|grep oracle|awk '{print $1 }'` fi