ITPub博客

首页 > Linux操作系统 > Linux操作系统 > osw使用手记

osw使用手记

原创 Linux操作系统 作者:ad007520 时间:2010-11-11 21:10:37 0 删除 编辑

安装(下载oswg.zip包  Baseline version 2.0.4)
原理:This tool collects the following kinds of data using the resident host os utilities.
解压unzip oswg.zip 生成osw目录  修改权限 添加执行权限chmod -R 740 osw
验证iostat vmstat top 等工具是否安装  如果没有  查看rpm -qa|grep sysstat  procps  看sysstat或procps是否存在
查看OSWatcher.sh  有这么一段 可以判断其支持的平台
case $PLATFORM. in
  Linux)
    IOSTAT='iostat -x 1 3'
    VMSTAT='vmstat 1 3'
    TOP='eval top -b -n 1 | head -50'
    PSELF='ps -elf'
    MPSTAT='mpstat 1 3'
    MEMINFO='cat /proc/meminfo'
    SLABINFO='cat /proc/slabinfo'--/proc/slabinfo gives information about memory usage on the slab level
    ;;
  HP-UX|HI-UX)
    IOSTAT='iostat 1 3'
    VMSTAT='vmstat 1 3'
    TOP='top -d 1'
    PSELF='ps -elf'
    MPSTAT='sar -A -S 1 3' 
    ;;
  SunOS)
    IOSTAT='iostat -xn 1 3'
    VMSTAT='vmstat 1 3 '
    TOP='top -d1'
    PSELF='ps -elf'
    MPSTAT='mpstat 1 3'   
    ;;
  AIX)
    IOSTAT='iostat 1 3'
    VMSTAT='vmstat 1 3'
    TOP='top -Count 1'
    PSELF='ps -elf'
    MPSTAT='mpstat 1 3' 
    ;;
  OSF1)
    IOSTAT='iostat 1 3'
    VMSTAT='vmstat 1 3'
    TOP='top -d1'
    PSELF='ps -elf'
    MPSTAT='sar -S' 
    ;;
esac


STARTING OSW

startOSW.sh  可以带两个参数 否则选默认值
ARG1 = snapshot interval in seconds.--类型快照的间隔
ARG2 = the number of hours of archive data to store.--存储的期限

ex:
[oracle@rac1 osw]$ ./startOSW.sh
[oracle@rac1 osw]$
Info...You did not enter a value for snapshotInterval.
Info...Using default value = 30
Info...You did not enter a value for archiveInterval.
Info...Using default value = 48

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 V2.0.2  on Tue Nov 9 09:01:17 EST 2010
With SnapshotInterval = 30
With ArchiveInterval = 48

OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation

Starting Data Collection...

osw heartbeat:Tue Nov 9 09:01:17 EST 2010
osw heartbeat:Tue Nov 9 09:01:48 EST 2010
osw heartbeat:Tue Nov 9 09:02:19 EST 2010
osw heartbeat:Tue Nov 9 09:02:50 EST 2010
osw heartbeat:Tue Nov 9 09:03:20 EST 2010
osw heartbeat:Tue Nov 9 09:03:51 EST 2010
osw heartbeat:Tue Nov 9 09:04:22 EST 2010
osw heartbeat:Tue Nov 9 09:04:53 EST 2010
osw heartbeat:Tue Nov 9 09:05:23 EST 2010
Terminated --执行stopOSW.sh后 即终止

在osw目录下可以发现 新增了一个目录/u01/app/oracle/osw/archive
下面还有各个工具的查询结果
oswiostat  oswmeminfo  oswmpstat  oswnetstat  oswprvtnet  oswps  oswslabinfo  oswtop  oswvmstat


启动图形界面查看
java -jar OSWg.jar -i  /u01/app/oracle/osw/archive

 

 

 

 

 

 

 

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/21993926/viewspace-677956/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2009-06-28

  • 博文量
    137
  • 访问量
    287982