使用OSWatche
前面配置和安装好OSWatche后,现在开始使用OSWatche工具,在对oswbb目录里,存在一个startOSWbb.sh脚本,利用该脚本来启动OSWatche工具。
方式1
[oracle@cl oswbb]$./startOSWbb.sh
如果对此脚本运行不设参数,则默认设定为 30 48。也就是说以每 30 秒进行一次数据收集,并在归档文件中保存最近 48 个小时的相关数据方式2
[oracle@cl oswbb]$./startOSWbb.sh 60 10 gzip | |
方式3
|
[oracle@cl oswbb]$./startOSWbb.sh 60 10 gzip /home/share/archive
与方式2命令大致相同,该方式指定存放数据的位置并方式4
[o [oracle@cl oswbb]$./startOSWbb.sh 60 48 NONE /home/share/archive
以每 60 秒间隔收集一次数据并将最近 48 小时的数据,存放在指定的归档文件中,不自动压缩文件方式5
[o [oracle@cl oswbb]$nohup ./startOSWbb.sh 60 10 &
使用以上命令可让 OSW 能够在后台持续运行并在当前会话终止后不会被挂断。
停止OSWatche
[oracle@cl oswbb]$./stopOSWbb.sh
Unix 平台上启动 OSWatcher
[oracle@cl oswbb]$ ./startOSWbb.sh 30 1
[oracle@cl oswbb]$ Setting the archive log directory to/mnt/hgfs/share/oswbb/archive
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
IFCONFIG found on your system.
NETSTAT found on your system.
TOP found on your system.
Testing for discovery of OS CPU COUNT
oswbb is looking for the CPU COUNT on your system
CPU COUNT will be used by oswbba to automatically look for cpu problems
CPU COUNT found on your system.
CPU COUNT = 2
Discovery completed.
…..
运行期间,可利用如下命令查看运行状况,如:
[oracle@cl share]$ ps -elf | grep OSWatcher | grep -v grep
0 S oracle 19725 1 0 80 0 - 2213 wait 16:27 pts/2 00:00:00 /bin/sh ./OSWatcher.sh 30 1
0 S oracle 19844 19725 0 80 0 - 2179 wait 16:28 pts/2 00:00:00 /bin/sh ./OSWatcherFM.sh 1 /oracle/oswbb/archive
查看在archive目录中文件:
[oracle@cl archive]$ ls -l
total 40
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswifconfig
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswiostat
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswmeminfo
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswmpstat
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswnetstat
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:27 oswprvtnet
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswps
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswslabinfo
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswtop
drwxr-xr-x 2 oracle oinstall 4096 Feb 22 16:28 oswvmstat
分析OSWatcher文件
在收集好OSWatcher文件信息后,现在开始对收集的文件进行分析
1)查看java版本
[oracle@cl archive]$ java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-52)
Copyright (C) 2006 Free Software Foundation, Inc.
OSWatcher要求的java版本1.4.2至更高
CLASSPATH=/JRE:/jlib:/rdbms/jlib
检查jre环境变量2)开始分析
[oracle@cl oswbb]$ java -jar oswbba.jar -i /oracle/oswbb/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 cl_iostat_16.02.22.1600.dat ...
Parsing file cl_iostat_16.02.22.1700.dat ...
Parsing file cl_vmstat_16.02.22.1600.dat ...
Parsing file cl_vmstat_16.02.22.1700.dat ...
Parsing file cl_netstat_16.02.22.1600.dat ...
Parsing file cl_netstat_16.02.22.1700.dat ...
Parsing file cl_top_16.02.22.1600.dat ...
Parsing file cl_top_16.02.22.1700.dat ...
Parsing file cl_ps_16.02.22.1600.dat ...
Parsing file cl_ps_16.02.22.1700.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:
由于博客格式不好控制,我保存为PDF文件
详细分析步骤,参加附件
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30430420/viewspace-2024111/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30430420/viewspace-2024111/