All you need to know about OSWatcher Black Box (OSWbb)

In this post, we are going to learn everything about OSWatcher. we are going to learn about how to install OSWatcher, how to start OSWatcher, how to stop OSWatcher and How to analyze OSWatcher logs.

What is OSWatcher and what does it do?

OSWatcher (oswbb) is a collection of UNIX shell scripts intended to collect and archive operating system and network metrics to aid support in diagnosing performance issues.

Why OSWatcher?

OSWatcher consists of a series of shell scripts. OSWatcher.sh is the main controlling executive, which spawns individual shell processes to collect specific kinds of data, using Unix operating system diagnostic utilities.

OSWatcher invokes these distinct operating system utilities, each as a distinct background process, as data collectors. These utilities will be supported, or their equivalents, as available for each supported target platform.

ps
top
ifconfig
mpstat
iostat
netstat
traceroute
vmstat
sar (HP-UX Only)
cpuinfo (Linux Only)
meminfo (Linux Only)
slabinfo (Linux Only)

On which platform I can run OSWatcher?

OSWatcher is certified to run on the following platforms:

AIX
Solaris
HP-UX
Linux

How to Install OSWatcher?

[sociallocker id=”899″]

1. Log on to My Oracle Support (MOS) at http://support.oracle.com.

2. OSWatcher can be downloade through MOS Doc ID 301137.1 as a tar file.

or you can click here to go to the location where you can download the OSWatcher

3. Copy the file to the directory where you want to install OSWbb, and run the following command:

tar xvf oswbb812.tar

4. The following files are created under oswbb folder after the installation was successful.

[/sociallocker]

[grid@test01 oswbb]$pwd
/u01/OSWatcher/oswbb

How to install OSWbb on RAC?

The process for installing OSWbb on rac is same as mentioned above, but we need to as a grid user or oracle clusterware owner user.

How to start OSWatcher?

OSWatcher can be invoked by executing startOSWbb.sh

Syntax:

startOSWbb.sh [frequency duration]

Here, The optional frequency and duration arguments specifying how often in seconds OSWbb should collect data and the number of hours for which OSWbb should run. The default values are 30 seconds and 48 hours. The following example starts OSWbb recording data at intervals of 300 seconds, and has it record data for 8 hours:

[grid@test01 oswbb]$pwd
/u01/OSWatcher/oswbb
[grid@test01 oswbb]$

[grid@test01 oswbb]$./startOSWbb.sh 300 8

How to find OSWatcher logs?

OSWbb collects data in the following directories under the oswbb/archive directory.

How to stop OSWatcher?

To stop OSWbb prematurely, run the stopOSWbb.sh script from the oswbb directory.

./stopOSWbb.sh

How to generate OSWatcher report?

you can use the OSWbb analyzer (OSWbba) to provide information on system slowdowns, system hangs and other performance problems, and also to graph data collected from iostat, netstat, and vmstat. OSWbba requires that you have installed Java version 1.4.2 or higher on your system.

In your environment, it may be required to set java path before invoking OSWbba.jar

export PATH=/u01/app/11.2.0/grid/jdk/jre/bin:$PATH

The following command will analyze the system data from 11:20:55 AM to 12:30:58 AM.

java -jar oswbba.jar -i /u01/OSWatcher/oswbb/archive -B Jun 12 11:20:55 2018 -E Jun 12 12:30:58 2018

There are numerous parameters that we can set when analyzing the OSWbba, the complete list of parameters can be found here

Complete OSWbb Analyzer User Guide (Doc ID 461053.1)

When executed, it asks for an option to display the desired results.

Example.,

Here, I have given A, i.e., analyze data, A new file is created analysis/test01_Jun12120106_1528816730/analysis.txt which is our analyzer file.

you can open this file with any text editor to analyze system performance.

sample output of the file is

Also read,

100 scripts you should know as a DBA – Part 1

Words from dbapath

Thank you for giving your valuable time to read the above information. I hope the content served your purpose in reaching out the blog.
Suggestions for improvement of the blog are highly appreciable. Please contact us for any information/suggestion/feedback.

If you want to be updated with all our articles

please follow us on Facebook Twitter
Please subscribe to our newsletter.