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
1 2 3 4 5 6 7 8 9 10 11 12 |
[grid@test01 oswbb]$ls Example_extras.txt data oswbba.jar startOSWbb.sh Exampleprivate.net docs oswib.sh stopOSWbb.sh OSWatcher.sh genprvnet.sh oswnet.sh tar_up_full_archive.sh OSWatcher.sh~ gif oswrds.sh tar_up_partial_archive.sh OSWatcherFM.sh ifconfigsub.sh oswsub.sh tmp analysis iosub.sh private.net topaix.sh archive locks psmemsub.sh vmsub.sh call_du.sh ltop.sh sarsub.sh xtop.sh call_sar.sh mpsub.sh src call_uptime.sh nfssub.sh ssh1.net [grid@test01 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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[grid@test01 oswbb]$Setting the archive log directory to/u01/OSWatcher/oswbb/archive Testing for discovery of OS Utilities... VMSTAT found on your system. IOSTAT found on your system. MPSTAT found on your system. IFCONFIG found on your system. NETSTAT found on your system. TRACEROUTE found on your system. private.net already exists ! Discovery of CPU CORE COUNT CPU CORE COUNT will be used by oswbba to automatically look for cpu problems CPU CORE COUNT = 6 VCPUS/THREADS = lcpu=24 Discovery completed. Starting OSWatcher v8.1.2 on Tue Jun 12 20:39:34 IST 2018 With SnapshotInterval = 300 With ArchiveInterval = 8 OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation For questions on install/usage please go to MOS (Note:301137.1) If you need further assistance or have comments or enhancement requests you can email me Carl.Davis@Oracle.com Data is stored in directory: /u01/OSWatcher/oswbb/archive Starting Data Collection... oswbb heartbeat:Tue Jun 12 20:39:39 IST 2018 [grid@test01 oswbb]$ |
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.,
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
[grid@test01 oswbb]$java -jar oswbba.jar -i /u01/OSWatcher/oswbb/archive -B Jun 12 11:20:55 2018 -E Jun 12 12:30:58 2018 This directory already exists. Rewriting... This directory already exists. Rewriting... This directory already exists. Rewriting... Validating times in the archive... Warning. The begin date you entered is not contained in the archive directory The begin date you entered is: Tue Jun 12 11:20:55 IST 2018 The earliest date in the archive is: Tue Jun 12 12:01:06 IST 2018 Defaulting to using the earliest date in the archive Starting OSW Analyzer V8.1.2 OSWatcher Analyzer Written by Oracle Center of Expertise Copyright (c) 2017 by Oracle Corporation Parsing Data. Please Wait... This directory already exists. Rewriting... Scanning file headers for version and platform info... Parsing file test01_iostat_18.06.12.1200.dat ... This directory already exists. Rewriting... Parsing file test01_vmstat_18.06.12.1200.dat ... Parsing file test01_netstat_18.06.12.1200.dat ... Parsing file test01_top_18.06.12.1200.dat ... Parsing file test01_ps_18.06.12.1200.dat ... Parsing Completed. 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 GC to Generate All CPU Gif Files Enter GM to Generate All Memory Gif Files Enter GD to Generate All Disk Gif Files Enter GN to Generate All Network Gif Files Enter L to Specify Alternate Location of Gif Directory Enter Z to Zoom Graph Time Scale (Does not change analysis dataset) Enter B to Returns to Baseline Graph Time Scale (Does not change analysis dataset) Enter R to Remove Currently Displayed Graphs Enter X to Export Parsed Data to Flat File Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale) Enter A to Analyze Data Enter D to Generate DashBoard Enter Q to Quit Program Please Select an Option:A Enter a unique analysis directory name or enter <CR> to accept default name: This directory already exists. Rewriting... A new analysis file analysis/test01_Jun12120106_1528816730/analysis.txt has been created. |
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
############################################################################ # Section 1: System Status # # This section lists the status of each major subsystem. Status values are: # Critical: The subsystem requires immediate attention # Warning: The subsystem detailed findings should be reviewed # OK: The subsystem was found to be okay # Unknown: The status of the subsystem could not be determined # # Subsystem Status ------------------------ CPU OK MEMORY OK I/O OK NET WARNING ############################################################################ |
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.