In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly shows you "how to use Oracle OS Watcher tools", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "how to use Oracle OS Watcher tools" this article.
1. OS Watcher Black Box installation configuration (oswbb)
1. Download the tar package of oswbb, decompress it and authorize:
Tar xvf oswbb.tar
Chmod 744 *
two。 Uninstall:
To uninstall OSWatcher, issue the following command in the oswbb directory:
Rm-rf oswbb
3. Set up OSWbb
When the OSWbb installation is complete, you can use the start and stop scripts, which create archived subdirectories the first time OSWbb is used. 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 traceroute command of RAC private network
Set up communication check between private networks:
A) enter the decompressed directory and copy Exampleprivate.net as private.net to the same directory.
b)。 Find your corresponding system platform in private.net, and replace the following private_nodename1. Private_nodename2 is the specific private network IP or host name.
Traceroute-r-F private_nodename1
Traceroute-r-F private_nodename2
c)。 Delete the rest of the platform in private.net.
d)。 Never delete the following: rm locks/lock.file
4. Start / stop oswbb Starting / Stopping oswbb
Start oswbb:Starting oswbb
To start the oswbb utility execute the startOSWbb.sh shell script from the directory where oswbb was installed. This script has 2 arguments which control the frequency that data is collected and the number of hour's worth of data to archive.
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 arguments the script runs with default values of 30 and 48 meaning collect data every 30 seconds and store the last 48 hours of data in archive files.
-if these two parameters are not specified at startup, the default is to collect them every 30 seconds, and the archived data will be retained for 48 hours.
Example 1: This would start the tool and collect data at default 30 second intervals and log the last 48 hours of data to archive files.
This will launch the tool and collect data at the default interval of 30 seconds, and record the last 48 hours of data to the archive file
. / startOSWbb.sh
Example 2: This would start the tool and collect data at 60 second intervals and log the last 10 hours of data to archive files and automatically compress the files.
Example 2: this launches the tool and collects data at 60-second intervals and records the last 10 hours of data to archive and automatically compress the file.
. / startOSWbb.sh 60 10 gzip
Example 3: This would start the tool and collect data at 60 second intervals and log the last 10 hours of data to archive files, compress the files and set the archive directory to a non-default location.
Example 3: this starts the tool and collects data at 60-second intervals, records the last 10 hours of data to archive the file, compresses the file, and sets the archive directory to a non-default location
. / startOSWbb.sh 60 10 gzip / u02/tools/oswbb/archive
Example 4: This would start the tool and collect data at 60 second intervals and log the last 48 hours of data to archive files, NOT compress the files and set the archive directory to a non-default location.
Example 4: this launches the tool and collects data at 60-second intervals, records the last 48 hours of data to an archive file instead of compressing the file, and sets the archive directory to a non-default location.
. / startOSWbb.sh 60 48 NONE / u02/tools/oswbb/archive
Example 5: This would start the tool, put the process in the background, enable to the tool to continue running after the session has been terminated, collect data at 60 second intervals, and log the last 10 hours of data to archive files.
Example 5: this starts the tool, puts the process in the background, keeps the tool running after the session terminates, collects data at 60-second intervals, and records the last 10 hours of data to an archive file
Nohup. / startOSWbb.sh 60 10 &
Stop oswbb:Stopping oswbb
To stop the oswbb utility execute the stopOSWbb.sh command from the directory where oswbb was installed. This terminates all the processes associated with the tool.
Example:
. / stopOSWbb.sh
II. OS Watcher Black Box Analyzer installation and configuration (oswbba)
MOS:OS Watcher Black Box Analyzer User Guide [ID 461053.1]
2.1 java 1.4.2 or above must be installed before starting the OSWbba tool. Of course, if you have installed Oracle, there is also java in the oracle installation directory.
[root@dbrac1 ~] # su-oracle
[oracle@dbrac1] $java-version
Java version "1.6.020"
OpenJDK RuntimeEnvironment (IcedTea6 1.9.7) (rhel-1.39.1.9.7.el6-x86_64)
OpenJDK 64-BitServer VM (build 19.0-b09, mixed mode)
The java I installed here is version 1.6.
If you use Oracle's Java, you need to modify the environment variable to add the path of Java to the Path, such as:
PATH=$ORACLE_HOME/jdk/bin:$PATH
2.2 start oswbba
Note that displaying the picture here requires the use of X windows or xmanger graphics tools, so we will execute it in the graphics window:
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 location containing the oswbb logs. The archive directory must contain the respective subdirectories--oswvmstat, oswiostat, oswps, oswtop, oswnetstat, etc. If you are running Linux or HP-UX, then additional directories are also created. It is important to note the program requires an archive directory name not an individual log directory name or individual filename.
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 standard pathname of the location of the archive directory that contains the oswbb logs. The archive directory must contain the corresponding subdirectory-oswvmstat,oswiostat,oswps,oswtop,oswnetstat, etc. If you are running Linux or HP-UX, additional directories will be created. It is important to note that the program needs an archive directory name, not a separate log directory name or personal file name
The command is as follows:
Note that X windows is needed to display the picture here, so we need to execute it in the graphics window: xhost +, in the root user interface of the virtual machine terminal.
[root@dbrac1] # xhost +
Access control disabled, clients canconnect from any host
[root@dbrac1 ~] # su-oracle
[oracle@dbrac1 oswbb] $pwd
/ home/oracle/oswbb/oswbb
[oracle@dbrac1 oswbb] $
[oracle@dbrac1 oswbb] $ls oswbba.jar
Oswbba.jar
[oracle@dbrac1 oswbb] $
[oracle@dbrac1 oswbb] $java-jar oswbba.jar-I / home/oracle/oswbb/oswbb/archive
The output is as follows:
Starting OSWbba V8.0.0
OSWatcher Analyzer Written by Oracle Center of Expertise
Copyright (c) 2017 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 5 to Display NFS 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 GF to Generate All NFS Gif Files
Enter A to Analyze Data
Enter S to Analyze Subset of Data (Changes analysis dataset including graph time scale
Enter D to Generate Dashboard
Enter L to Specify Alternate Location of Gif Directory
Enter T to Specify Different Time Scale
Enter B to Return to Default Time scale
Enter R to Remove Currently Displayed Graphs
Enter X to Export Parsed Data to File
Enter Q to Quit Program
Please Select an Option:
2.2 Java Heap Errors on Startup: Java heap error occurred at startup
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.
Oswbba parses all archived files in memory before generating the drawing or performing the analysis. If you have a lot of file parsing, you may need to allocate more memory in the java heap. If you encounter any error messages about insufficient memory, such as java.lang.OutOfMemoryError, you may need 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 V7.0
OSWatcher Analyzer Written by Oracle Center of Expertise
Copyright (c) 2012 by Oracle Corporation
Parsing Data. Please Wait...
2.3 stop oswbba/Stopping oswbba
To stop the oswbba utility select option "Q" from the menu.
To stop the oswbba utility, select the option "Q" from the menu.
2.4 how oswbba is used:
In any case, oswbba must use the-I flag to provide the location of the archive directory
2.4.1 Using oswbba: Menu Option (menu usage)
The command is as follows:
Java-jar oswbba.jar-I
After starting oswbba, a set of options will display. Enter an option value and hit return.
When you start oswbba, a set of options is displayed. Enter an option value and click back
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.
These options display graphics for specific CPU components of vmstat. Option 1 shows the process running, waiting, and blocking queues. Option 2 shows the CPU utilization chart for the system, users, and idle. Option 3 displays graphics for context switching and interruptions
4 This option displays memory graphs for free memory and available swap.
This option displays a memory diagram of available memory and available swapping
5 this option displays graphs for disk i/o. 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.
This option displays the graph of disk I / O. Then list the device name and the average service time for each device. The user then selects a device from the list of devices. The chart can be used for read / second, write / second, service time and busy percentage
6 This option display nfs statistics. This option is available only on Linux and only if nfsiostat is enabled in OSWatcher
This option displays nfs statistics. This option is available only on Linux and only if nfsiostat is enabled in OSWatcher
GC Generates image files of the graphs associated with OS CPU (Option 1,2,3 above). These files are by default written to the gif directory but can be written to any directory by the use of Option L below.
Generate an image file of the graphics associated with the OS CPU (option 1 / 2 / 3 above). These files are written to the gif directory by default, but you can write to any directory by using the option L below.
GM Generates image files of the graphs associated with OS memory (Option 4 above). These files are by default written to the gif directory but can be written to any directory by the use of Option L below.
Generate an image file of graphics related to OS memory (option 4 above). These files are written to the gif directory by default, but you can write to any directory by using the option L below.
GD Generates image files of I stats (Option 5 above). These files are by default written to the gif directory but can be written to any directory by the use of Option L below.
Generate an image file for I / O statistics (option 5 above). These files are written to the gif directory by default, but can be written to any directory by using the option L below
GN Generates image files of the graphs associated with OS network (Option 5 above). These files are by default written to the gif directory but can be written to any directory by the use of Option L below.
Generate an image file of the graphics associated with the OS network (option 5 above). These files are written to the gif directory by default, but can be written to any directory by using the option L below
GF Generates image files of the graphs associated with NFSIOSTAT for Linux only (Option 6 above). These files are by default written to the gif directory but can be written to any directory by the use of Option L below.
Only image files for NFSIOSTAT for Linux-related drawings are generated (option 6 above). These files are written to the gif directory by default, but can be written to any directory by using the option L below
L This option allows the user to specify an alternative location to place the image and data (XLS) files.
This option allows the user to specify an alternate location to place image and data (XLS) files
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 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.
By default, OSWbba parses all OSWbb log files contained in the input directory, and the default drawing is based on the entire time span of all logs. By default, OSWbb keeps the last 48 hours of logs in the archive. This means that the default graph will draw all 48 hours of data. This option allows the user to specify a different subset of times throughout the collection. One example is just to draw 2 hours of the entire 48-hour collection.
B This option resets the graphing timescale back to the time encompassing the entire log collection. Please note this resets the time for graphs but does not reset the time for analysis.
This option resets the chart schedule to include the time for the entire log collection. Note that this resets the time of the chart, but not the time of the analysis
R This option removes all graphs from the screen.
This option removes all graphics from the screen.
X This option exports the analyzer parsed data to flat files that can be loaded into a spreadsheet. The exported data is written to the data subdirectory.
This option exports the data analyzed by the analyzer to a flat file that can be loaded into a spreadsheet. The exported data is written to the data subdirectory
A This option analyzes the files in the archive and produces a report.
This option analyzes the files in the archive and generates a report
S This option analyzes a subset of the data in the oswbb directory and produces a report in the analysis directory.
This option analyzes the subset of data in the oswbb directory and generates a report in the analysis directory
D Generates a responsive web page dashboard. The dashboard integrates the analyzer text base report (option A) with a menu driven interface that quickly helps identifies critical issues and provides guidance on what to look for. Selecting this option will first generate the analysis option (A) as this data is required for the dashboard option.
Generate a responsive web dashboard. The dashboard integrates the analyzer text-based report (option A) with a menu-driven interface to quickly identify key issues and provide guidance on finding content. Selecting this option first generates the analysis option (A) because the dashboard option requires this data.
Q Exits the program. Exit the program
2.4.2 Using oswbba: Command Line Option (command line usage)
All graphics, dashboard generation, and analysis options can be passed from the command line to oswbba. Only the-I option is required. Use the following table to add additional options:
Java-jar oswbba.jar-I-P-L-6-7-8
Example:
Java-jar oswbba.jar-I archive-6-7-P tuesday_crash
The options command is as follows
The following options are supported:
-I Required. This is the input archive directory location.
-GC Same as option GC from the menu. Will generate all cpu gif files.
-GM Same as option GM from the menu. Will generate all memory gif files.
-GD Same as option GD from the menu. Will generate all disk gif files.
-GN Same as option GN from the menu. Will generate all network gif files.
-GF Same as option GF from the menu. Will generate all nfs gif files.
-S This option used with other options to identify only a subset of the data in the oswbb directory will be used for analysis.
This option is used in conjunction with other options to identify only a portion of the data in the oswbb directory and will be used for analysis
-L User specified location of an existing directory to place any gif files or data files (xls files) generated by oswbba. This overrides the oswbba default location. This directory must pre-exist!
An existing directory location specified by the user to place any gif files or data files (xls files) generated by oswbba. This overrides the default location of oswbba. This directory must exist in advance!
-A Same as option An above. This option analyzes the files in the archive directory and produces a report in the analysis directory. If you do not specify an analysis directory, then the files will be placed in a system generated directory name under the analysis directory. If you do not want to put the optional name make sure this is the last option on the command line.
Same as option An above. This option analyzes the files in the archive directory and generates a report in the analysis directory. If you do not specify an analysis directory, the file is placed in the system-generated directory name under the analysis directory. If you don't want to put an optional name, make sure this is the last option on the command line
-D Same as option D above. This option generates a dashboard (responsive web page). The dashboard integrates the analyzer text base report (option A) with a menu driven interface that quickly helps identifies critical issues and provides guidance on what to look for. Selecting this option will first also force the analysis (- A) to happen. If you do not specify an analysis directory, then the files will be placed in a system generated directory name under the analysis directory. If you do not want to put the optional name make sure this is the last option on the command line
Same as option D above. This option generates a dashboard (responsive web page). The dashboard integrates the analyzer text-based report (option A) with a menu-driven interface to quickly identify key issues and provide guidance on finding content. Select this option to force the analysis (- A) first. If you do not specify an analysis directory, the file is placed in the system-generated directory name under the analysis directory. If you don't want to put an optional name, make sure this is the last option on the command line
-START Used with the analysis option to specify the first file located in the oswvmstat directory to analyze.
Use with the analysis option to specify the first file located in the oswvmstat directory for analysis
-STOP Used with the analysis option to specify the last file located in the oswvmstat directory to analyze.
Use with the analysis option to specify the last file in the oswvmstat directory for analysis
-B Same as option T from the menu. The begin time will allow the user to select a begin time from within the archive of files to graph. 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 invalid begin time will result in using a default value of the first timestamp in your archive.
Same as option T in the menu. The start time will allow you to select the start time to the drawing from the file archive. This overrides the default start time of the earliest entry in the archive directory. The format of the start time is Mon DD HH:MM:SS YYYY. (for example, July 25, 2007, 115801). An invalid start time will cause the default value of the first timestamp to be used in your archive
-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. 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) .An invalid end time will result in using a default value of the last timestamp in your archive
Same as option T in the menu. The end time allows you to select the end time to the drawing from the file archive. This overrides the default end time of the last entry in the archive directory. The format of the end time is Monday night: MM:SS year. (for example, July 25, 115801 2007). An invalid end time will cause your archive to use the default value of the last timestamp
2.4.3 Specifying the Begin/End Time of an Analysis (Recommended Method) specifies the start / end time of the analysis (recommended method)
Example:
Java-jar oswbba.jar-I archive-b Jan 9 13:15:00 2013-e Jan 19 13:30:00 2013-A
2.4.4 Limiting the Analysis to a Subset of Files in Your Archive (Old method) restricts analysis to a subset of files in the archive (old method)
Example:
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-s
2.4.5 Ignoring Specific Directories From Analysis ignores specific directories from the analysis
Example:
Java-jar oswbba.jar-I archive-NO_NETSTAT-NO_IOSTAT
The options are as follows:
-NO_IOSTAT Ignores files in the oswiostat directory from analysis.
-NO_TOP Ignores files in the oswtop directory from analysis.
-NO_PS Ignores files in the oswps directory from analysis.
-NO_NETSTAT Ignores files in the oswnetstat directory from analysis.
-NO_LINUX Ignores files in the oswmeminfo directory from analysis.
-MEM_ALL Analyzes virtual and resident memory allocations for all processes. This is very resource intensive.
2.4.6 Generating a Dashboard generates a dashboard
The steps are as follows:
1. Select option (D) from them menu. This generates the dashboard
2. Cd to the analysis directory
3. Locate the analysis directory generated in step 1
4. Cd into the specific analysis directory
5. Inside the specific analysis directory there will be
A. Single analysis.txt file
B. Directory named dashboard
6. Cd into the dashboard directory
7. Inside the dashboard directory there will be
A. Index.html (This is the dashboard). Open this file with a browser
B. Css directory containing cascading style sheets used by the dashboard
C. Fonts directory containing fonts used by the dashboard
D. Generated_files directory containing gifs that were generated and used by the dashboard
E. Images directory containing misc images used by the dashboard
F. Js directory containing javascript used by the dashboard
3. Configure oswbb self-boot
The aim is to restart the host so that oswbb can start working again to collect information.
Method 1: configure crontab
0 home/oracle/dba/check_oswbb.sh 5 10 15 15 20 25 30 35 40 45 50 55 * / home/oracle/dba/check_oswbb.sh > / dev/null 2 > & 1
[oracle:/home/oracle] $cat / home/oracle/dba/check_oswbb.sh
#! / bin/sh
. / home/oracle/.profile
Osw_p= `ps-ef | grep-I "OSWatcher" | grep-v "grep" | wc-l`
If [$osw_p-eq 0]
Then
Cd / oracle/dba/oswbb
Nohup. / startOSWbb.sh 15 168 gzip &
Fi
[oracle:/home/oracle] $
Method 2: MOS:USing oswatcher RPM Package on Oracle Linux (document ID 2290852.1)
The above is all the content of this article "how to use Oracle OS Watcher tools". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.