OSWatcher (Includes: [Video]) (Doc ID 301137.1)
###To check the status of OSwatcher is running####
[root@abc oswbb]# ps -ef|grep OSW
root 8571 1 0 07:28 pts/1 00:00:00 /bin/sh ./OSWatcher.sh 20 24 gzip
root 8946 8571 0 07:28 pts/1 00:00:00 /bin/sh ./OSWatcherFM.sh 24 /u01/app/oracle/tools/oswbb/archive
root 15715 39735 0 07:35 pts/1 00:00:00 grep --color=auto OSW
[root@abc oswbb]# ps -ef|grep -i OSW
root 8571 1 0 07:28 pts/1 00:00:00 /bin/sh ./OSWatcher.sh 20 24 gzip
root 8946 8571 0 07:28 pts/1 00:00:00 /bin/sh ./OSWatcherFM.sh 24 /u01/app/oracle/tools/oswbb/archive
root 15983 39735 0 07:35 pts/1 00:00:00 grep --color=auto -i OSW
[root@abc oswbb]#
####To stop OSwatcher###
/u01/app/oracle/tools/oswbb/stopOSWbb.sh
####To Start OSwatcher###
nohup /u01/app/oracle/tools/oswbb/startOSWbb.sh 20 24 gzip &
This will generate logs in ==> /u01/app/oracle/tools/oswbb/archive
This would start the tool and collect data at 20 second intervals and
log the last 24 hours of data to archive files. Each file would be
compressed by running the gzip utility after creation.
####################################################################
OS WATCHER MONITORING SCRIPT ###################################################################
*/5 * * * * /home/oracle/dv/monitor_osw.ksh > /home/oracle/dv/monitor_osw_out.log 2>&1
[abc]:[oracle][NO_SID]:/home/oracle]>> cat /home/oracle/dv/monitor_osw.ksh
#!/bin/ksh
# This script checks OSWatcher process every five minutes and notify DBA via email incase if OSWatcher is not running.
Host_Name=`hostname`
MailList="abcd@joshi.com"
check_osw=`ps -ef |grep -v egrep |egrep -c "OSWatcher.sh|OSWatcherFM.sh"`
if [ ${check_osw} -lt 2 ]; then
cd /home/oracle/oswbb/
nohup /home/oracle/oswbb/OSWatcher.sh 60 168 NONE /u01/refresh/osw_archive &
exit 1
else
echo " -> OSWatcher process is running on the server ${Host_Name}"
fi
No comments:
Post a Comment