OSWATCHER is an oracle utility used to capture performance metrics from the operating system. We can get it easily from oracle website, and it doesnt need additional license.

In this article, we will show ,how to install oswatcher utility and its application.

1. Download oswatcher from oracle support.

OSWatcher (Doc ID 301137.1)

2. Copy and untar the file :

/archive/OSWATCHER# pwd
/archive/OSWATCHER

/archive/OSWATCHER# ls -ltr
total 12557
-rw-r--r--   1 oracle   oinstall 6318080 Jul 31  2016 oswbb734.tar
/archive/OSWATCHER# tar -xvf oswbb734.tar

x oswbb, 0 bytes, 0 tape blocks
x oswbb/call_uptime.sh, 71 bytes, 1 tape blocks
x oswbb/profile, 0 bytes, 0 tape blocks
x oswbb/analysis, 0 bytes, 0 tape blocks
x oswbb/tar_up_partial_archive.sh, 4219 bytes, 9 tape blocks
x oswbb/oswsub.sh, 524 bytes, 2 tape blocks
x oswbb/oswrds.sh, 825 bytes, 2 tape blocks
x oswbb/src, 0 bytes, 0 tape blocks
x oswbb/src/missing_graphic.gif, 8694 bytes, 17 tape blocks
x oswbb/src/tombody.gif, 4175 bytes, 9 tape blocks
x oswbb/src/coe_logo.gif, 2994 bytes, 6 tape blocks
x oswbb/src/Thumbs.db, 10240 bytes, 20 tape blocks
x oswbb/src/OSW_profile.htm, 26288 bytes, 52 tape blocks
x oswbb/src/oswbba_input.txt, 135 bytes, 1 tape blocks
x oswbb/src/watch.gif, 5621 bytes, 11 tape blocks
x oswbb/oswib.sh, 414 bytes, 1 tape blocks
x oswbb/call_du.sh, 67 bytes, 1 tape blocks
x oswbb/tarupfiles.sh, 746 bytes, 2 tape blocks
x oswbb/ltop.sh, 1486 bytes, 3 tape blocks
x oswbb/nfssub.sh, 740 bytes, 2 tape blocks
x oswbb/docs, 0 bytes, 0 tape blocks
x oswbb/docs/OSWatcher, 0 bytes, 0 tape blocks
x oswbb/docs/OSWatcher/OSWatcherUserGuide.pdf, 3531131 bytes, 6897 tape blocks
x oswbb/docs/OSWatcher/oswbb_README.txt, 14309 bytes, 28 tape blocks
x oswbb/docs/The_Analyzer, 0 bytes, 0 tape blocks
x oswbb/docs/The_Analyzer/oswbba_README.txt, 28319 bytes, 56 tape blocks
x oswbb/docs/The_Analyzer/oswbbaUserGuide.pdf, 1959618 bytes, 3828 tape blocks
x oswbb/docs/The_Analyzer/OSWatcherAnalyzerOverview.pdf, 393822 bytes, 770 tape blocks
x oswbb/OSWatcher.sh, 35108 bytes, 69 tape blocks
x oswbb/psmemsub.sh, 1445 bytes, 3 tape blocks
x oswbb/call_sar.sh, 68 bytes, 1 tape blocks
x oswbb/oswnet.sh, 435 bytes, 1 tape blocks
x oswbb/Exampleprivate.net, 1864 bytes, 4 tape blocks
x oswbb/mpsub.sh, 542 bytes, 2 tape blocks
x oswbb/Example_extras.txt, 626 bytes, 2 tape blocks
x oswbb/OSWatcherFM.sh, 5062 bytes, 10 tape blocks
x oswbb/startOSWbb.sh, 2574 bytes, 6 tape blocks
x oswbb/ifconfigsub.sh, 772 bytes, 2 tape blocks
x oswbb/iosub.sh, 743 bytes, 2 tape blocks
x oswbb/oswbba.jar, 233897 bytes, 457 tape blocks
x oswbb/vmsub.sh, 545 bytes, 2 tape blocks
x oswbb/xtop.sh, 1486 bytes, 3 tape blocks
x oswbb/stopOSWbb.sh, 558 bytes, 2 tape blocks

3. Start the oswatcher in background.

nohup ./startOSWbb.sh 30 168 & 

30 - > Means snapshot interval in seconds.
168 -> the number of hours of archive data to store

4. Validate whether oswatcher is running or not

/archive/OSWATCHER/oswbb# ps -ef | grep oswbb
  oracle 22475 22221   0 15:13:24 pts/1       0:00 /bin/sh ./OSWatcherFM.sh 168 /archive/OSWATCHER/oswbb/archive
  oracle 23164 14751   0 15:14:38 pts/1       0:00 grep oswbb

diagostic data will be generated under archive directory


/archive/OSWATCHER/oswbb/archive# ls -ltr
total 24
drwxr-xr-x   2 oracle   oinstall       2 Nov 23 15:12 oswprvtnet
drwxr-xr-x   2 oracle   oinstall       2 Nov 23 15:12 oswifconfig
drwxr-xr-x   2 oracle   oinstall       3 Nov 23 15:13 oswvmstat
drwxr-xr-x   2 oracle   oinstall       3 Nov 23 15:13 oswmpstat
drwxr-xr-x   2 oracle   oinstall       3 Nov 23 15:13 oswnetstat
drwxr-xr-x   2 oracle   oinstall       3 Nov 23 15:13 oswiostat
drwxr-xr-x   2 oracle   oinstall       3 Nov 23 15:13 oswtop
drwxr-xr-x   2 oracle   oinstall       3 Nov 23 15:13 oswps

6. Generate graphs for CPUs and memory usage from oswatcher files.

We can generate graphs for CPU and memory and disk io statistics from the oswatcher collected files for a particular time period. Make sure the oswatcher files exists for that timeframe.

SYNTAX - >

java -jar oswbba.jar -I  ARCHIVE_LOCATION  -B  BEGIN_TIME -E END_TIME 

EXAMPLE ->

java -jar oswbba.jar -I /archive/OSWATCHER/oswbb/archive -B Nov 23 15:17:00 2017 -E Nov 23 15:20:00 2017

Validating times in the archive...


Starting OSW Analyzer V7.3.3
OSWatcher Analyzer Written by Oracle Center of Expertise
Copyright (c)  2014 by Oracle Corporation

Parsing Data. Please Wait...

This directory already exists. Rewriting...
Scanning file headers for version and platform info...


Parsing file sec60-1_iostat_17.11.23.1500.dat ...


Parsing file sec60-1_vmstat_17.11.23.1500.dat ...

Parsing file sec60-1_netstat_17.11.23.1500.dat ...


Parsing file sec60-1_top_17.11.23.1500.dat ...


Parsing file sec60-1_ps_17.11.23.1500.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 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 Alter Graph Time Scale Only (Does not change analysis dataset)
Enter D to Return to Default Graph Time Scale
Enter R to Remove Currently Displayed Graphs

Enter A to Analyze Data
Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale)

Enter P to Generate A Profile
Enter X to Export Parsed Data to File
Enter Q to Quit Program

Please Select an Option:

It will ask for the selection. Suppose we need CPU utilization graphs, then press 2 .

 

 

oswatcher DB TOOLS