You are here

6. Install Oracle OS Watcher

6. Install Oracle OS Watcher

Applicable to all Oracle VM 3.x Releases. 
 
OS Watcher Black Box (oswbb) is a utility that uses native Linux commands and shell scripts to collect and archive metrics for diagnostics and performance troubleshooting. OS Watcher Black Box operates as a set of background processes that collect and archive data on a regular basis, using ps, top, mpstat, iostat, netstat, traceroute and vmstat. OS Watcher Black Box is comprised of three components:
1. oswbb: a shell script that collects and archives data
2. oswbba: a java utility with a GUI used to analyze oswbb data with charts and graphs
3. oswbb-service-1.1.5-1.noarch.rpm: The init script to automatically start OS Watcher Black Box (the oswbb-service-X.X.X-X.noarch.rpm init script needs to be tweeked to work with Oracle VM, see the fix below)
 
OS Watcher Black Box (oswbb & oswbba) can be downloaded via My Oracle Support document ID 301137.1: OSWatcher Black Box (Includes: [Video]) [ID 301137.1]. The init script (oswbb-service-1.1.5-1.noarch.rpm) to automatically start OS Watcher Black Box can be downloaded via My Oracle Support document ID 580513.1: How To Start OSWatcher Black Box Every System Boot [ID 580513.1]
 
Tip: OS Watcher Black Box is one of Oracle support's primary tool for working Linux Service Requests (SRs). To expedite your Oracle VM and Linux SRs, always include the OS Watcher Black Box archive files from each Oracle VM Server and Linux VM.
 
OS Watcher Black Box Installation and Setup
Once you have downloaded the OS Watcher Black box tar file, and the oswbb-service, copy the files to each Oracle VM Server. Next, untar the file in the directory where you would like to run OS Watcher Black Box, i.e. /opt, and then install the RPM.
 
The next example shows how to install OS Watcher Black Box. Substitute path_to_the_oswbb_directory with the directory name you would like to place and run OS Watcher Black Box. As root type:
# tar xvf oswbbxxx.tar -C path_to_the_oswbb_directory, i.e. tar xvf oswbbxxx.tar -C /opt
 
Next, chown the oswbb directoty to root, chown root:root -R /opt/oswbb.
 
Next, install the RPM by typing rpm -ivh oswbb-service-X.X.X-X.noarch.rpm. The oswbb-service RPM package adds an init script with the osw service to run the OS Watcher Black Box at system boot, and to stop it down gracefully at system shutdown. OS Watcher Black Box can be started and stoped using the standard Linux init scripts:
# /sbin/chkconfig oswbb on
The oswbb-service RPM package automatically configures the osw service to start at runlevel 3, 5 and 5. The next example shows the default runlevels for the oswatcher service.
# chkconfig --list |grep oswbb
oswatcher       0:off   1:off   2:on    3:on    4:on    5:on    6:off
OS Watcher Black Box can be started by typing:
# /sbin/service oswbb start
OS Watcher Black Box can be stoped by typing:
# /sbin/service oswbb stop
 
Note: As of this writing, May 12th, 2014, the oswbb-service-1.1.7-1.noarch.rpm' init script fails with: //usr///libexec/oswbb-service/oswbb-helper: line 45: unexpected EOF while looking for matching `"'                                         
Edit line 45 in the /usr/libexec/oswbb-service/oswbb-helper file as follows:
Change:
"${OSW_ARCHIVE}/heartbeat 2>&1 &
to 
"${OSW_ARCHIVE}"/heartbeat 2>&1 &
 
With the above fix, oswbb will successfully start using the oswbb-service-1.1.7-1.noarch.rpm init script.
 
The last step is to edit the OS Watcher Black Box configuration file with your enviromentail settings. The OS Watcher Black Box configuration file is located at /etc/oswbb.conf.

The next example shows the default OS Watcher Black Box settings. The file must be edited for your environmental requirements.
# cat /etc/oswbb.conf
# Set OSW_ARCHIVE where the logs should be stored
# OSW_ARCHIVE='archive'
# Set OSW_COMPRESSION to the desired compression scheme
# OSW_COMPRESSION='gzip'
# Set OSW_HOME to the directory where your OSWatcher tools are installed
# OSW_HOME='/opt/oswbb'
# Set OSW_INTERVAL to the number of seconds between collections
# OSW_INTERVAL='30'
# Set OSW_RETENTION to the number of hours logs are to be retained
# OSW_RETENTION='48'
# Set OSW_USER to the owner of the OSW_HOME directory
# OSW_USER='root'
 
The OSW_HOME directive controls the {OSWHOME} directory. {OSWHOME} is where the oswatcher logs are kept. For example, the default OSW_HOME=/opt/oswbb creates the /opt/oswbb directory for the log files. The OSW_INTERVAL directive controls the interval in seconds between statistics collections. The default OSW_INTERVAL='30' should be modified to meet your specific business requirments. The OSW_RETENTION='48' directive controls the retention policy in hours of the log files in the {OSWHOME}/archive directory. 
 
The next example shows a modified /etc/oswbb.conf file.
# Set OSW_ARCHIVE where the logs should be stored
OSW_ARCHIVE='archive'
# Set OSW_COMPRESSION to the desired compression scheme
OSW_COMPRESSION='gzip'
# Set OSW_HOME to the directory where your OSWatcher tools are installed
OSW_HOME='/opt/oswbb'
# Set OSW_INTERVAL to the number of seconds between collections
OSW_INTERVAL='30'
# Set OSW_RETENTION to the number of hours logs are to be retained
OSW_RETENTION='72'
# Set OSW_USER to the owner of the OSW_HOME directory
OSW_USER='root'
 
The OSW log files are saved in the following directories:
{OSWHOME}/archive/
oswifconfig
oswiostat
oswmeminfo
oswmpstat
oswnetstat
oswprvtnet
oswps
oswslabinfo
oswtop
oswvmstat
 

Download PDF Now!