日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

oswatch的安装和使用

發布時間:2024/3/13 编程问答 56 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oswatch的安装和使用 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

author:skate

time:2011/08/06

?

?

?

oswatch的安裝和使用

?

1.下載和安裝


oswatch的安裝與使用也比較簡單,和nmon一樣,都是下載后直接解壓就可以使用的。


oswatch是通過調用系統的命令完成信息的收集,命令如下:ps ,top ,mpstat ,iostat,netstat ,traceroute vmstat 。支持的操作系統有AIX ,Tru64 ,Solaris ,HP-UX ,Linux ;?當然也有windows版本的
?
可以在metlink直接下載:OS Watcher User Guide [ID 301137.1]


下載的就是tar包,然后直接解壓,查看是否有執行權限,沒有的話就賦予執行權限


1.
[root@dhdb software]# pwd
/tmp/software
[root@dhdb software]# ls
osw302.tar

[root@dhdb software]# 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


[root@dhdb software]# ls
osw? osw302.tar


[root@dhdb software]# ls osw
Exampleprivate.net? OSWatcher.sh??? oswlnxio.sh?? oswsub.sh?? startOSW.sh??? topaix.sh
iosub.sh??????????? oswg.jar??????? oswlnxtop.sh? pssub.sh??? stopOSW.sh???? topsub.sh
mpsub.sh??????????? OSWgREADME.txt? oswnet.sh???? README.txt? tarupfiles.sh? vmsub.sh
OSWatcherFM.sh????? oswib.sh??????? oswrds.sh???? src???????? tmp


[root@dhdb software]# ls -l osw
total 1336
-rwxr-xr-x 1 1003 dba??? 1730 Aug 20? 2009 Exampleprivate.net
-rwxr-xr-x 1 1003 dba???? 549 Aug 20? 2009 iosub.sh
-rwxr-xr-x 1 1003 dba???? 549 Aug 20? 2009 mpsub.sh
-rwxr-xr-x 1 1003 dba??? 4451 Aug 20? 2009 OSWatcherFM.sh
-rwxr-xr-x 1 1003 dba?? 22511 May? 4 15:06 OSWatcher.sh
-rw-r--r-- 1 1003 dba 1226302 Feb 11 21:49 oswg.jar
-rw-r--r-- 1 1003 dba?? 14781 May? 4 15:45 OSWgREADME.txt
-rwxr-xr-x 1 1003 dba???? 415 Aug 20? 2009 oswib.sh
-rwxr-xr-x 1 1003 dba???? 659 Aug 20? 2009 oswlnxio.sh
-rwxr-xr-x 1 1003 dba???? 829 Aug 20? 2009 oswlnxtop.sh
-rwxr-xr-x 1 1003 dba???? 357 Aug 20? 2009 oswnet.sh
-rwxr-xr-x 1 1003 dba???? 826 Aug 20? 2009 oswrds.sh
-rwxr-xr-x 1 1003 dba???? 529 Aug 20? 2009 oswsub.sh
-rwxr-xr-x 1 1003 dba???? 549 Aug 20? 2009 pssub.sh
-rw-r--r-- 1 1003 dba??? 8513 May? 4 15:37 README.txt
drwxr-xr-x 2 1003 dba??? 4096 Aug 31? 2009 src
-rwxr-xr-x 1 1003 dba??? 1638 Feb 11 21:50 startOSW.sh
-rwxr-xr-x 1 1003 dba???? 560 Aug 20? 2009 stopOSW.sh
-rwxr-xr-x 1 1003 dba???? 127 Aug 20? 2009 tarupfiles.sh
drwxr-xr-x 2 1003 dba??? 4096 Aug 20? 2009 tmp
-rwxr-xr-x 1 1003 dba???? 431 Aug 20? 2009 topaix.sh
-rwxr-xr-x 1 1003 dba???? 550 Aug 20? 2009 topsub.sh
-rwxr-xr-x 1 1003 dba???? 549 Aug 20? 2009 vmsub.sh
[root@dhdb software]#


[root@dhdb osw]# cp startOSW.sh /bin/oswstart
[root@dhdb osw]# cp startOSW.sh /usr/bin/oswstart
[root@dhdb osw]# cp startOSW.sh /usr/local/bin/oswstart


[root@dhdb osw]# oswstart
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48

Testing for discovery of OS Utilities...


[root@dhdb osw]# cp stopOSW.sh /bin/oswstop
[root@dhdb osw]# cp stopOSW.sh /usr/bin/oswstop
[root@dhdb osw]# cp stopOSW.sh /usr/local/bin/oswstop


oswatch的使用很簡單,它需要兩個參數

?

#oswstart arg1 arg2
arg1:數據收集的間隔,以秒為單位
arg2: 數據收集多長時間,以小時為單位

?

例如下面是每30秒收集一次信息,要收集一小時

[root@dhdb osw]# oswstart 30 1
[root@dhdb osw]#

Testing for discovery of OS Utilities...

VMSTAT found on your system.
Warning... IOSTAT not found on your system. No IOSTAT data will be collected.
Warning... MPSTAT not found on your system. No MPSTAT data will be collected.
NETSTAT found on your system.
TOP found on your system.

Discovery completed.

Starting OSWatcher v3.0.2?? on Sat Aug 6 18:01:31 CST 2011
With SnapshotInterval = 30
With ArchiveInterval = 1

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

Starting Data Collection...

osw heartbeat:Sat Aug 6 18:01:31 CST 2011


如果是第一次開始收集的話,會在oswatch安裝目錄下生成一個archive子目錄用于存放收集到信息,例如


[root@dhdb osw]# ls ./archive/
oswiostat? oswmeminfo? oswmpstat? oswnetstat? oswprvtnet? oswps? oswslabinfo? oswtop? oswvmstat
[root@dhdb osw]#


信息收集之后就可以查看,

[root@dhdb 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...


ERROR. You do not have a legitimate version of java in your PATH.
Linux users please download and install java from java.sun.com or
see the OSWgREADME for instructions on how to use the version of java
that comes shipped with the Oracle database.

[root@dhdb osw]#

那是因為沒有使用oracle的java的版本,把oracle的java版本加到root的環境變量里即可,如下:

將jar 的環境加入path:
export PATH=$ORACLE_HOME/jre/1.4.2/bin:$PATH

?

[root@dhdb osw]# vi /root/.bash_profile

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
??????? . ~/.bashrc
fi
. ~/.bash_profile111
# User specific environment and startup programs

PATH=$HOME/bin:/oracle/oracle/product/10.2.0/db_1/jre/1.4.2/bin:$PATH

export PATH
unset USERNAME


~
~
~
~
"~/.bash_profile" 15L, 262C written
[root@dhdb osw]#

[root@dhdb ~]# java -jar /tmp/software/osw/oswg.jar -i /tmp/software/osw/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 dhdb_vmstat_11.08.06.1700.dat ...
Parsing file dhdb_vmstat_11.08.06.1800.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 6 to Generate All CPU Gif Files
Enter 7 to Generate All Memory 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:6

至此,oswatch的安裝使用都介紹完了。


oswatch和nmon對比
1.oswatch監控,收集,查看都可以在服務器上完成;而nmon的查看需要傳到windows端完成
2.據我的使用,nmon查看的信息更全面,而且看著更舒服

?

?

?

?

-----end---------

?

?

?

?

?

?

?

?

?

總結

以上是生活随笔為你收集整理的oswatch的安装和使用的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。