Install Oracle OSWatcher as Linux Service in RHEL/CentOS/OEL 7.x

Install Oracle OSWatcher as Linux Service in RHEL/CentOS/OEL 7.x:

Download the OSWBB from Oracle Site:
https://support.oracle.com/epmos/main/downloadattachmentprocessor?attachid=301137.1:OSW_file

For example download & keep the file at - /Downloads/oswbb812.tar

Copy the OSWatcher binary to the host:
cp /Downloads/oswbb812.tar /opt/

Extract the binary on host:
cd /opt; tar -xvf oswbb812.tar

make new log folder for OSWatcher:
mkdir -p /var/log/oswbb

Create OS Watcher Service Script as - /Downloads/oswatcher

#!/bin/bash
#
# chkconfig: 2345 15 90
# description: Starts and stops the OSWatcher
#
#
OSWBB_SRC_DIR=/opt/oswbb
echo $OSWBB_SRC_DIR
echo "******************************************************" >> $OSWBB_SRC_DIR/init_oswbb.log
case $1 in
'start')
        echo "...Starting OSWBB from init at `date` " >> $OSWBB_SRC_DIR/init_oswbb.log
        cd $OSWBB_SRC_DIR; nohup ./OSWatcher.sh 30 168 gzip /var/log/oswbb &
        touch /var/lock/subsys/oswatcher
;;
'stop')
        echo "...Stopping OSWBB from init at `date` " >> $OSWBB_SRC_DIR/init_oswbb.log
        cd $OSWBB_SRC_DIR; ./stopOSWbb.sh
        rm -f /var/lock/subsys/oswatcher
;;
'status')
        ps -aef |grep OSWatcher |grep -v grep
;;
*)
        echo "Usage: $0 start|stop" >&2
        exit 1
;;
esac
exit 0

Copy the service script to init scripts folder:
cp /Downloads/oswatcher /etc/init.d/

Activate OSWather as Service:
chkconfig --add oswatcher
chkconfig --list oswatcher

Start the OS Watcher:
service oswatcher start

See the Service status:
service oswatcher status

To stop the OS Watcher Service:
service oswatcher stop

Data is stored in directory: /var/log/oswbb

Check size of the Log Folder (/var has 20 GB space allocated)
du -h /var/log/oswbb
ls -alrth /var/log/oswbb

Run GUI Analyzer:
cd /opt/oswbb

java -jar oswbba.jar -i /var/log/oswbb

Comments

Popular posts from this blog

Access Oracle OCI Object Storage through GUI Client

Instance OS Baseline Configuration Runbook

Accessing OCI Compute Instances Using VNC Console (Instance Console Connection)