使用OSWatcher來監控服務器

OSWatcher是oracle提供的監控服務器資源的工具,配合AWR等工具爲調優數據庫提供基本信息。
OSWatcher有支持不同平臺,
WINDOWS平臺下:OSWatcher For Windows (OSWFW) 
LINUX平臺:OS Watcher Black Box

WINDOWS平臺使用:
1.下載OSWFW,下載地址:
可以在meatlink下載,也可以在下面的地址下載:
http://www.kuaipan.cn/file/id_10620947316867775.htm
2.如果需要在RAC的環境中運行OSWFW首先需要修改配置文件
OSWPrivNet.config.template   重命名爲OSWPrivNet.config
修改其中的內容,加上private IP地址。
並運行OSWPrivNet.bat來檢測環境
3.配置OSWFW
OSWatcher {ARG1} {ARG2} {ARG3}
ARG1 = Snapshot interval in seconds      採集系統運行狀態的間隔,單位爲秒
ARG2 = Runtime Interval - hours OSWatcher will run    OSWatcher運行的時間,單位是小時
ARG3 = RAC - detect Real Application Cluster    是否爲RAC上
例如:
    OSWatcher 60 1  一分鐘採集一次系統數據,採集一個小時。
配置完成後OSWatcher會自動啓動,在第一次啓動時會創建Archive文件夾,日誌信息保存在此文件夾中
4.啓動OSWatcher
OSWatcher start {node name}
5.停止OSWatcher
OSWatcher start {node name}
6.查看OSWatcher 狀態
OSWatcher status {node name}
7.查看計算器的詳細信息
OSWatcher query {node name} {counter / OSWCleanup / OSWPrivNet}
查看所有計數器的詳細信息
oswatcher query all

LINUX平臺使用OS Watcher Black Box ,相比起windows平臺OS Watcher Black Box 功能更爲強大
提供了分析工具OS Watcher Black Box Analyzer來分析採集的數據。
1.下載OSWBB
可以在meatlink下載,也可以在下面的地址下載:
http://www.kuaipan.cn/file/id_10620947316867774.htm
2.如果要在RAC環境下使用,需要在每臺機子上都複製OSWBB
並且要Example private.net 改名爲private.net 並修改其中的內容
改爲自己的私有IP
3.啓動OSWBB
./startoswbb.sh   ARG1 ARG2
ARG1 = Snapshot interval in seconds      採集系統運行狀態的間隔,單位爲秒
ARG2 = Runtime Interval - hours OSWatcher will run    OSWatcher運行的時間,單位是小時
示例:
           ./startoswbb.sh  以默認參數啓動OSWBB
           ./startoswbb.sh 60 10 & 一分鐘收集一次,執行10小時,後臺運行
4.停止OSWBB
./stopOSWbb.sh
5.啓動OSWBBA來分析系統運行數據
java -jar oswbba.jar -i <archive 路徑>
選項如下:
   
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.
4:
This option displays memory graphs for free memory and available swap..
5:
This option uses the extended disk statistics option of iostat to display a list of all devices for solaris, aix and linux platforms only. 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.
6..8:
These options generate images of the graph to a file without displaying them to the screen. All graphs for that specific category, CPU, memory or IO will be generated and placed in the directory where oswbba is located. To override this directory and name an alternative location to place these files use option L discussed below.
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:
This option analyzes the files in the archive and produces a report
P:
Generates an html profile.
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 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.
D:
This option resets the graphing timescale back to the time encompassing the entire log collection.
R:
This option removes all previously displayed graphs from the screen.
Q:
Exits the program.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章