1. 程式人生 > >oracle系統監控工具oswatch簡介!

oracle系統監控工具oswatch簡介!

oswatch(簡稱osw)是oracle的一個作業系統監控工具,oswatch是一個輕量級的作業系統監控工具,通過呼叫系統的命令完成資訊的收集,並形成歷史資料,命令如下:ps ,top ,mpstat ,iostat,netstat ,traceroute vmstat 。支援的作業系統有AIX ,Tru64 ,Solaris ,HP-UX ,Linux 。 可以在metlink直接下載:OS Watcher User Guide [ID 301137.1]   (Metalink Note:301137.1)  下載的就是tar包,然後直接解壓就可以使用的。osw是一個java應用,可以在伺服器上執行。

注意:osw工具需要以root使用者來操作哦!

1、安裝部署(解壓既可)

[[email protected] app]# pwd
/u01/app
[[email protected] app]# ll osw302.tar 
-rw-r--r-- 1 oracle oinstall 1366016 12-13 02:02 osw302.tar
[[email protected] app]# tar xvf osw302.tar 
osw/
osw/Exampleprivate.net
osw/OSWatcher.sh
osw/OSWatcherFM.sh
osw/OSWgREADME.txt
osw/iosub.sh
osw/mpsub.sh
osw/oswg.jar
osw/oswib.sh
osw/oswlnxio.sh
osw/oswlnxtop.sh
osw/oswnet.sh
osw/oswrds.sh
osw/oswsub.sh
osw/pssub.sh
osw/startOSW.sh
osw/stopOSW.sh
osw/tarupfiles.sh
osw/topaix.sh
osw/topsub.sh
osw/vmsub.sh
osw/tmp/
osw/src/
osw/src/coe_logo.gif
osw/src/missing_graphic.gif
osw/src/oswg_input.txt
osw/src/OSW_profile.htm
osw/src/Thumbs.db
osw/src/tombody.gif
osw/src/watch.gif
osw/README.txt
[
[email protected]
app]# ll osw/ 總計 1336 -rwxr-xr-x 1 1003 dba    1730 2009-08-20 Exampleprivate.net -rwxr-xr-x 1 1003 dba     549 2009-08-20 iosub.sh -rwxr-xr-x 1 1003 dba     549 2009-08-20 mpsub.sh -rwxr-xr-x 1 1003 dba    4451 2009-08-20 OSWatcherFM.sh -rwxr-xr-x 1 1003 dba   22511 2011-05-04 OSWatcher.sh -rw-r--r-- 1 1003 dba 1226302 2011-02-11 oswg.jar -rw-r--r-- 1 1003 dba   14781 2011-05-04 OSWgREADME.txt -rwxr-xr-x 1 1003 dba     415 2009-08-20 oswib.sh -rwxr-xr-x 1 1003 dba     659 2009-08-20 oswlnxio.sh -rwxr-xr-x 1 1003 dba     829 2009-08-20 oswlnxtop.sh -rwxr-xr-x 1 1003 dba     357 2009-08-20 oswnet.sh -rwxr-xr-x 1 1003 dba     826 2009-08-20 oswrds.sh -rwxr-xr-x 1 1003 dba     529 2009-08-20 oswsub.sh -rwxr-xr-x 1 1003 dba     549 2009-08-20 pssub.sh -rw-r--r-- 1 1003 dba    8513 2011-05-04 README.txt drwxr-xr-x 2 1003 dba    4096 2009-08-31 src -rwxr-xr-x 1 1003 dba    1638 2011-02-11 startOSW.sh -rwxr-xr-x 1 1003 dba     560 2009-08-20 stopOSW.sh -rwxr-xr-x 1 1003 dba     127 2009-08-20 tarupfiles.sh drwxr-xr-x 2 1003 dba    4096 2009-08-20 tmp -rwxr-xr-x 1 1003 dba     431 2009-08-20 topaix.sh -rwxr-xr-x 1 1003 dba     550 2009-08-20 topsub.sh -rwxr-xr-x 1 1003 dba     549 2009-08-20 vmsub.sh

從上面看,許可權有點怪,不過不管它,繼續!

2、啟動監控器

啟動監控就是呼叫startOSW.sh指令碼。
# ./startOSW.sh arg1 arg2

arg1:資料收集的間隔,以秒為單位。
arg2: 資料收集多長時間,以小時為單位。

例如:

[[email protected] osw]# cd /u01/app/osw/
[[email protected] osw]# pwd
/u01/app/osw
[[email protected] osw]# ./startOSW.sh 30 1
[[email protected] osw]# 

Testing for discovery of OS Utilities...

VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.

Discovery completed.

Starting OSWatcher v3.0.2   on 2011年 12月 13日 星期二 02:27:42 CST
With SnapshotInterval = 30
With ArchiveInterval = 1

OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation

Starting Data Collection...

osw heartbeat:2011年 12月 13日 星期二 02:27:42 CST
osw heartbeat:2011年 12月 13日 星期二 02:28:13 CST
osw heartbeat:2011年 12月 13日 星期二 02:28:44 CST
... ...
以上這裡就是沒30秒取樣一次,連續採用一個小時。

初次使用會在OSW_HOME目錄下面生成一個archive目錄,此目錄就是存放取樣資訊的:

[[email protected] osw]# cd /u01/app/osw/
[[email protected] osw]# pwd
/u01/app/osw
[[email protected] osw]#  ll archive/
總計 36
drwxr-xr-x 2 root root 4096 12-13 02:16 oswiostat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmeminfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmpstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswnetstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswprvtnet
drwxr-xr-x 2 root root 4096 12-13 02:16 oswps
drwxr-xr-x 2 root root 4096 12-13 02:16 oswslabinfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswtop
drwxr-xr-x 2 root root 4096 12-13 02:16 oswvmstat
[[email protected] osw]# cd archive/
[[email protected] archive]# ll
總計 36
drwxr-xr-x 2 root root 4096 12-13 02:16 oswiostat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmeminfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmpstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswnetstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswprvtnet
drwxr-xr-x 2 root root 4096 12-13 02:16 oswps
drwxr-xr-x 2 root root 4096 12-13 02:16 oswslabinfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswtop
drwxr-xr-x 2 root root 4096 12-13 02:16 oswvmstat

3、停止監控器

停止osw就是在其它終端執行stopOSW.sh指令碼

例如:

[[email protected] osw]# cd /u01/app/osw/
[[email protected] osw]# pwd
/u01/app/osw
[[email protected] osw]# ./stopOSW.sh 

4、生成圖形

[[email protected] ~]# cd /u01/app/osw/
[[email protected] osw]# pwd
/u01/app/osw
[[email protected] osw]# java -jar oswg.jar -i ./archive/

Starting OSWg V3.0.1
OSWatcher Graph Written by Oracle Center of Expertise
Copyright (c)  2008 by Oracle Corporation

Parsing Data. Please Wait...

Parsing file linux_iostat_11.12.13.0500.dat ...
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST

Parsing file linux_vmstat_11.12.13.0500.dat ...
An exception occured in insertVmstatLists on line 6
An exception occured in insertVmstatLists on line 12
An exception occured in insertVmstatLists on line 18
An exception occured in insertVmstatLists on line 24
An exception occured in insertVmstatLists on line 30

No data found in input archive directory ./archive/
Please rerun OSWg with proper input directory containing OSW archive data.
Program aborting...
在生成圖形介面的時候報錯了,注意Timestamp Error. 產生這個錯誤的原因就是我的作業系統是中文環境的,osw要英文日期格式才可以。
[[email protected] osw]# echo $LANG
zh_CN.GB18030
[[email protected] osw]# date
2011年 12月 13日 星期二 05:03:13 CST
下面刪除archive目錄,改為英文環境就可以了:
[[email protected] osw]# LANG=C
[[email protected] osw]# date
Tue Dec 13 05:03:47 CST 2011
[[email protected] osw]# rm -rf archive/
[[email protected] osw]# ./startOSW.sh 10 1
[[email protected] osw]# 

Testing for discovery of OS Utilities...

VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.

Discovery completed.

Starting OSWatcher v3.0.2   on Tue Dec 13 05:04:06 CST 2011
With SnapshotInterval = 10
With ArchiveInterval = 1

OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation

Starting Data Collection...

osw heartbeat:Tue Dec 13 05:04:06 CST 2011
osw heartbeat:Tue Dec 13 05:04:16 CST 2011
osw heartbeat:Tue Dec 13 05:04:26 CST 2011
osw heartbeat:Tue Dec 13 05:04:37 CST 2011
osw heartbeat:Tue Dec 13 05:04:48 CST 2011
接著停止監控:
[[email protected] osw]# ./stopOSW.sh
生成圖形介面:
[[email protected] osw]# java -jar oswg.jar -i ./archive/

Starting OSWg V3.0.1
OSWatcher Graph Written by Oracle Center of Expertise
Copyright (c)  2008 by Oracle Corporation

Parsing Data. Please Wait...

Parsing file linux_iostat_11.12.13.0500.dat ...

Parsing file linux_vmstat_11.12.13.0500.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 Specify Different Time Scale
Enter D to Return to Default Time Scale
Enter R to Remove Currently Displayed Graphs
Enter P to Generate A Profile
Enter Q to Quit Program

Please Select an Option:
圖形介面可以藉助xmanger,如果伺服器有圖形介面那更好了,也可以生成報告!

相關推薦

oracle系統監控工具oswatch簡介

oswatch(簡稱osw)是oracle的一個作業系統監控工具,oswatch是一個輕量級的作業系統監控工具,通過呼叫系統的命令完成資訊的收集,並形成歷史資料,命令如下:ps ,top ,mpstat ,iostat,netstat ,traceroute vmstat

Linux系統監控工具

linux系統監控工具需要監視Linux服務器的性能?試試這些內置的命令和一些附加的工具吧。大多數Linux發行版都集成了一些監視工具。這些工具可以獲取有關系統活動的信息的詳細指標。通過這些工具,你可以發現產生系統性能問題可能存在原因。下面討論的是一些最基本的命令,它涉及到系統分析和調試服務器等一些問題,如:

系統監控工具 Glances

glancesglances 是一款用於 Linux、BSD 的開源命令行系統監視工具,它使用 Python 語言開發,能夠監視 CPU、負載、內存、磁盤 I/O、網絡流量、文件系統、系統溫度等信息.glances 可以為 Unix 和 Linux 性能專家提供監視和分析性能數據的功能,其中包括: CP

linux系統監控工具glances

版本信息 AR glances 通過 ip 地址 arch 下載安裝 mirrors 性能監控 glances linux系統自帶了很多系統性能監控工具,如top,vmstat,iftop等等,還有一款監視工具glances,它能把其他幾個監控的指標都集於一身。Glance

精致的系統監控工具-netdata

全面 完成 gin dao php art 自己 arc 其他 今天在網上瞎逛,偶然發現一款監控工具:netdata,感到一驚,監控工具竟然可以這麽漂亮! 簡單了解一下,這款工具還算比較新,監控系統運行狀態的功能非常強大,除了監控cpu,網卡,磁盤,內存,進程等等之外,甚

Widows自帶系統監控工具——24小時監控伺服器效能

操作步驟 1、執行程式perfmon.exe 2、選擇【使用者自定義】-【新建】-【資料收集器集】 3、自定義名稱“test”,選擇【手動建立】,然後【下一步】 4、選擇“效能計數器”,【下一步】 5、使用者可以根據具體情況,選擇多長時間記錄一次,然後點選

全能系統監控工具dstat

最近公司組織了培訓,看到老哥講了系統性能優化一節,使用了“dstat -lcdngy”命令進行系統監控檢視,感覺很好用,之前一直用個top vmstat等,看到這個工具後感覺必須馬上學習一下,下面這個是我找到的一個比較好的內容。 一、什麼是dstat? 通過man幫助,可以看到官方

常用的Linux系統監控工具

1、常用命令  -e 顯示所有 -f 全格式。 -h 不顯示標題。 -l 長格式。 -w 寬輸出。 a 顯示終端上的所有程序,包括其他使用者的 r 只顯示正在執行的程序。 x 顯示沒有控制終端的程序。 Linux系統監控工具 1、mpstat - 多處理器

Windows 自帶系統監控工具

http://www.cnblogs.com/luo-mao/p/5872374.html 一、 簡述 可以用於監視CPU使用率、記憶體使用率、硬碟讀寫速度、網路速度等。 Perfmon提供了圖表化的系統性能實時監視器、效能日誌和警報管理,系統的效能日誌可定義為二

每個系統管理員都要知道的 30 個 Linux 系統監控工具

11. netstat - Linux 網路統計監控工具netstat 命令顯示網路連線、路由表、介面統計、偽裝連線和多播連線等資訊。# netstat -tulpn # netstat -nat12. ss - 網路統計ss 命令用於獲取套接字統計資訊。它可以顯示類似於 netstat 的資訊。不過 net

【Linux】全能系統監控工具dstat

全能系統監控工具dstat dstat 是一個可以取代vmstat,iostat,netstat和ifstat這些命令的多功能產品

Linux 系統監控工具 atop

系統監控是運維工作中重要的一環,本文以 atop 工具為例來介紹系統的重要監控項。 atop可以使用yum或apt包管理器進行安裝。atop man page 中詳細說明了 atop 中各監控項含義及atop命令用法。 如上圖所示, atop 的介面分為上半部分的系統監控項和下半部分的程序列表。 atop

高併發&效能優化(二)------系統監控工具使用

上一篇主要從總體介紹了高併發&效能優化的相關思路和方法,本篇主要介紹系統監控工具。     【CPU檢視工具】 ------top命令(效能) 進入top命令後,按1即可看到每核CPU的執行指標與詳細指標: 咱們依次說明下紅框裡面的引數: Load Average

linux 系統監控、診斷工具之 lsof 用法簡介

1、lsof 簡介 lsof 是 linux 下的一個非常實用的系統級的監控、診斷工具。 它的意思是 List Open Files,很容易你就記住了它是 “ls + of”的組合~ 它可以用來列出被各種程序開啟的檔案資訊,記住:linux 下 “一切皆檔案”, 包括但不限

88個 Linux 系統管理員必備的監控工具

互調 通用 tbb 訪客 結果 什麽 用戶界面 mui grep 隨著互聯網行業的不斷發展,各種監控工具多得不可勝數。這裏列出網上最全的監控工具。讓你可以擁有超過80種方式來管理你的機器。在本文中,我們主要包括以下方面: 命令行工具 網絡相關內容

性能監控工具的配置及使用五分彩平臺搭建 - Spotlight On Oracle(oracle)

tnsname oracl 對象 快速 instant otl 連接 路徑 oracle數據 Spotlight是一個強五分彩平臺搭建【征途源碼論壇zhengtuwl.com】聯系方式:QQ:2747044651有力的Oracle數據庫實時性能診斷工具,提供了一個直觀的、可

性能監控工具的配置及使用 - Spotlight On Oracle(oracle)

管理 超出 使用情況 新建 業務 操作 只需要 中文 查看sql 一、 Spotlight On Oracle(oracle)1.1. 工具簡介Spotlight是一個強有力的Oracle數據庫實時性能診斷工具,提供了一個直觀的、可視化的數據庫活動展現。Spo

linux效能監控工具-(顯示系統整體資源使用情況-top命令)

顯示系統整體資源使用情況 -top命令 top命令是linux下常用的效能分析工具,能夠實時顯示系統中各個程序的資源佔用狀況: 前半部分是系統統計資訊,後半部分是程序資訊。 從左到右依次表示:系統當前時間,系統執行時間,當前登入使用者數。load average表示系統的平

[雪峰磁針石部落格]python應用效能監控工具簡介

監控簡介 監視工具捕獲,分析和顯示Web應用程式執行資訊。每個應用程式在Web堆疊的所有層都可能出現問題。監控工具通過展示幫助開發人員和運營團隊響應並修復問題。 捕獲和分析有關生產環境的資料對於主動處理Web應用程式的穩定性,效能和錯誤至關重要。 監視和日誌記錄的目的非常相似,

機房環境監控系統設計與實施重點

  機房環境監控系統的設計方案是否合理、優化、實用,決定了前期投資的經濟性。因此,機房的總體設計方案的確定是很重要的,這取決於設計的理念和技術水平。  建設方一般對機房前期的建設比較慎重,要選擇有技術實力的設計單位和技術人員進行機房的設計和施工,以保證機房方案的經濟實用和機房的施工質量的保證。  機房裡除了擺