溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

OSW工具怎么用

發布時間:2021-11-10 09:45:36 來源:億速云 閱讀:543 作者:小新 欄目:關系型數據庫

這篇文章給大家分享的是有關OSW工具怎么用的內容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。

1.概述

使用oracle的osw工具,可以對系統的CPU和內存,磁盤等進行圖形化的展示,對于把握和了解整體的資源使用情況,具有直觀的效果。

OSW工具由一系列shell腳本構成,

OSWatcher.sh是主調程序,派生出許多單個的shell進程,使用unix的操作系統診斷工具,來收集特定類型的數據

OSW調用特定的操作系統工具,每個工具作為一個特定的后臺進程,進行數據收集。

一般而言支持下述工具:

ps

top

ifconfig

mpstat

iostat

netstat

traceroute

vmstat

meminfo(Linux Only)

slabinfo(Linux Only)

輸出結果可以進行圖形化的展示,當然,也可以使用shell腳本對收集的archive信息進行處理。

2.支持平臺

OSW可以運行于下述平臺之上:

AIX 

Solaris

HP-UX

Linux

3.上傳

使用sftp上傳oswbb734.tar至/opt/tools路徑下(工具可選,路徑可選)

4.解壓文件

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.刪除osw

rm -rf oswbb

6.啟動與停止

arg1:快照時間間隔,以秒為單位

arg2:數據保存最長時間

arg3:(可選)對數據進行壓縮的方法

arg4:(可選)數據保存路徑

例子1:默認每30秒執行一次,保存48小時

./startOSWbb.sh

例子2:每60秒執行一次,保存10小時,自動壓縮

./startOSWbb.sh 60 10 gzip

例子3:每60秒執行一次,保存10小時,自動壓縮,保存至非默認路徑

./startOSWbb.sh 60 10 gzip /u02/tools/oswbb/archive

例子4:每60秒執行一次,保存48小時,不壓縮,保存至非默認路徑

./startOSWbb.sh 60 48 NONE /u02/tools/oswbb/archive

例子5:后臺運行,每60秒執行一次,保存10小時

nohup ./startOSWbb.sh 60 10 &

停止:./stopOSWbb.sh

7.生成采集數據

當啟動osw后,在安裝目錄下會生成各種工具采集數據的子目錄。

數據文件的格式為:

<node_name>_<OS_utility>_YY.MM.DD.HH24.dat

[root@cams-a oswbb]# nohup ./startOSWbb.sh 30 24 &

[1] 72749

[root@cams-a oswbb]# nohup: 忽略輸入并把輸出追加到"nohup.out"

[1]+  Done                    nohup ./startOSWbb.sh 30 24

[root@cams-a 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-a oswbb]# ls archive/

oswifconfig  oswiostat  oswmeminfo  oswmpstat  oswnetstat  oswprvtnet  oswps  oswslabinfo  oswtop  oswvmstat

[root@cams-a oswbb]# ls -l archive/oswmeminfo/

總用量 4

-rw-r--r--. 1 root root 2410 9月   2 21:42 cams-a_meminfo_16.09.02.2100.dat

8.生成采樣圖表

我們使用 OSWbba (Black Box Analyzer)工具對生成數據進行分析。

首先需要保證Java版本高于1.4.2

[root@cams-a ~]# java -version

java version "1.6.0_45"

Java(TM) SE Runtime Environment (build 1.6.0_45-b06)

Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

假定將圖表生成在archive文件路徑下(也可選擇其他路徑)

[root@cams-a 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

…………

上述錯誤是因為字符集為zh_CN.GB18030導致錯誤,重新設置字符集為en_US.UTF-8,然后重新生成結果

[root@cams-a oswbb]# export LANG=en_US.UTF-8

[root@cams-a 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.私有網絡

如需監控私有網絡,可修改Exampleprivate.net文件內容,將<node1-priv>換成主機名,并修改文件名為private.net后重啟即可

10.說明

osw工具可以收集歷史信息,可以對特定時間端的數據進行回放,但是要注意,其收集信息會因

采樣間隔較短而變得很大,因此需要關注archive目錄的空間。

收集的信息對于整體的資源使用情況,有比較直觀的顯示效果。

附:生成報表命令參數

-i  <archive dir> 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 <location name> 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 <analysis name> Same as option A above. This option analyzes the files in the archive directory and produces a report

-S <analysis name> 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 <filename>Used with the analysis option to specify the first file located in the oswvmstat directory to analyze.

-STOP <filename>Used with the analysis option to specify the last file located in the oswvmstat directory to analyze.

-P <profile name> User specified name of the html profile generated by OSWbba. This overrides the oswbba automatic naming

-NO_NETSTAT <filename> Ignores files in the oswnetstat directory from analysis.

-NO_LINUX <filename> Ignores files in the oswmeminfo directory from analysis.

-MEM_ALL <filename> 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

我們也可以通過參考OSW工具中的shell腳本,自行改造,適應成自己操作系統所需的腳本。
OSW不只是用于監控數據庫服務器,還可以監控應用服務器等。

感謝各位的閱讀!關于“OSW工具怎么用”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

osw
AI

亚洲午夜精品一区二区_中文无码日韩欧免_久久香蕉精品视频_欧美主播一区二区三区美女