Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Introduction to OSWatcher usage

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

OSWatcher Black Box, or OSW for short, is a small but very useful tool provided by oracle. It records some performance parameters of the OS runtime, such as CPU/Memory/Swap/Network IO/Disk IO-related information, by calling commands provided by OS itself.

But deploying OSW has many benefits:

1. It is easy to deploy and easy to delete.

two。 Resource consumption is relatively small, whether in terms of CPU, memory, or disk space.

3. Usually do not need maintenance, and when a problem occurs, it can help us quickly locate whether the problem occurs on the OS side.

The database runs on OS, and if there is an exception in OS, the database will certainly be affected; if we analyze such problems only from the point of view of the database, it is difficult to get a good result.

The official blog is as follows:

Https://blogs.oracle.com/Database4CN/entry/%E5%88%A9%E5%99%A8osw_oswatcher_black_box_%E4%B9%8B%E7%AE%80%E4%BB%8B%E7%AF%87

1. Download

Download OSW from document 301137.1 on MOS. You need an MOS account.

Baidu network disk: http://pan.baidu.com/s/1bYdzJ4

2. Installation

Find any directory to extract the installation, not in the / tmp directory, do not have to root users

[oracle@rhel6 ~] $mkdir oswatcher [oracle@rhel6 ~] $mv oswbb734.tar oswatcher/ [oracle@rhel6 ~] $cd oswatcher/ [oracle@rhel6 oswatcher] $lsoswbb734.tar [oracle@rhel6 oswatcher] $tar-xvf oswbb734.tar oswbb/oswbb/call_uptime.shoswbb/profile/oswbb/analysis/oswbb/tar_up_partial_archive.shoswbb/oswsub.shoswbb/oswrds.shoswbb/src/oswbb/src/missing_graphic.gifoswbb/src/tombody.gifoswbb/src/coe_logo.gifoswbb/src/Thumbs .dboswbb / src/OSW_profile.htmoswbb/src/oswbba_input.txtoswbb/src/watch.gifoswbb/oswib.shoswbb/call_du.shoswbb/tarupfiles.shoswbb/ltop.shoswbb/nfssub.shoswbb/docs/oswbb/docs/OSWatcher/oswbb/docs/OSWatcher/OSWatcherUserGuide.pdfoswbb/docs/OSWatcher/oswbb_README.txtoswbb/docs/The_Analyzer/oswbb/docs/The_Analyzer/oswbba_README.txtoswbb/docs/The_Analyzer/oswbbaUserGuide.pdfoswbb/docs/The_Analyzer/OSWatcherAnalyzerOverview.pdfoswbb/OSWatcher.shoswbb/psmemsub .shoswbb / call_sar.shoswbb/oswnet.shoswbb/Exampleprivate.netoswbb/mpsub.shoswbb/Example_extras.txtoswbb/OSWatcherFM.shoswbb/startOSWbb.shoswbb/ifconfigsub.shoswbb/iosub.shoswbb/oswbba.jaroswbb/vmsub.shoswbb/xtop.shoswbb/stopOSWbb.sh

OSWatcher consists of two parts:

Oswbb: this is a shell script for collecting and storing data

Oswbba: this is a java tool for analyzing collected data and providing suggestions, as well as generating pictures or html documents.

3. Start OSWatcher

The startOSWbb.sh script has four parameters:

ARG1 = snapshot interval in seconds.

ARG2 = the number of hours of archive data to store.

ARG3 = (optional) the name of a compress utility to compress each file automatically after it is created.

ARG4 = (optional) an alternate (non default) location to store the archive directory.

If you do not enter any parameters, the data is collected every 30 seconds by default, and 48 hours of data is saved by default.

By default, the collected data is stored in the archive directory under the unzipped directory, which is created when the startOSWbb.sh script is first started.

# start the startOSWbb.sh script with an interval of 15 seconds Save the data for 5 days [oracle@rhel6 oswbb] $nohup sh startOSWbb.sh 15120 & [1] 3131 [oracle@rhel6 oswbb] $nohup: ignoring input and appending output to `nohup.out' [1] + Done nohup sh startOSWbb.sh 1512 log to view the output log [oracle@rhel6 oswbb] $more nohup.out Setting the archive log directory to/home/oracle/oswatcher/oswbb/archiveTesting 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.TOP found on your system.Testing for discovery of OS CPU COUNToswbb is looking for the CPU COUNT on your systemCPU COUNT will be used by oswbba to automatically look for cpu problemsCPU COUNT found on your system.CPU COUNT = the archive directory generated by 2Discovery completed.# generates directories corresponding to different collections of information [oracle@rhel6 oswbb] $cd archive [oracle@rhel6 archive] $lsoswifconfig oswiostat oswmeminfo oswmpstat oswnetstat oswprvtnet oswps oswslabinfo oswtop oswvmstat

The MOS document ID 1531223.1 provides a detailed description of the meaning of each directory.

When OSWbb is first used, it creates some archived subdirectories. These archive directories contain seven subdirectories, one for each subdirectory to collect data. These seven directories correspond to: top, vmstat, iostat, mpstat, netstat, ps and an optional traceprivate network.

To start private network, you must first create an executable file for private.net in the oswbb directory. The contents of this file can be used to verify the RAC private network traceroute command, different platforms use different parameters of the traceroute command, private.net file can be modified and created according to the Exampleprivate.net file.

An example of HP-UX

# HP Example### # echo "zzz * *" `date`Traceroute-r-F 192.168.2.21traceroute-r-F 192.168.2.2 # DO NOT DELETE THE FOLLOWING LINE!####rm locks/lock.file

4. Analyze the logs collected by OSWatcher

Use the oswbba.jar package for log analysis, but the jara should be at version 1.4.2 or above.

Two methods to analyze data

1) generate graphics

[oracle@rhel6 oswbb] $export DISPLAY=192.168.56.1:0.0 [oracle@rhel6 oswbb] $java-jar oswbba.jar-i archiveStarting OSW Analyzer V7.3.3OSWatcher Analyzer Written by Oracle Center of ExpertiseCopyright (c) 2014 by Oracle CorporationParsing Data. Please Wait...Scanning file headers for version and platform info...Parsing file rhel6_iostat_16.12.19.1100.dat... Parsing file rhel6_vmstat_16.12.19.1100.dat... Parsing file rhel6_netstat_16.12.19.1100.dat... Parsing file rhel6_top_16.12.19.1100.dat... Parsing file rhel6_ps_16.12.19.1100.dat... Parsing Completed.Enter 1 to Display CPU Process Queue GraphsEnter 2 to Display CPU Utilization GraphsEnter 3 to Display CPU Other GraphsEnter 4 to Display Memory GraphsEnter 5 to Display Disk IO GraphsEnter 6 to Generate All CPU Gif FilesEnter 7 to Generate All Memory Gif FilesEnter 8 to Generate All Disk Gif FilesEnter L to Specify Alternate Location of Gif DirectoryEnter T to Alter Graph Time Scale Only (Does not change analysis dataset) Enter D to Return to Default Graph Time ScaleEnter R to Remove Currently Displayed GraphsEnter A to Analyze DataEnter S to Analyze Subset of Data (Changes analysis dataset including graph time scale) Enter P to Generate A ProfileEnter X to Export Parsed Data to FileEnter Q to Quit ProgramPlease Select an Option:7Generating file Gif/Dec19110157_1482117313/OSWg_OS_Memory_Swap.gifGenerating file gif/Dec19110157_1482117313/OSWg_OS_Memory_Free.gifGenerating file gif/Dec19110157_1482117313/OSWg_OS_Memory_Page_In_Rate.gif

2) generate report

[oracle@rhel6 oswbb] $java-jar oswbba.jar-I archive-AScanning file headers for version and platform info...Parsing file rhel6_iostat_16.12.19.1100.dat... Parsing file rhel6_vmstat_16.12.19.1100.dat... Parsing file rhel6_netstat_16.12.19.1100.dat... Parsing file rhel6_top_16.12.19.1100.dat... Parsing file rhel6_ps_16.12.19.1100.dat... Dates accepted. Verifying valid begin/end data points...Validating times in the archive...Recalibrating data...Scanning file headers for version and platform info...Parsing file rhel6_iostat_16.12.19.1100.dat... Parsing file rhel6_vmstat_16.12.19.1100.dat... Parsing file rhel6_netstat_16.12.19.1100.dat... Parsing file rhel6_top_16.12.19.1100.dat... Parsing file rhel6_ps_16.12.19.1100. The analysis report generated by dat... A new analysis file analysis/rhel6_1482117679897.txt has been created.# is available in the analysis directory [oracle@rhel6 oswbb] $more analysis/rhel6_1482117679897.txtThis report is best viewed in a fixed font editor like textpad...OSWatcher AnalyzerInput Archive: archiveArchive Source Dest: / home/oracle/oswatcher/oswbb/archiveArchive Start Time: Dec 19 11:01:57 2016Archive Stop Time: Dec 19 11:20:59 2016Hostname: RHEL6OS Version: LinuxSnapshot Freq: 15CPU COUNT: 2.Subsystem Status----CPU OKMEMORY OKI/O WARNING NET OK.

The MOS document ID 461053.1 describes the use of analysis tools in detail.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report