安装使用Oracle OSWbb/OSWbba工具
OSWbb是收集数据,OSWbba 是分析数据,在OSWbb4.0以后,OSWbba已经绑定在OSWbb内。
1.创建目录,上传/解压安装包
[oracle@std ~]$ mkdir oswbb
[oracle@std ~]$ mv oswbb732.tar oswbb
[oracle@std ~]$ cd oswbb/
[oracle@std oswbb]$ ls
oswbb732.tar
oracle@std oswbb]$ tar -xvf oswbb732.tar
oswbb/
oswbb/data/
oswbb/docs/
oswbb/docs/The_Analyzer/
oswbb/docs/The_Analyzer/OSWatcherAnalyzerOverview.pdf
oswbb/docs/The_Analyzer/oswbbaUserGuide.pdf
oswbb/docs/The_Analyzer/oswbba_README.txt
oswbb/docs/OSWatcher/
oswbb/docs/OSWatcher/oswbb_README.txt
oswbb/docs/OSWatcher/OSWatcherUserGuide.pdf
oswbb/Exampleprivate.net
oswbb/nfssub.sh
oswbb/stopOSWbb.sh
oswbb/call_du.sh
oswbb/iosub.sh
oswbb/profile/
oswbb/OSWatcherFM.sh
oswbb/ifconfigsub.sh
oswbb/ltop.sh
oswbb/mpsub.sh
oswbb/call_uptime.sh
oswbb/gif/
oswbb/psmemsub.sh
oswbb/tar_up_partial_archive.sh
oswbb/oswnet.sh
oswbb/vmsub.sh
oswbb/call_sar.sh
oswbb/oswib.sh
oswbb/startOSWbb.sh
oswbb/Example_extras.txt
oswbb/oswsub.sh
oswbb/analysis/
oswbb/oswbba.jar
oswbb/locks/
oswbb/tmp/
oswbb/OSWatcher.sh
oswbb/topaix.sh
oswbb/tarupfiles.sh
oswbb/xtop.sh
oswbb/src/
oswbb/src/Thumbs.db
oswbb/src/OSW_profile.htm
oswbb/src/tombody.gif
oswbb/src/missing_graphic.gif
oswbb/src/coe_logo.gif
oswbb/src/watch.gif
oswbb/src/oswbba_input.txt
oswbb/oswrds.sh
[oracle@std oswbb]$ ls
oswbb oswbb732.tar
OSWBB目录结构
[oracle@std oswbb]$ tree
.
|-- Example_extras.txt
|-- Exampleprivate.net
|-- OSWatcher.sh
|-- OSWatcherFM.sh
|-- analysis
|-- call_du.sh
|-- call_sar.sh
|-- call_uptime.sh
|-- data
|-- docs
| |-- OSWatcher
| | |-- OSWatcherUserGuide.pdf
| | `-- oswbb_README.txt
| `-- The_Analyzer
| |-- OSWatcherAnalyzerOverview.pdf
| |-- oswbbaUserGuide.pdf
| `-- oswbba_README.txt
|-- gif
|-- ifconfigsub.sh
|-- iosub.sh
|-- locks
|-- ltop.sh
|-- mpsub.sh
|-- nfssub.sh
|-- oswbba.jar
|-- oswib.sh
|-- oswnet.sh
|-- oswrds.sh
|-- oswsub.sh
|-- profile
|-- psmemsub.sh
|-- src
| |-- OSW_profile.htm
| |-- Thumbs.db
| |-- coe_logo.gif
| |-- missing_graphic.gif
| |-- oswbba_input.txt
| |-- tombody.gif
| `-- watch.gif
|-- startOSWbb.sh
|-- stopOSWbb.sh
|-- tar_up_partial_archive.sh
|-- tarupfiles.sh
|-- tmp
|-- topaix.sh
|-- vmsub.sh
`-- xtop.sh
2.启动OSWbb
启动 OSWbb 实用程序,可以直接在 OSWbb 的安装目录下执行 startOSWbb.sh shell 脚本,
该脚本一共有4个参数,其中两个为可选参数,他们分别是:
$1 = 快照间隔,以秒为单位。
$2 = 要存储的归档数据的小时数。
$3 = (可选)压缩工具的名称,可以自动将生成的文件进行压缩。
$4 = (可选)保存归档的非默认路径,改参数用于替换OSWBB_ARCHIVE_DEST环境变量,
如果不设置这个参数oswbb将寻找环境变量OSWBB_ARCHIVE_DEST。 如果都没有设置的话,就会用默认的归档目录
示例 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
示例 5:以nohup启动时,将进程置于后台运行,允许工具在会话被终止后继续运行,以 60 秒间隔收集数据,将每个小时的数据记录到一个归档文件, 并自动删除10小时前的归档文件。
nohup ./startOSWbb.sh 60 10 &
注意
启动oswbb之前必须设置OS的LANG环境变量为英文环境,要不然oswbba的时候无法分析
~]# export LANG=zh_US
~]# date #通过date的输出结果,查看语言环境
Fri Jan 3 20:56:15 CST 2014
[oracle@std oswbb]$ ./startOSWbb.sh gzip /home/oracle/oswbb/archive/
[oracle@std oswbb]$ Info...Zip option IS specified.
Info...OSW will use gzip to compress files. Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
Warning... IFCONFIG not found on your system. No IFCONFIG data will be collected. --因为我们是普通用户执行的,直接执行ifconfig会找不到该命令 /sbin/ifconfig
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 = Discovery completed. Starting OSWatcher Black Box v7.3.2 on Wed Jan :: CST
With SnapshotInterval =
With ArchiveInterval = OSWatcher Black Box - Written by Carl Davis, Center of Expertise,
Oracle Corporation
For questions on install/usage please go to MOS (Note:301137.1)
If you need further assistance or have comments or enhancement
requests you can email me Carl.Davis@Oracle.com Data is stored in directory: /home/oracle/oswbb/archive/ Starting Data Collection... oswbb heartbeat:Wed Jan :: CST
oswbb heartbeat:Wed Jan :: CST
oswbb heartbeat:Wed Jan :: CST
oswbb heartbeat:Wed Jan :: CST
[oracle@std oswbb]$ ll archive/
total
drwxr-xr-x oracle oinstall Jan : oswifconfig
drwxr-xr-x oracle oinstall Jan : oswiostat
drwxr-xr-x oracle oinstall Jan : oswmeminfo
drwxr-xr-x oracle oinstall Jan : oswmpstat
drwxr-xr-x oracle oinstall Jan : oswnetstat
drwxr-xr-x oracle oinstall Jan : oswprvtnet
drwxr-xr-x oracle oinstall Jan : oswps
drwxr-xr-x oracle oinstall Jan : oswslabinfo
drwxr-xr-x oracle oinstall Jan : oswtop
drwxr-xr-x oracle oinstall Jan : oswvmstat
查看收集到的数据样例:
[oracle@std archive]$ cd oswiostat/
[oracle@std oswiostat]$ ls
std_iostat_16.01.27..dat
[oracle@std oswiostat]$ cat std_iostat_16.01.27..dat
Linux OSWbb v7.3.2
zzz ***Wed Jan :: CST
avg-cpu: %user %nice %system %iowait %steal %idle
1.02 0.00 1.02 0.51 0.00 97.46 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 0.00 4.00 0.00 52.00 0.00 26.00 0.02 4.75 4.75 1.90
sda1 0.00 0.00 4.00 0.00 52.00 0.00 26.00 0.02 4.75 4.75 1.90
sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 zzz ***Wed Jan :: CST
avg-cpu: %user %nice %system %iowait %steal %idle
0.51 0.00 1.52 14.21 0.00 83.76 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 82.00 0.00 22.00 0.00 484.00 44.00 0.96 45.00 12.95 28.50
sda1 0.00 82.00 0.00 22.00 0.00 484.00 44.00 0.96 45.00 12.95 28.50
sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 zzz ***Wed Jan :: CST
avg-cpu: %user %nice %system %iowait %steal %idle
0.51 0.00 1.01 0.00 0.00 98.48 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 zzz ***Wed Jan :: CST
avg-cpu: %user %nice %system %iowait %steal %idle
0.50 0.00 1.51 1.51 0.00 96.48 Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 6.00 0.00 2.00 0.00 32.00 32.00 0.03 14.50 14.50 2.90
sda1 0.00 6.00 0.00 2.00 0.00 32.00 32.00 0.03 14.50 14.50 2.90
sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
4.停止oswbb
[oracle@std oswbb]$ ./stopOSWbb.sh
[oracle@std oswbb]$ ps -ef|grep oswbb |grep -v grep
5.后台启动oswbb
[oracle@std oswbb]$ nohup ./startOSWbb.sh gzip /home/oracle/oswbb/archive/ >& > /home/oracle/oswbb/oswbb.log &
[]
[oracle@std oswbb]$ tail -f ../oswbb.log
Oracle Corporation
For questions on install/usage please go to MOS (Note:301137.1)
If you need further assistance or have comments or enhancement
requests you can email me Carl.Davis@Oracle.com Data is stored in directory: /home/oracle/oswbb/archive/ Starting Data Collection... oswbb heartbeat:Wed Jan :: CST
oswbb heartbeat:Wed Jan :: CST
解释一下 >& 在 shell 程式中,最常使用的 FD (file descriptor) 大概有三个, 分别是: 是一个文件描述符,表示标准输入(stdin)
是一个文件描述符,表示标准输出(stdout)
是一个文件描述符,表示标准错误(stderr) 在标准情况下, 这些FD分别跟如下设备关联:
stdin(): keyboard 键盘输入,并返回在前端
stdout(): monitor 正确返回值 输出到前端
stderr(): monitor 错误返回值 输出到前端 & 是一个描述符,如果1或2前不加&,会被当成一个普通文件
>& 意思是把标准输出重定向到标准错误.
>& 意思是把标准错误输出重定向到标准输出。
&>filename 意思是把标准输出和标准错误输出都重定向到文件filename中
6.owsbba(OS Watcher Black Box Analyzer)分析抓取的数据
我们用OSWatcher 收集了数据存储到归档里,但是这些文件不利于分析,
所以Oracle 提供了OSWbba(OS Watcher Black Box Analyzer)工具,
其可以分析OSWbb收集的数据并用图表展示出来。
--查看java版本
[oracle@std ~]$ java -version
java version "1.4.2"
gij (GNU libgcj) version 4.1. (Red Hat 4.1.-)
我们的版本过低,更新JDK环境
[oracle@std ~]$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) Server VM (build 23.25-b01, mixed mode)
--启动oswbba
[oracle@std ~]$ su -
Password:
[root@std ~]# DISPLAY=192.168.1.210:0.0
[root@std ~]# xhost +
access control disabled, clients can connect from any host
[root@std ~]# exit
logout
[oracle@std ~]$ java -jar /home/oracle/oswbb/oswbb/oswbba.jar -i /home/oracle/oswbb/archive/ Starting OSW Analyzer V7.3.1
OSWatcher Analyzer Written by Oracle Center of Expertise
Copyright (c) by Oracle Corporation Parsing Data. Please Wait... WARNING. oswbba has detected at least some of the files in you
archive have been compressed. These files will not be analyzed.
You must uncompress all the files in the archive for full
analysis and graphing capabilities. Scanning file headers for version and platform info... Compressed file found. Ignoring std_iostat_16.01.27..dat.gz ...
Compressed file found. Ignoring std_iostat_16.01.27..dat.gz ... Compressed file found. Ignoring std_iostat_16.01.27..dat.gz ...
Parsing file std_iostat_16.01.27..dat ...
Compressed file found. Ignoring std_iostat_16.01.27..dat.gz ...
Parsing file std_iostat_16.01.27..dat ... Compressed file found. Ignoring std_vmstat_16.01.27..dat.gz ...
Parsing file std_vmstat_16.01.27..dat ...
Compressed file found. Ignoring std_vmstat_16.01.27..dat.gz ...
Parsing file std_vmstat_16.01.27..dat ... Compressed file found. Ignoring std_netstat_16.01.27..dat.gz ...
Parsing file std_netstat_16.01.27..dat ...
Compressed file found. Ignoring std_netstat_16.01.27..dat.gz ...
Parsing file std_netstat_16.01.27..dat ... Compressed file found. Ignoring std_top_16.01.27..dat.gz ...
Parsing file std_top_16.01.27..dat ...
Compressed file found. Ignoring std_top_16.01.27..dat.gz ...
Parsing file std_top_16.01.27..dat ... Compressed file found. Ignoring std_ps_16.01.27..dat.gz ...
Parsing file std_ps_16.01.27..dat ...
Compressed file found. Ignoring std_ps_16.01.27..dat.gz ...
Parsing file std_ps_16.01.27..dat ... Parsing Completed. Enter to Display CPU Process Queue Graphs
Enter to Display CPU Utilization Graphs
Enter to Display CPU Other Graphs
Enter to Display Memory Graphs
Enter to Display Disk IO Graphs Enter to Generate All CPU Gif Files
Enter to Generate All Memory Gif Files
Enter 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: Enter to Display CPU Process Queue Graphs
Enter to Display CPU Utilization Graphs
Enter to Display CPU Other Graphs
Enter to Display Memory Graphs
Enter to Display Disk IO Graphs Enter to Generate All CPU Gif Files
Enter to Generate All Memory Gif Files
Enter 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:


在解压后的oswbb/docs中可以查看官方帮助文档。
参考:
http://www.dbaydna.com/oswatcher%E5%9C%A8linux%E7%8E%AF%E5%A2%83%E4%BD%BF%E7%94%A8.html
http://www.cnblogs.com/kaituorensheng/p/3980334.html
http://blog.itpub.net/27000195/viewspace-1415841/
安装使用Oracle OSWbb/OSWbba工具的更多相关文章
- 命令行界面下使用emca安装配置Oracle Database Control实战
作为命令行忠有用户,server端软件的运维都倾向于使用命令或 脚本完毕,非常讨厌资源占用非常大的GUI.Oracle数据库作为重要的server端软件.其安装运维自然也全然支持纯命令行方式.虽然同一 ...
- Oracle简易界面工具 (Oracle 10g, Oracle 11g)
Oracle简易界面工具 背景:偶在远程机上干活,须要调用到 Oracle 11gserver的数据,远程机上已安装Oracle client, 但 sql plus 和 sql developer ...
- oracle基础开发工具及常用命令
oracle自带用户的讲解 1,oracle安装完毕创建数据库实例的时候会自动生成sys,system,scott 2,sys用户超级管理员,具有oracle的最高权限,具有sysdba角色,具有cr ...
- oracle 9i 图文安装教程 oracle 9i 安装
我的安装文件是ISO镜像文件,使用Virtual DAEMON Manager v 4.10打开: ora9i-1.iso ora9i-2.iso ora9i-3.iso 首先必须把上面三个镜像文件都 ...
- Oracle11g的安装卸载及经常使用工具的使用
Oracle11g的安装卸载及经常使用工具的使用 目的: (1) 掌握Oracle 11g数据库的安装与卸载过程. Oracle11g的安装卸载及经常使用工具的使用 目的: (1) 掌握Oracle ...
- Ubuntu 16.10 安装byzanz截取动态效果图工具
1.了解byzanz截取动态效果图工具 byzanz能制作文件小,清晰的GIF动态效果图,不足就是,目前只能通过输入命令方式来录制. byzanz主要的参数选项有: -d, --duration=SE ...
- 学习安装并配置前端自动化工具Gulp
Gulp和所有Gulp插件都是基于nodeJs来运行的,因此在你的电脑上需要安装nodeJs,安装过程请移驾安装并配置前端自动化工具--grunt.安装完成后,通过运行cmd进入DOS命令窗口,如图: ...
- 三、oracle数据库成功安装步骤 Oracle数据源配置
安装完Oracle驱动后,如需连接远程Oracle数据库,还需进行数据源配置,类似Windows下的ODBC数据源配置. 运行"开始菜单\Oracle - OraDb11g_home1\ ...
- 如何通过cmd检查自己电脑是否安装了oracle
随便一个oracle命令,例如imp,如果提示输入用户名,就表示安装了oracle 1.直接运行sqlplus,然后要求输入用户名和密码.如果你是管理员的身份,应该在用户名后加as sysdba(以下 ...
随机推荐
- [Android] charles高级使用总结
reference to : http://blog.csdn.net/a910626/article/details/52823981 charles高级使用总结 网速模拟 点击菜单“Proxy→T ...
- ADO 连接数据库,取到VT_DATE型日期转换成 int型
DATE dt = vDate;(vDate是从数据库取出来的值,类型为_variant_t) COleDateTime odt = COleDateTime(dt); CString strdate ...
- php五种常见的设计模式(转载)
很多人都想着写博客来记录编程生活中的点滴,我也不例外,但想了好长时间不知道写什么........万事开头难,先转载一篇吧..... 设计模式 一书将设计模式引入软件社区,该书的作者是 Erich Ga ...
- LeetCode之263. Ugly Number
------------------------------------------------------------- 如果一个数的质因子只包括2,3,5,那么这个数n可以表示为:n=2x+3y+ ...
- wap支付宝接口的问题
今天在支付宝接口开发时,遇到的两个坑 第一个: https://doc.open.alipay.com/doc2/detail.htm?spm=a219a.7629140.0.0.8nHr4i& ...
- Toad for Oracle
# 设置schema browser 多标签
- linux 查看目录所在的分区
df -h /data2 Filesystem Size Used Avail Use% Mounted on /dev/xvda1 20G .5G 12G % /
- Optimal Flexible Architecture(最优灵活架构)
来自:Oracle® Database Installation Guide 12_c_ Release 1 (12.1) for Linux Oracle base目录命名规范: /pm/s/u 例 ...
- Oracle 11203 + ASM安装 for HP UX
一,安装前准备 1.创建所需组和用户 /usr/sbin/groupadd -g 1000 oinstall/usr/sbin/groupadd -g 1020 asmadmin/usr/sbin/g ...
- [BI项目记]-新任务创建
上一篇介绍了如何处理一个Bug工作,此篇主要介绍如何借助TFS对于一个新需求创建一个新的工作项. 这里假定,有一个新的需求,需要创建五个报表. 然后开发的工作流程如下: 这个流程总结起来大致如下: 首 ...