DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Tuesday, July 30, 2013

Oracle OS Watcher Black Box Analyzer OSWBBA

OSWatcher Black Box Analyzer (oswbba) is a graphing and analysis utility which comes bundled with oswbb v4.0.0 and higher.  oswbba allows the user to graphically display data collected, generate reports containing these graphs and provides a built in analyzer to analyze the data and provide details on any performance problems it detects. The ability to graph and analyze this information relieves the user of manually inspecting all the files.

NOTE: oswbba replaces the utility OSWg. This was done to eliminate the confusion caused by having multiple tools in support named OSWatcher. oswbba is only supported for data collected by oswbb and no other tool.

Best Practices

Pro-Active Problem Avoidance and Diagnostic Collection

Although some problems may be unforeseen, in many cases problems may be avoidable if signs are detected early enough. Additionally, if an issue does occur, it is no use collecting information about that issue after the event. oswbb is one of the tools that support recommend for collecting such diagnostics. For information on suggested uses, other proactive preparations and diagnostics, see:

Document 1482811.1 Best Practices: Proactively Avoiding Database and Query Performance Issues
Document 1477599.1 Best Practices Around Data Collection For Performance Issues

Overview

oswbba is written in java and requires as a minimum java version 1.4.2 or higher. oswbba can run on any Unix X Windows or PC Windows platform. An X Windows environment is required because oswbba uses Oracle Chartbuilder which requires it.

oswbba parses all the oswbb vmstat, iostat ,netstat and top utility log files contained in an archive directory.  Once the data is parsed, the user is presented with a command line menu which has options for both displaying graphs, creating binary gif files of these graphs, generating an html report containing all the graphs with narrative on what to look for, and new in this release, the ability to self-analyze the files oswbb creates.

Back to Contents

oswbba is certified to run on the following platforms:
  • AIX
  • Solaris
  • HP-UX
  • Linux
  • Windows XP
Installing oswbba

oswbba requires no installation. It comes shipped as a standalone java jar file with oswbb v4.0.0 and higher.

Starting oswbba

Before starting the oswbba utility you must have java version 1.4.2 or higher installed on your system. Java can be downloaded for free from http://www.java.com. Also if you are running Oracle you have already a version of java installed. To verify you have the correct version of java installed on your system issue the following command...

$ java -version

This should be version 1.4.2 or higher. If not, contact your system administrator to get the current version of java installed. Alternatively, you can use the version of java that comes shipped with Oracle. Here is an example of using the version of java that comes shipped with the database...(depending upon the version of the database, the jre may be in a different location)

//Note: the location of the jre is in $ORACLE_HOME/jre/1.4.2/bin
//now put this location in the UNIX PATH:
$ export PATH=$ORACLE_HOME/jre/1.4.2/bin:$PATH

Once the correct version of java has been verified, you can start oswbba. oswbba requires an input directory to run. To specify the input directory you must use the -i option. The input directory is the fully qualified path name of an archive directory containing oswbb logs. The archive directory must be the same directory structure as the archive directory for oswbb. It must contain the respective subdirectories--oswvmstat, oswiostat, oswps, oswtop, oswnetstat, etc. It is very important to note the program requires an archive directory not an individual log directory.

$java -jar oswbba.jar -i /u02/home/osw/archive
Starting OSWbba V4.0.0
OSWatcher Black Box Analyzer Written by Oracle Center of Expertise
Copyright (c)  2012 by Oracle Corporation
Parsing Data. Please Wait...
Enter 1 to Display CPU Process Queue Graphs
Enter 2 to Display CPU Utilization Graphs
Enter 3 to Display CPU Other Graphs
Enter 4 to Display Memory Graphs
Enter 5 to Display Disk IO Graphs
Enter 6 to Generate All CPU Gif Files
Enter 7 to Generate All Memory Gif Files
Enter 8 to Generate All Disk Gif Files
Enter L to Specify Alternate Location of Gif Directory
Enter T to Specify Different Time Scale
Enter D to Return to Default Time scale
Enter R to Remove Currently Displayed Graphs
Enter P to Generate A Profile
Enter A to Analyze Data
Enter Q to Quit Program
Please Select an Option:

oswbba parses all the archive files in memory prior to generating graphs or performing an analysis. If you have a large amount of files to parse you may need to allocate more memory in the java heap. If you experience any error messages regarding out of memory such as java.lang.OutOfMemoryError, you may have to increase the size of the java heap. To increase the size of the java heap use the -Xmx flag.

$java -jar -Xmx512M oswbba.jar -i /u02/home/oswbb/archive
Starting oswbba V4.0.0
OSWatcher Black Box Analyzer Written by Oracle Center of Expertise
Copyright (c)  2012 by Oracle Corporation
Parsing Data. Please Wait...

Stopping oswbba

To stop the oswbba utility select option "Q" from the menu.

Using oswbba

oswbba has multiple user interface options. If oswbba is started as above, the user will be able to choose from a list of options on a menu. In all cases oswbba must be supplied the archive directory location with the -i flag. Not all of the Disk I/O options will be available to all users. These options are only available for solaris, linux and aix, and only if iostat is collected with the extended disk statistics option. These options will also not be available if oswbba encountered any parsing issues while parsing iostat archive files.

Previously if a user wanted to analyze the archive all files in the archive would be analyzed automatically. In release 6.0, the analysis can be limited to a subset of files. This can be controlled by using the command line options -START and -STOP. These options are available if you run from the command line or if you want to use the menu. In either case, you must use the -START and -STOP option.

To use this option you must specify the starting filename in the oswvmstat directory. oswbba only analyzes file in chronological order. To specify the starting filename locate a filename in the oswvmstat directory and specify it using the -START option. The -STOP option specifies the last file in the oswvmstat directory that you want to analyze. If you specify either parameter without specifying the other parameter the following default values will be assumed:
If -START is specified and no -STOP is specified then the analysis continues through the last file in the oswvmstat directory.

If -STOP is specified and no -START is specified then the analysis starts at the oldest file in the oswvmstat directory and continues through the file specified in the -STOP option.
oswbba uses the times associated with these oswvmstat files for the other directories so that all iostat,top and netstat files will be analyzed during this time frame.

Example. In this example your archive contains 17 hours worth of data in the oswvmstat directory. You want to only analyze files starting at.13.01.09.1300 through 13.01.09.2000

$ls
coesrv40.us.oracle.com_vmstat_13.01.09.1300.dat
coesrv40.us.oracle.com_vmstat_13.01.09.1400.dat
coesrv40.us.oracle.com_vmstat_13.01.09.1500.dat
coesrv40.us.oracle.com_vmstat_13.01.09.1600.dat
coesrv40.us.oracle.com_vmstat_13.01.09.1700.dat
coesrv40.us.oracle.com_vmstat_13.01.09.1800.dat
coesrv40.us.oracle.com_vmstat_13.01.09.1900.dat
coesrv40.us.oracle.com_vmstat_13.01.09.2000.dat
coesrv40.us.oracle.com_vmstat_13.01.09.2100.dat
coesrv40.us.oracle.com_vmstat_13.01.09.2200.dat
coesrv40.us.oracle.com_vmstat_13.01.09.2300.dat
coesrv40.us.oracle.com_vmstat_13.01.10.0000.dat
coesrv40.us.oracle.com_vmstat_13.01.10.0100.dat
coesrv40.us.oracle.com_vmstat_13.01.10.0200.dat
coesrv40.us.oracle.com_vmstat_13.01.10.0300.dat
coesrv40.us.oracle.com_vmstat_13.01.10.0400.dat
coesrv40.us.oracle.com_vmstat_13.01.10.0500.dat

java -jar oswbba.jar -i archive -START coesrv40.us.oracle.com_vmstat_13.01.09.1300.dat -STOP coesrv40.us.oracle.com_vmstat_13.01.09.2000.dat


oswbba can be run with a menu driven user interface. This option gives the user the most flexibility and allows graphs to be displayed real-time. To start oswbba with the menu option issue the following on the command line...

java -jar oswbba.jar -i

After starting oswbba, a set of options will display.  Enter an option value and hit return.

OPTIONS
The following options are supported:
1..3
These options display graphs of specific CPU components of vmstat. Option 1 displays the process run, wait and block queues. Option 2 displays CPU utilization graphs for system, user and idle. Option 3 displays graphs for context switches and interrupts.
4
This option displays memory graphs for free memory and available swap..
5
This option uses the extended disk statistics option of iostat to display a list of all devices for solaris, aix and linux platforms only. The device name along with the average service time of each device is then listed. The user then selects one of the devices out of the list of devices. Graphs are available for reads/second, writes/second, service time and percent busy.
6..8
These options generate images of the graph to a file without displaying them to the screen. All graphs for that specific category, CPU, memory or IO will be generated and placed in the directory where oswbba is located. To override this directory and name an alternative location to place these files use option L discussed below.
L
User specified location of an existing directory to place any gif files generated by oswbba. This overrides the oswbba automatic convention for placing all gif files in the /gif directory. This directory must pre-exist!
A
This option analyzes the files in the archive and produces a report
P
Generates an html profile.
T
By default OSWbba parses all the OSWbb log files contained in the input directory and the default graphs are based on the entire time span of all the logs. By default, OSWbb keeps the last 48 hours of logs in the archive. This means the default graph will graph all  48 hours of of data. This option allows the user to specify a different subset of times within the entire collection . An example would be only to graph a 2 hour period out of the entire 48 hour collection.
D
This option resets the graphing timescale back to the time encompassing the entire log collection.
R
This option removes all previously displayed graphs from the screen.
Q
Exits the program.

Using oswbba: Command Line Option

All graphing, profile and analysis options are available to be passed into oswbba from the command line. Only the -i option is required. Use the table below to add additional options. Please note if the -F option is used all other options are ignored as the -F option requires input to be read in from a text file.

Please note all options are case sensitive.

java -jar oswbba.jar -i -P -L -6 -7 -8 -B

OPTIONS
The following options are supported:
-i
Required. This is the input archive directory location.
-6
Same as option 6 from the menu. Will generate all cpu gif files.
-7
Same as option 7 from the menu. Will generate all memory gif files.
-8
Same as option 8 from the menu. Will generate all disk gif files.
-L
User specified location of an existing directory to place any gif files generated by OSWbba. This overrides the OSWbba automatic convention for placing all gif files in the /gif directory. This directory must pre-exist!
-A
Same as option A above. This option analyzes the files in the archive and produces a report
-START
Used with the analysis option to specify the first file located in the oswvmstat directory to analyze.
-STOP
Used with the analysis option to specify the last file located in the oswvmstat directory to analyze.
-P
User specified name of the html profile generated by OSWbba. This overrides the oswbba automatic naming convention for html profiles. All profiles whether user specified named or auto generated named will be located in the /profile directory.
-B
Same as option T from the menu. The start time will allow the user to select a start time from within the archive of files to graph/profile. This overrides the default start time which is the earliest time entry in the archive directory.  The format of the start time is  Mon DD HH:MM:SS YYYY. (Example :Jul 25 11:58:01 2007). An end time is required if selecting this option.
-E
Same as option T from the menu. The end time will allow the user to select an end time from within the archive of files to graph/profile. This overrides the default end time which is the latest time entry in the archive directory.  The format of the end time is  Mon DD HH:MM:SS YYYY. (Example :Jul 25 11:58:01 2007). A start time is required if selecting this option.
-F
Filename of a text file containing a list of options. The user can script as many options as desired by using this option. If the -F option is entered on the command line all other options are ignored and commands are only allowed through the file interface. See a sample file named oswbba_input.txt in the src directory.

Using oswbba: Input File Option

All graphing, profile and analysis options are available to be read from a user specified text file. The format of the file is individual lines containing command line options (see above). An example file exists in the src directory (oswbba_input.txt). To specify the input file option the user must specify the -F option when running oswbba.

java -jar oswbba.jar -i -F

Example:

java -jar oswbba.jar -i archive -F src/oswbba_input.txt

Sample Profile

Generating an htmp profile is a useful feature of oswbba. This html document contains all the graphs along with some text directing the user on what to look for.

To add database metrics consider running LTOM. To see what an LTOM profile looks like click here.





1 comment:

Sridevi K said...

Regards
Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.