In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
OS WatcherBlack Box I. OS WatcherBlack Box description
OSWatcher is a toolkit provided by Oracle for operating system monitoring.
OS Watcher Black Box (OSWbb) is a collection of UNIX scripts that are used to collect and archive data and always help locate problems. The OSWbb operation can be set as a background process and then collect data regularly, which calls Unix tools such as vmstat,netstat and iostat.
two。 Supported OS platforms:
AIX
Tru64
Solaris
HP-UX
Linux
III. OS Watcher Black Box installation configuration OSWbb needs to be installed on each node
Upload installation package
Go to the server (put it in a directory with spare space and use df-h to check the directory space)
Extract and install OSwbb
The oswbb folder contains all the required files. The process of unzipping is the process of installing OSWbb. OSWbb does not need to be installed. It can be decompressed directly.
~] # tar-xvf oswbb703.tar-C /
-C: specify the directory to which you are decompressed, and this output is extracted to the root directory
~] # ls / oswbb/-d
/ oswbb/
four。 Uninstall oswbb Uninstall OSWbb, use the rm command to remove the entire folder, as follows:
~] # rm-rf / oswbb/
5. Oswbb use when the OSWbb installation is complete, you can use the start and stop scripts, which create some archived subdirectories the first time OSWbb is used. These archive directories contain multiple subdirectories, one for each subdirectory to collect data. Directories such as: top, vmstat, iostat, mpstat, netstat, ps, etc.
Note that before starting oswbb, you must set the LANG environment variable of OS to English environment, otherwise you will not be able to analyze it during oswbba
~] # export LANG=zh_US
~] View the locale through the output result of date
Fri Jan 3 20:56:15 CST 2014
To start the oswbb startup OSWbb function, use the startOSWbb.sh script in the installation directory. This script has four parameters, as follows:
Parameter 1: frequency interval of data collection, how many seconds are collected
Parameter 2: time for data retention (in hours)
Parameter 3: optional parameter, specify compression method
Parameter 4: optional parameter to specify the location of the archive generated by the collection; default is under the archive directory under oswbba
If no parameters are specified, the default is to collect once in 30 seconds and retain archived data for 48 hours.
In general, we can specify the frequency and retention time, as follows:
~] # cd / oswbb/ # cd to the directory after oswbb is decompressed and installed
] # ls startOSWbb.sh # you can see that there are startoswbb.sh scripts
StartOSWbb.sh
] # nohup. / startOSWbb.sh 5 24 &
# nohup and &: are for running in the background
Parameters are collected once a second at 5:5.
Parameter 24: retain 24 hours of data
] # ps-ef | grep-I osw | grep-v grep# check that oswatcher is running
Root 31930 1 0 19:30 pts/1 00:00:00 / bin/sh. / OSWatcher.sh 5 24
Since parameter 3 and parameter 4 are not specified manually, compression is not used and the archive location is default, that is, under the archive directory under oswbb, as follows
] # pwd
/ oswbb
] # ls archive/
Oswiostat oswmeminfo oswmpstat oswnetstat oswprvtnet oswps oswslabinfo oswtop oswvmstat
Each subdirectory under the archive corresponds to the generated file, such as:
] # ls archive/oswiostat/
Uwaydb_iostat_14.01.03.1900.dat
Uwaydb_iostat_14.01.03.2000.dat
Uwaydb_iostat_14.01.03.2100.dat
Uwaydb_iostat_14.01.03.2200.dat
Uwaydb_iostat_14.01.03.2300.dat
Stop oswbb stop OSWbb, just use the stopOSWbb.sh script. This command will terminate all related processes.
For example
] # ps-ef | grep-I osw | grep-v grep
Root 31930 1 0 19:30 pts/1 00:00:07 / bin/sh. / OSWatcher.sh 5 24
Root 32166 31930 0 19:30 pts/1 00:00:00 / bin/sh. / OSWatcherFM.sh 24 / oswbb/archive
] #. / stopOSWbb.sh
# after the stoposwbb script is executed, the relevant process no longer exists, indicating that it has been stopped
] # ps-ef | grep-I osw | grep-v grep
OS Watcher Black Box Analyzer I. OS Watcher Black Box Analyzer description
We use OSWatcher to collect data and store it in an archive, but these files are not good for analysis, so Oracle provides the OSWbba (OSWatcher Black Box Analyzer) tool, which analyzes the data collected by OSWbb and displays it graphically.
OSWbba does not need to be installed, it is a separate java package
two。 Supported OS platform
AIX
Solaris
HP-UX
Linux
Windows XP
III. Java version restrictions
OSWbba is written in java, so running OSWbba requires at least version 1.4.2 of Java. OSWbba can run on any platform.
Use the following methods to view the java version
] # java-version
Java version "1.6.024"
OpenJDK Runtime Environment (IcedTea6 1.11.1) (rhel-1.45.1.11.1.el6-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)
If the java version is less than 1.4.2, upgrade java first
four。 Using oswbba involves displaying graphics. You need to install xmanager on the local computer, start the Xmanager-Passive tool, turn off the local firewall, and configure the server host:
] # export DISPLAY=192.168.9.43:0.0
# where 192.168.9.43 is the local ip address
] # xhost + # see the following prompt to prove that the drawing is available
Access control disabled, clients can connect from any host
Enable oswbba
] # java-jar oswbba.jar-I / oswbb/archive
#-I specify the archive directory of the sampled data
Starting OSWbba V7.0
OSWatcher Black Box Analyzer Written by Oracle Center of Expertise
Copyright (c) 2012 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 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
Check CPU status Please Select an Option:2 # View CPU usage
Check memory, swap condition Please Select an Option:4 # check memory condition
Check disk IO Please Select an Option:5 # View disk IO
The Following Devices and Average Service Times Are Ready to Display:
Device Name Average Service Times in Milliseconds
Sda 0.17097222222222222
Dm-0 0.08131944444444443
Dm-2 0.017291666666666664
Dm-1 0.0
Scd0 0.0
Specify A Case Sensitive Device Name to View (Q to exit): enter disk name
Enter: sda as here
Others: as mentioned above, we only use the commonly used 2, 4 and 5 options by example. if you are interested in other options, you can refer to the help manual.
Official help documentation: in the decompressed oswbb/docs
] # ls / oswbb/docs/*
/ oswbb/docs/OSWatcher_Black_Box:
OSWatcherUserGuide.pdf oswbb_README.txt
/ oswbb/docs/The_Analyzer:
OSW_Black_Box_Analyzer_Overview.pdf oswbbaUserGuide.pdf oswbba_README.txt
There are many other uses of Oswbb and oswbba, this manual is only the most basic, interested friends can refer to the official help manual to study.
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.