In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to use OSW tools. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. Overview
Using the osw tool of oracle, you can graphically display the CPU, memory and disk of the system, which has an intuitive effect for grasping and understanding the overall use of resources.
The OSW tool consists of a series of shell scripts
OSWatcher.sh is the main caller that spawns many individual shell processes that use unix's operating system diagnostic tools to collect specific types of data.
OSW calls specific operating system tools, each of which acts as a specific background process for data collection.
The following tools are generally supported:
Ps
Top
Ifconfig
Mpstat
Iostat
Netstat
Traceroute
Vmstat
Meminfo (Linux Only)
Slabinfo (Linux Only)
The output can be displayed graphically, and of course, the collected archive information can be processed using shell scripts.
two。 Support platform
OSW can run on the following platforms:
AIX
Solaris
HP-UX
Linux
3. Upload
Use sftp to upload oswbb734.tar to / opt/tools path (optional tool, optional path)
4. Extract the file
Tar xvf oswbb734.tar
[root@cams-a tools] # tar xvf oswbb734.tar
Oswbb/
Oswbb/call_uptime.sh
Oswbb/profile/
Oswbb/analysis/
Oswbb/tar_up_partial_archive.sh
Oswbb/oswsub.sh
Oswbb/oswrds.sh
Oswbb/src/
Oswbb/src/missing_graphic.gif
Oswbb/src/tombody.gif
Oswbb/src/coe_logo.gif
Oswbb/src/Thumbs.db
Oswbb/src/OSW_profile.htm
Oswbb/src/oswbba_input.txt
Oswbb/src/watch.gif
Oswbb/oswib.sh
Oswbb/call_du.sh
Oswbb/tarupfiles.sh
Oswbb/ltop.sh
Oswbb/nfssub.sh
Oswbb/docs/
Oswbb/docs/OSWatcher/
Oswbb/docs/OSWatcher/OSWatcherUserGuide.pdf
Oswbb/docs/OSWatcher/oswbb_README.txt
Oswbb/docs/The_Analyzer/
Oswbb/docs/The_Analyzer/oswbba_README.txt
Oswbb/docs/The_Analyzer/oswbbaUserGuide.pdf
Oswbb/docs/The_Analyzer/OSWatcherAnalyzerOverview.pdf
Oswbb/OSWatcher.sh
Oswbb/psmemsub.sh
Oswbb/call_sar.sh
Oswbb/oswnet.sh
Oswbb/Exampleprivate.net
Oswbb/mpsub.sh
Oswbb/Example_extras.txt
Oswbb/OSWatcherFM.sh
Oswbb/startOSWbb.sh
Oswbb/ifconfigsub.sh
Oswbb/iosub.sh
Oswbb/oswbba.jar
Oswbb/vmsub.sh
Oswbb/xtop.sh
Oswbb/stopOSWbb.sh
5. Delete osw
Rm-rf oswbb
6. Start and stop
Arg1: snapshot interval in seconds
Arg2: maximum data retention time
Arg3: (optional) method for compressing data
Arg4: (optional) data save path
Example 1: execute every 30 seconds by default and save for 48 hours
. / startOSWbb.sh
Example 2: execute every 60 seconds, save for 10 hours, and compress automatically
. / startOSWbb.sh 60 10 gzip
Example 3: execute every 60 seconds, save for 10 hours, automatically compress, save to non-default path
. / startOSWbb.sh 60 10 gzip / u02/tools/oswbb/archive
Example 4: execute every 60 seconds, save for 48 hours, do not compress, save to non-default path
. / startOSWbb.sh 60 48 NONE / u02/tools/oswbb/archive
Example 5: run in the background, execute every 60 seconds and save for 10 hours
Nohup. / startOSWbb.sh 60 10 &
Stop:. / stopOSWbb.sh
7. Generate collection data
When osw is started, subdirectories for various tools to collect data will be generated under the installation directory.
The format of the data file is:
_ _ YY.MM.DD.HH24.dat
[root@cams-an oswbb] # nohup. / startOSWbb.sh 30 24 &
[1] 72749
[root@cams-an oswbb] # nohup: ignore input and append output to "nohup.out"
[1] + Done nohup. / startOSWbb.sh 30 24
[root@cams-an oswbb] # ls
Analysis call_sar.sh Example_extras.txt ifconfigsub.sh ltop.sh nohup.out oswbba.jar oswrds.sh psmemsub.sh stopOSWbb.sh tmp
Archive call_uptime.sh Exampleprivate.net iosub.sh mpsub.sh OSWatcherFM.sh oswib.sh oswsub.sh src tarupfiles.sh vmsub.sh
Call_du.sh docs gif locks nfssub.sh OSWatcher.sh oswnet.sh profile startOSWbb.sh tar_up_partial_archive.sh xtop.sh
[root@cams-an oswbb] # ls archive/
Oswifconfig oswiostat oswmeminfo oswmpstat oswnetstat oswprvtnet oswps oswslabinfo oswtop oswvmstat
[root@cams-an oswbb] # ls-l archive/oswmeminfo/
Total dosage 4
-rw-r--r--. 1 root root 2410 September 2 21:42 cams-a_meminfo_16.09.02.2100.dat
8. Generate a sampling chart
We use the OSWbba (Black Box Analyzer) tool to analyze the generated data.
First of all, you need to make sure that the Java version is higher than 1.4.2
[root@cams-a ~] # java-version
Java version "1.6.045"
Java (TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot (TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
Suppose the chart is generated under the path of the archive file (you can also choose another path)
[root@cams-an oswbb] # java-jar oswbba.jar-I 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...
Scanning file headers for version and platform info...
Parsing file cams-a_iostat_16.09.02.2100.dat...
An exception occured in insertVmstatLists on line 1
An exception occured in insertVmstatLists on line 8
.
The above error is due to the error caused by the character set of zh_CN.GB18030. Reset the character set to en_US.UTF-8, and then regenerate the result
[root@cams-an oswbb] # export LANG=en_US.UTF-8
[root@cams-an oswbb] # java-jar oswbba.jar-I 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...
Scanning file headers for version and platform info...
Parsing file cams-a_iostat_16.09.02.2100.dat...
Parsing file cams-a_iostat_16.09.02.2200.dat...
Parsing file cams-a_vmstat_16.09.02.2100.dat...
Parsing file cams-a_vmstat_16.09.02.2200.dat...
Parsing file cams-a_netstat_16.09.02.2100.dat...
Parsing file cams-a_netstat_16.09.02.2200.dat...
Parsing file cams-a_top_16.09.02.2100.dat...
Parsing file cams-a_top_16.09.02.2200.dat...
Parsing file cams-a_ps_16.09.02.2100.dat...
Parsing file cams-a_ps_16.09.02.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 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:Q
9. Private network
To monitor the VPC, you can modify the contents of the Exampleprivate.net file, change it to the host name, and change the file name to private.net, then restart it.
10. Description
The osw tool can collect historical information and play back data on a specific time side, but it is important to note that the collection of information will be due to
The sampling interval is short and becomes large, so you need to pay attention to the space of the archive directory.
The information collected has a more intuitive display effect on the overall use of resources.
Attached: generate report command parameters
-I Required.This is the input archive directory location.
-6 Same as option 6 from the menu. Will generate all disk gif files.
-7 Same as option 7 from the menu. Will generate all cpu gif files.
-8 Same as option 8 from the menu. Will generate all memory gif files.
-L User specified location of an existing directory to place any gif files generated by OSWbba. This overrides the OSWbba automatic convention for placing all gif files in the / gif directory. This directory must pre-exist!
-A Same as option An above. This option analyzes the files in the archive directory and produces a report
-S Same as option S above. This option analyzes a specific subset of times of the files in the archive directory and produces a report. This option is used together with the-B and-E options
-START Used with the analysis option to specify the first file located in the oswvmstat directory to analyze.
-STOP Used with the analysis option to specify the last file located in the oswvmstat directory to analyze.
-P User specified name of the html profile generated by OSWbba. This overrides the oswbba automatic naming
-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 allocation for all processes. This is very resource intensive.
For Example:
Java-jar oswbba.jar-I archive/-6-7-8-P 20160903_crash
We can also adapt ourselves to the scripts needed by our own operating system by referring to the shell script in the OSW tool.
OSW is used not only to monitor database servers, but also to monitor application servers, and so on.
Thank you for reading! This is the end of this article on "how to use OSW tools". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.