oswatch(简称osw)是oracle的一个操作系统监控工具,oswatch是一个轻量级的操作系统监控工具,通过调用系统的命令完成信息的收集,并形成历史数据,命令如下:ps ,top ,mpstat ,iostat,netstat ,traceroute vmstat 。支持的操作系统有AIX ,Tru64 ,Solaris ,HP-UX ,Linux 。 可以在metlink直接下载:OS Watcher User Guide [ID 301137.1]   (Metalink Note:301137.1)  下载的就是tar包,然后直接解压就可以使用的。osw是一个java应用,可以在服务器上运行。

注意:osw工具需要以root用户来操作哦!

1、安装部署(解压既可)

[root@linux app]# pwd
/u01/app
[root@linux app]# ll osw302.tar
-rw-r--r-- 1 oracle oinstall 1366016 12-13 02:02 osw302.tar
[root@linux app]# 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@linux app]# ll osw/
总计 1336
-rwxr-xr-x 1 1003 dba    1730 2009-08-20 Exampleprivate.net
-rwxr-xr-x 1 1003 dba     549 2009-08-20 iosub.sh
-rwxr-xr-x 1 1003 dba     549 2009-08-20 mpsub.sh
-rwxr-xr-x 1 1003 dba    4451 2009-08-20 OSWatcherFM.sh
-rwxr-xr-x 1 1003 dba   22511 2011-05-04 OSWatcher.sh
-rw-r--r-- 1 1003 dba 1226302 2011-02-11 oswg.jar
-rw-r--r-- 1 1003 dba   14781 2011-05-04 OSWgREADME.txt
-rwxr-xr-x 1 1003 dba     415 2009-08-20 oswib.sh
-rwxr-xr-x 1 1003 dba     659 2009-08-20 oswlnxio.sh
-rwxr-xr-x 1 1003 dba     829 2009-08-20 oswlnxtop.sh
-rwxr-xr-x 1 1003 dba     357 2009-08-20 oswnet.sh
-rwxr-xr-x 1 1003 dba     826 2009-08-20 oswrds.sh
-rwxr-xr-x 1 1003 dba     529 2009-08-20 oswsub.sh
-rwxr-xr-x 1 1003 dba     549 2009-08-20 pssub.sh
-rw-r--r-- 1 1003 dba    8513 2011-05-04 README.txt
drwxr-xr-x 2 1003 dba    4096 2009-08-31 src
-rwxr-xr-x 1 1003 dba    1638 2011-02-11 startOSW.sh
-rwxr-xr-x 1 1003 dba     560 2009-08-20 stopOSW.sh
-rwxr-xr-x 1 1003 dba     127 2009-08-20 tarupfiles.sh
drwxr-xr-x 2 1003 dba    4096 2009-08-20 tmp
-rwxr-xr-x 1 1003 dba     431 2009-08-20 topaix.sh
-rwxr-xr-x 1 1003 dba     550 2009-08-20 topsub.sh
-rwxr-xr-x 1 1003 dba     549 2009-08-20 vmsub.sh

从上面看,权限有点怪,不过不管它,继续!

2、启动监控器

启动监控就是调用startOSW.sh脚本。
# ./startOSW.sh arg1 arg2

arg1:数据收集的间隔,以秒为单位。
arg2: 数据收集多长时间,以小时为单位。

例如:

[root@linux osw]# cd /u01/app/osw/
[root@linux osw]# pwd
/u01/app/osw
[root@linux osw]# ./startOSW.sh 30 1
[root@linux osw]#
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.
Discovery completed.
Starting OSWatcher v3.0.2   on 2011年 12月 13日 星期二 02:27:42 CST
With SnapshotInterval = 30
With ArchiveInterval = 1
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:2011年 12月 13日 星期二 02:27:42 CST
osw heartbeat:2011年 12月 13日 星期二 02:28:13 CST
osw heartbeat:2011年 12月 13日 星期二 02:28:44 CST
... ...

以上这里就是没30秒采样一次,连续采用一个小时。

初次使用会在OSW_HOME目录下面生成一个archive目录,此目录就是存放采样信息的:

[root@linux osw]# cd /u01/app/osw/
[root@linux osw]# pwd
/u01/app/osw
[root@linux osw]#  ll archive/
总计 36
drwxr-xr-x 2 root root 4096 12-13 02:16 oswiostat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmeminfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmpstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswnetstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswprvtnet
drwxr-xr-x 2 root root 4096 12-13 02:16 oswps
drwxr-xr-x 2 root root 4096 12-13 02:16 oswslabinfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswtop
drwxr-xr-x 2 root root 4096 12-13 02:16 oswvmstat
[root@linux osw]# cd archive/
[root@linux archive]# ll
总计 36
drwxr-xr-x 2 root root 4096 12-13 02:16 oswiostat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmeminfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswmpstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswnetstat
drwxr-xr-x 2 root root 4096 12-13 02:16 oswprvtnet
drwxr-xr-x 2 root root 4096 12-13 02:16 oswps
drwxr-xr-x 2 root root 4096 12-13 02:16 oswslabinfo
drwxr-xr-x 2 root root 4096 12-13 02:16 oswtop
drwxr-xr-x 2 root root 4096 12-13 02:16 oswvmstat

3、停止监控器

停止osw就是在其它终端运行stopOSW.sh脚本

例如:

[root@linux osw]# cd /u01/app/osw/
[root@linux osw]# pwd
/u01/app/osw
[root@linux osw]# ./stopOSW.sh 

4、生成图形

[root@linux ~]# cd /u01/app/osw/
[root@linux osw]# pwd
/u01/app/osw
[root@linux 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...
Parsing file linux_iostat_11.12.13.0500.dat ...
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Timestamp Error. Expected format: May 3 16:11:12 2006.
Timestamp Error. Found format: 12月 13日 星期二 CST
Parsing file linux_vmstat_11.12.13.0500.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
An exception occured in insertVmstatLists on line 30
No data found in input archive directory ./archive/
Please rerun OSWg with proper input directory containing OSW archive data.
Program aborting...

在生成图形界面的时候报错了,注意Timestamp Error. 产生这个错误的原因就是我的操作系统是中文环境的,osw要英文日期格式才可以。

[root@linux osw]# echo $LANG
zh_CN.GB18030
[root@linux osw]# date
2011年 12月 13日 星期二 05:03:13 CST

下面删除archive目录,改为英文环境就可以了:

[root@linux osw]# LANG=C
[root@linux osw]# date
Tue Dec 13 05:03:47 CST 2011
[root@linux osw]# rm -rf archive/
[root@linux osw]# ./startOSW.sh 10 1
[root@linux osw]#
Testing for discovery of OS Utilities...
VMSTAT found on your system.
IOSTAT found on your system.
MPSTAT found on your system.
NETSTAT found on your system.
TOP found on your system.
Discovery completed.
Starting OSWatcher v3.0.2   on Tue Dec 13 05:04:06 CST 2011
With SnapshotInterval = 10
With ArchiveInterval = 1
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:Tue Dec 13 05:04:06 CST 2011
osw heartbeat:Tue Dec 13 05:04:16 CST 2011
osw heartbeat:Tue Dec 13 05:04:26 CST 2011
osw heartbeat:Tue Dec 13 05:04:37 CST 2011
osw heartbeat:Tue Dec 13 05:04:48 CST 2011

接着停止监控:

[root@linux osw]# ./stopOSW.sh

生成图形界面:

[root@linux 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...
Parsing file linux_iostat_11.12.13.0500.dat ...
Parsing file linux_vmstat_11.12.13.0500.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:

图形界面可以借助xmanger,如果服务器有图形界面那更好了,也可以生成报告!

oracle系统监控工具oswatch简介!相关推荐

  1. SpringBoot 1024行代码 - 系统监控工具 Actuator简介

    前言 在生产环境中,我们比较关心任意时刻一个JVM的运行情况.SpringBoot为我们提供了一个方便的功能模块Actuator.只要简单几步就可以为我们的应用添加查询系统各项指标的功能. 准备工作 ...

  2. java 管理系统 注释_员工管理系统--带注释--oracle系统--java项目

    [实例简介] 员工管理系统--带注释--oracle系统--java项目 [实例截图] [核心代码] 31a0847e-5da9-43d6-b402-f60390d0396d └── person_M ...

  3. MySQL,Oracle系统学习,以及SQL语言-----数据库篇学习笔记

    Handouts MySQL和Oracle系统学习 一. 开篇立意(~~~~必看,有说明~~~~) 二. Oracle 篇 数据库存在之意义 基础概念(必须看,后面不会说明!!!) Oracle管理系 ...

  4. Oracle系列之add_months简介以及用法归纳教程

    Oracle系列之add_months简介以及用法归纳教程 最近遇到一个SQL统计,需要遇到获取某个日期n个月后的日期,比如统计入职时间超过2年的员工信息 如果不依靠Oracle函数,自己去写有点麻烦 ...

  5. NBU网络备份大全之oracle系统热备份

    学习和掌握如何使用NBU备份文件系统,对于一个数据管理员来说,仅仅是一个开始.因为对于大部分企业来说,买来NBU主要是为了备份企业数据库的数据,保护数据库的数据安全,进而保证企业应用的安全运行.因此, ...

  6. oracle solaris studio,Oracle Solaris Studio 软件简介

    Oracle Solaris Studio 软件简介 Oracle Solaris Studio 由两套工具组成:编译器套件和分析套件.每个套件中所包含的工具都设计为相互配合使用,为单线程.多线程和分 ...

  7. IT运维——系统监控软件简介

    对于很多企业来说,为了保证IT系统能够正常运行,很多企业都有选择一种系统监控软件进行实时或者远程监控.下面,编者搜集了一些切实可用的系统监控软件,希望能够帮助企业IT系统稳定.安全地运行. 首先,监视 ...

  8. Oracle系统的定义

    Oracle系统,即是以Oracle关系数据库为数据存储和管理作为构架基础,构建出的数据库管理系统.

  9. NetXMS 1.2.6 发布,系统监控工具

    NetXMS 1.2.6 增加了 DCI (data collection items) 实例发现,增加 NxShell 交互 Shell ,内置 NXSL 脚本语言,增加 D-Link 交换机驱动, ...

最新文章

  1. Pytorch学习记录-torchtext和Pytorch的实例( 使用神经网络训练Seq2Seq代码)
  2. 学习如何在AutoCad土木工程中绘制建筑设计图
  3. 你必须知道的.net学习总结
  4. 自考计算机原理知识点,09年自考计算机网络实用技术知识点:ATM原理
  5. ITK:创建一个大小Size
  6. api如何使用_记录API:技术作家和工程师指南
  7. 动态载入树 (ASP+数据库)
  8. js如何在当前页面加载springmvc返回的页面_手写SpringMVC学习
  9. ASP.NET MVC实践系列11-FCKEditor和CKEditor的使用
  10. 【转】VC++计算当前时间点间隔N天的时间(不使用CTimeSpan类)
  11. 批处理文件怎么写_Spring Boot快速入门:批处理与任务调度
  12. linux的vim编辑器,强大的Vim 编辑器
  13. java获取当前路径的几种方法
  14. 启动vsftpd失败是什么原因_消防排烟风机不启动的原因是什么呢?
  15. Matlab Copula函数实现
  16. 使用LibreOffice实现word转pdf(python代码)
  17. 公钥基础设施 PKI 技术与应用发展
  18. IOS-启动图和开屏广告图,类似网易
  19. Office快捷键之王,这个键应该没人不服
  20. 首批预计才60万套。 四轮猴

热门文章

  1. 芮城县县名由来 芮伯庙 古魏城 芮伯万 永乐县
  2. u盘iso安装服务器系统怎么安装win7系统安装方法,u盘iso安装系统,小猪教您u盘怎么安装win7系统...
  3. Debian+Apache2+MySQL5+PHP5+GD
  4. mysql将小数取整,mysql的取整函数
  5. java深入理解深拷贝和浅拷贝的区别 如何实现深拷贝和浅拷贝
  6. svg 动画_30个很棒的SVG动画
  7. 第二章 项目经理评分
  8. 一个垃圾分类项目带你玩转飞桨(2)
  9. 基于特征点检测的人脸融合
  10. 阅读---读吴军博士《态度》有感