OSW (OS WATCHER)使用说明

OSW使用说明

1.软件准备

OSW下载

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=DIAGNOSTIC%20TOOLS&id=461054.1

OSWg下载

https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=DIAGNOSTIC%20TOOLS&id=461053.1

2.osw安装与卸载

把下载后的osw.tar文件copy到合适的目录下,然后解压即可安装(绿色版本的):

tar xvf osw.tar

卸载:只删除解压后的目录

rm -rf osw

3.启动与停止ows

启动:执行startOSW.sh脚本

有两个参数:

ARG1 = snapshot interval in seconds. (间隔收集的秒数,默认是30秒)

ARG2 = the number of hours of archive data to store.(数据保留的小时数,默认是48秒)

./startOSW.sh

注:不写参数为默认值

Example 1:每60秒收集一次数据,保留10小时

./startOSW.sh 60 10

Example 2:每60秒收集一次数据,保留24小时,并让进程在后台运行。

nohup ./startOSW.sh 60 10 &

停止:执行startOSW.sh脚本

./stopOSW.sh

4.生成采集数据

当启动osw后,在安装目录下会生成各种工具采集数据的子目录。

数据文件的格式为:

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

[oracle@tickettwo archive]$ ls

oswiostatoswmeminfooswmpstatoswnetstatoswprvtnetoswpsoswslabinfooswtoposwvmstat

[oracle@tickettwo archive]$ pwd

/home/oracle/osw/archive

[oracle@tickettwo archive]$ cd oswiostat/

[oracle@tickettwo oswiostat]$ ls -l

total 640

-rw-r--r--1 oracle oinstall4475 Jun 15 10:59 tickettwo_iostat_11.06.15.1000.dat

-rw-r--r--1 oracle oinstall 267659 Jun 15 11:59 tickettwo_iostat_11.06.15.1100.dat

-rw-r--r--1 oracle oinstall 267653 Jun 15 12:59 tickettwo_iostat_11.06.15.1200.dat

-rw-r--r--1 oracle oinstall93677 Jun 15 13:20 tickettwo_iostat_11.06.15.1300.dat

5.安装OSWg

Oswg不需要安装,它在osw安装目录下,是一个java jar文件:

[oracle@tickettwo osw]$ ls oswg.jar

oswg.jar

6.启动OSWg

启动oswg工具之前,要确保系统上安装的java为1.4.2或更高版本,java可以在http://java.sun.com.网站下载。如果安装了oracle,也能在$ORACLE_HOMEG找到:

查看java版本:

[oracle@ccdb ~]$ which java

/usr/bin/java

[oracle@ccdb ~]$ java -version

java version "1.4.2"

[oracle@ccdb bin]$ export PATH=$ORACLE_HOME/jre/1.4.2/bin:$PATH

[oracle@ccdb bin]$ which java

~/product/10.2.1/db_1/jre/1.4.2/bin/java

[oracle@ccdb bin]$ java -version

java version "1.4.2_08"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_08-b03)

Java HotSpot(TM) Client VM (build 1.4.2_08-b03, mixed mode)

启动osws之前,要先开启xmanage工具,如下操作:

[oracle@ccdb osw]$ export DISPLAY=172.16.64.53:0.0

[oracle@ccdb osw]$ java -jar oswg.jar -i /u01/oracle/osw/archive/

Starting OSWg V3.0.0

OSWatcher Graph Written by OracleCenter of Expertise

Copyright (c)2008 by Oracle Corporation

Parsing Data. Please Wait...

Parsing file gc_iostat_11.06.14.1300.dat ...

Parsing file gc_vmstat_11.06.14.1300.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:2

图例:<?xml:namespace prefix = v ns = "urn:schemas-microsoft-com:vml" />

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />OSW (OS WATCHER)使用说明

意:

生成采集的数据中的日期格式必需是准备的英文格式,不然执行上面命令时无法格式化输出图形,会报下面的错误信息:

Parsing file gc_iostat_11.06.14.1200.dat ...

Timestamp Error. Expected format: May 3 16:11:12 2006.

Timestamp Error. Found format: Jun 14 12:22:57 2011

Timestamp Error. Expected format: May 3 16:11:12 2006.

Timestamp Error. Found format: Jun 14 12:23:59 2011

Parsing file gc_vmstat_11.06.14.1200.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

在linux上可以先设置环境变量:

[oracle@ccdb ~]$ export LANG=zh_US

[oracle@ccdb ~]$ date

Wed Jun 15 14:16:45 CST 2011

[oracle@ccdb ~]$ export LANG=zh_CN

[oracle@ccdb ~]$ date

三6月15 14:16:58 CST 2011

你可能感兴趣的:(Watcher)