HOW TO INSTALL OSWATCHER IN LINUX

HOW TO INSTALL OSWATCHER IN LINUX

Download OSWATCHER file from the below link

https://support.oracle.com/epmos/main/downloadattachmentprocessor?attachid=301137.1:OSW_file.

Copy the file to the server using winscp and untar the OSWBB file

[oracle@orcl19x oswbb]$ tar -xvf oswbb840.tar

Go to the oswbb directory

[oracle@orcl19x oswbb]$ cd oswbb/
[oracle@orcl19x oswbb]$ ls
analysis        docs                locks           oswib.sh     sarsub.sh
archive         Example_extras.txt  ltop.sh         oswnet.sh    src
arpsub.sh       Exampleprivate.net  mpsub.sh        oswrds.sh    startOSWbb.sh
call_du.sh      genprvnet.sh        nfssub.sh       oswsub.sh    stopOSWbb.sh
call_sar.sh     gif                 OSWatcherFM.sh  piddsub.sh   tar_up_full_arc
call_uptime.sh  ifconfigsub.sh      OSWatcher.sh    pidsub.sh    tar_up_partial_
data            iosub.sh            oswbba.jar      psmemsub.sh  tmp

Check if ksh package is installed on your system

[oracle@orcl19x oswbb]$ rpm -qa|grep ksh
ksh-20120801-142.0.1.el7.x86_64

[oracle@orcl19x oswbb]$ ln -s /bin/ksh /usr/bin/ksh
ln: failed to create symbolic link ‘/usr/bin/ksh’: File exists

[oracle@orcl19x oswbb]$ ls -lrt /usr/bin/ksh
lrwxrwxrwx. 1 root root 21 Dec 13 11:21 /usr/bin/ksh -> /etc/alternatives/ksh

Sample output from oswatcher script with snapshot interval of 5 and archive data collection for 10 hours

[oracle@orcl19x oswbb]$ ./OSWatcher.sh 5 10
Setting the archive log directory to/home/oracle/oswbb/oswbb/archive

Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
IP found on your system.
TOP found on your system.
Warning... /proc/slabinfo not found on your system. Check to see if this user ha                         s permission to access this file.
PIDSTAT found on your system.
NFSIOSTAT found on your system.
TRACEROUTE found on your system.

Discovery of CPU CORE COUNT
CPU CORE COUNT will be used by oswbba to automatically look for cpu problems

CPU CORE COUNT = 1
VCPUS/THREADS = 1

Discovery completed.

Starting OSWatcher v8.4.0  on Sat May 29 22:15:40 IST 2021
With SnapshotInterval = 5
With ArchiveInterval = 10

OSWatcher - Written by Carl Davis, Center of Expertise,
Oracle Corporation
For questions on install/usage please go to MOS (Note:301137.1)

Data is stored in directory: /home/oracle/oswbb/oswbb/archive

Starting Data Collection...

oswbb heartbeat:Sat May 29 22:15:45 IST 2021
oswbb heartbeat:Sat May 29 22:15:51 IST 2021
oswbb heartbeat:Sat May 29 22:15:56 IST 2021
oswbb heartbeat:Sat May 29 22:16:01 IST 2021
oswbb heartbeat:Sat May 29 22:16:06 IST 2021
oswbb heartbeat:Sat May 29 22:16:12 IST 2021
oswbb heartbeat:Sat May 29 22:16:17 IST 2021
oswbb heartbeat:Sat May 29 22:16:22 IST 2021
oswbb heartbeat:Sat May 29 22:16:27 IST 2021
oswbb heartbeat:Sat May 29 22:16:32 IST 2021
oswbb heartbeat:Sat May 29 22:16:38 IST 2021
oswbb heartbeat:Sat May 29 22:16:43 IST 2021
oswbb heartbeat:Sat May 29 22:16:48 IST 2021
oswbb heartbeat:Sat May 29 22:16:53 IST 2021
oswbb heartbeat:Sat May 29 22:16:59 IST 2021
***Warning. VMSTAT response is spanning snapshot intervals.
***Warning. MPSTAT response is spanning snapshot intervals.
***Warning. IOSTAT response is spanning snapshot intervals.
***Warning. PIDSTAT -d response is spanning snapshot intervals.
***Warning. PIDSTAT response is spanning snapshot intervals.
***Warning. TOP response is spanning snapshot intervals.

To run the script in background, use nohup mode

[oracle@orcl19x oswbb]$ nohup ./OSWatcher.sh 30 10 &
[1] 7682
[oracle@orcl19x oswbb]$ nohup: ignoring input and appending output to ‘nohup.out’

There are lot of reports generated by this script and choose the one for which you need to analyze

[oracle@orcl19x archive]$ java -jar /home/oracle/oswbb/oswbb/oswbba.jar -I /home/oracle/oswbb/oswbb/archive -B May 29 22:15:14 2021 -E May 29 22:16:14 2021

Validating times in the archive...


Starting OSW Analyzer V8.4.0
OSWatcher Analyzer Written by Oracle Center of Expertise
Copyright (c)  2019 by Oracle Corporation

Parsing Data. Please Wait...

Scanning file headers for version and platform info...


Parsing file orcl19x_pidstat_21.05.29.2200.dat ...

Parsing file orcl19x_iostat_21.05.29.2200.dat ...
This directory already exists. Rewriting...

Parsing file orcl19x_vmstat_21.05.29.2200.dat ...

Parsing file orcl19x_netstat_21.05.29.2200.dat ...

Parsing file orcl19x_top_21.05.29.2200.dat ...

Parsing file orcl19x_ps_21.05.29.2200.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 61 to Display Individual OS Process I/O RPS Graphs
Enter 62 to Display Individual OS Process I/O WPS Graphs
Enter 63 to Display Individual OS Process Percent User CPU Graphs
Enter 64 to Display Individual OS Process Percent System CPU Graphs
Enter 65 to Display Individual OS Process Percent Total CPU (User + System) Graphs
Enter 66 to Display Individual OS Process Percent Memory Graphs

Enter GP to Generate Individual Process Profile
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

I choose GP option to generate individual process report

Please Select an Option:GP

Ospid's Ordered by Average Percent Total CPU:

PID     Average Percent Total CPU    Command

3162                         0.12    ora_pman_orcl19
8883                         0.12    top
8542                         0.13    ora_m000_orcl19
2678                         0.13    pcscd
5232                         0.26    ora_dia0_orcl19

Specify Ospid to View (Q to exit):   8542
Generating file gif/May29221452_1622307537/8542/CPU_PERCENT_USER.gif
Generating file gif/May29221452_1622307537/8542/CPU_PERCENT_SYSTEM.gif
Generating file gif/May29221452_1622307537/8542/CPU_PERCENT_TOTAL.gif
Generating file gif/May29221452_1622307537/8542/MEMORY_PERCENT_TOTAL.gif
Generating file gif/May29221452_1622307537/8542/WPS.gif
Generating file gif/May29221452_1622307537/8542/RPS.gif
Profile has been written to the gif directory.

You will get a gif graph on the process specific CPU consumption

Similarly , look for other options for all parameters

Leave a Reply

%d bloggers like this: