千家信息网

OSW工具怎么用

发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,这篇文章给大家分享的是有关OSW工具怎么用的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。1.概述使用oracle的osw工具,可以对系统的CPU和内存,磁盘等进行图形化的展
千家信息网最后更新 2026年11月03日OSW工具怎么用

这篇文章给大家分享的是有关OSW工具怎么用的内容。小编觉得挺实用的,因此分享给大家做个参考,一起跟随小编过来看看吧。

1.概述

使用oracle的osw工具,可以对系统的CPU和内存,磁盘等进行图形化的展示,对于把握和了解整体的资源使用情况,具有直观的效果。

OSW工具由一系列shell脚本构成,

OSWatcher.sh是主调程序,派生出许多单个的shell进程,使用unix的操作系统诊断工具,来收集特定类型的数据

OSW调用特定的操作系统工具,每个工具作为一个特定的后台进程,进行数据收集。

一般而言支持下述工具:

ps

top

ifconfig

mpstat

iostat

netstat

traceroute

vmstat

meminfo(Linux Only)

slabinfo(Linux Only)

输出结果可以进行图形化的展示,当然,也可以使用shell脚本对收集的archive信息进行处理。

2.支持平台

OSW可以运行于下述平台之上:

AIX

Solaris

HP-UX

Linux

3.上传

使用sftp上传oswbb734.tar至/opt/tools路径下(工具可选,路径可选)

4.解压文件

tar xvf oswbb734.tar

[root@cams-a tools]# tar xvf oswbb734.tar

oswbb/

oswbb/call_uptime.sh

oswbb/profile/

oswbb/analysis/

oswbb/tar_up_partial_archive.sh

oswbb/oswsub.sh

oswbb/oswrds.sh

oswbb/src/

oswbb/src/missing_graphic.gif

oswbb/src/tombody.gif

oswbb/src/coe_logo.gif

oswbb/src/Thumbs.db

oswbb/src/OSW_profile.htm

oswbb/src/oswbba_input.txt

oswbb/src/watch.gif

oswbb/oswib.sh

oswbb/call_du.sh

oswbb/tarupfiles.sh

oswbb/ltop.sh

oswbb/nfssub.sh

oswbb/docs/

oswbb/docs/OSWatcher/

oswbb/docs/OSWatcher/OSWatcherUserGuide.pdf

oswbb/docs/OSWatcher/oswbb_README.txt

oswbb/docs/The_Analyzer/

oswbb/docs/The_Analyzer/oswbba_README.txt

oswbb/docs/The_Analyzer/oswbbaUserGuide.pdf

oswbb/docs/The_Analyzer/OSWatcherAnalyzerOverview.pdf

oswbb/OSWatcher.sh

oswbb/psmemsub.sh

oswbb/call_sar.sh

oswbb/oswnet.sh

oswbb/Exampleprivate.net

oswbb/mpsub.sh

oswbb/Example_extras.txt

oswbb/OSWatcherFM.sh

oswbb/startOSWbb.sh

oswbb/ifconfigsub.sh

oswbb/iosub.sh

oswbb/oswbba.jar

oswbb/vmsub.sh

oswbb/xtop.sh

oswbb/stopOSWbb.sh

5.删除osw

rm -rf oswbb

6.启动与停止

arg1:快照时间间隔,以秒为单位

arg2:数据保存最长时间

arg3:(可选)对数据进行压缩的方法

arg4:(可选)数据保存路径

例子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

例子4:每60秒执行一次,保存48小时,不压缩,保存至非默认路径

./startOSWbb.sh 60 48 NONE /u02/tools/oswbb/archive

例子5:后台运行,每60秒执行一次,保存10小时

nohup ./startOSWbb.sh 60 10 &

停止:./stopOSWbb.sh

7.生成采集数据

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

数据文件的格式为:

__YY.MM.DD.HH24.dat

[root@cams-a oswbb]# nohup ./startOSWbb.sh 30 24 &

[1] 72749

[root@cams-a oswbb]# nohup: 忽略输入并把输出追加到"nohup.out"

[1]+ Done nohup ./startOSWbb.sh 30 24

[root@cams-a oswbb]# ls

analysis call_sar.sh Example_extras.txt ifconfigsub.sh ltop.sh nohup.out oswbba.jar oswrds.sh psmemsub.sh stopOSWbb.sh tmp

archive call_uptime.sh Exampleprivate.net iosub.sh mpsub.sh OSWatcherFM.sh oswib.sh oswsub.sh src tarupfiles.sh vmsub.sh

call_du.sh docs gif locks nfssub.sh OSWatcher.sh oswnet.sh profile startOSWbb.sh tar_up_partial_archive.sh xtop.sh

[root@cams-a oswbb]# ls archive/

oswifconfig oswiostat oswmeminfo oswmpstat oswnetstat oswprvtnet oswps oswslabinfo oswtop oswvmstat

[root@cams-a oswbb]# ls -l archive/oswmeminfo/

总用量 4

-rw-r--r--. 1 root root 2410 9月 2 21:42 cams-a_meminfo_16.09.02.2100.dat

8.生成采样图表

我们使用 OSWbba (Black Box Analyzer)工具对生成数据进行分析。

首先需要保证Java版本高于1.4.2

[root@cams-a ~]# java -version

java version "1.6.0_45"

Java(TM) SE Runtime Environment (build 1.6.0_45-b06)

Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

假定将图表生成在archive文件路径下(也可选择其他路径)

[root@cams-a oswbb]# java -jar oswbba.jar -i 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 cams-a_iostat_16.09.02.2100.dat ...

An exception occured in insertVmstatLists on line 1

An exception occured in insertVmstatLists on line 8

…………

上述错误是因为字符集为zh_CN.GB18030导致错误,重新设置字符集为en_US.UTF-8,然后重新生成结果

[root@cams-a oswbb]# export LANG=en_US.UTF-8

[root@cams-a oswbb]# java -jar oswbba.jar -i 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 cams-a_iostat_16.09.02.2100.dat ...

Parsing file cams-a_iostat_16.09.02.2200.dat ...

Parsing file cams-a_vmstat_16.09.02.2100.dat ...

Parsing file cams-a_vmstat_16.09.02.2200.dat ...

Parsing file cams-a_netstat_16.09.02.2100.dat ...

Parsing file cams-a_netstat_16.09.02.2200.dat ...

Parsing file cams-a_top_16.09.02.2100.dat ...

Parsing file cams-a_top_16.09.02.2200.dat ...

Parsing file cams-a_ps_16.09.02.2100.dat ...

Parsing file cams-a_ps_16.09.02.2200.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:Q

9.私有网络

如需监控私有网络,可修改Exampleprivate.net文件内容,将换成主机名,并修改文件名为private.net后重启即可

10.说明

osw工具可以收集历史信息,可以对特定时间端的数据进行回放,但是要注意,其收集信息会因

采样间隔较短而变得很大,因此需要关注archive目录的空间。

收集的信息对于整体的资源使用情况,有比较直观的显示效果。

附:生成报表命令参数

-i Required.This is the input archive directory location.

-6 Same as option 6 from the menu. Will generate all disk gif files.

-7 Same as option 7 from the menu. Will generate all cpu gif files.

-8 Same as option 8 from the menu. Will generate all memory gif files.

-L User specified location of an existing directory to place any gif files generated by OSWbba. This overrides the OSWbba automatic convention for placing all gif files in the /gif directory. This directory must pre-exist!

-A Same as option A above. This option analyzes the files in the archive directory and produces a report

-S Same as option S above. This option analyzes a specific subset of times of the files in the archive directory and produces a report. This option is used together with the -B and -E options

-START Used with the analysis option to specify the first file located in the oswvmstat directory to analyze.

-STOP Used with the analysis option to specify the last file located in the oswvmstat directory to analyze.

-P User specified name of the html profile generated by OSWbba. This overrides the oswbba automatic naming

-NO_NETSTAT Ignores files in the oswnetstat directory from analysis.

-NO_LINUX Ignores files in the oswmeminfo directory from analysis.

-MEM_ALL Analyzes virtual and resident memory allocation for all processes. This is very resource intensive.

For Example:

java -jar oswbba.jar -i archive/ -6 -7 -8 -P 20160903_crash

我们也可以通过参考OSW工具中的shell脚本,自行改造,适应成自己操作系统所需的脚本。
OSW不只是用于监控数据库服务器,还可以监控应用服务器等。

感谢各位的阅读!关于"OSW工具怎么用"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,让大家可以学到更多知识,如果觉得文章不错,可以把它分享出去让更多的人看到吧!

工具 数据 路径 生成 例子 小时 文件 信息 系统 脚本 操作系统 内容 时间 监控 直观 后台 图形 图表 字符 平台 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 金融科技还是互联网 互联网 科技公司 深圳互联网科技公司 互联网女皇 腾讯科技 沃里互联网科技 互联网科技logo 互联网科技公司名称 云创客互联网科技公司 贵州叶脉互联网科技有限公司所属行业 南平创想时代互联网科技有限公司 移动互联网科技公司 知域互联网科技有限公司大骗子 深圳市罗太互联网科技有限公司 阿里互联网科技企业 特约风豹互联网科技为什么扣费 互联网高科技行业有哪些企业 兰石爱特工业互联网科技分公司 互联网科技大佬云集 互联网领先科技成果宣传视频 青岛互联网科技园 广州大一互联网络科技有限公司 科技金融是不是互联网金融 央行互联网金融科技公司 武汉健翔互联网络科技有限公司 四川慕妮娅互联网科技有限公司 科技赋能视角下互联网保险发展 互联网风格科技公司名称 西安左小互联网科技有限公司 北京军民互联网科技公司 互联网科技创新方面的资料
0