Oswatch是oracle官方提供,用于收集操作系统性能的小工具,oswatch的安装与使用也比较简单,直接解压就可以使用。oswatch是通过调用系统的命令完成信息的收集,如:ps ,top ,mpstat ,iostat,netstat ,traceroute vmstat 。支持的操作系统包括AIX,Solaris ,Linux等 。

1、解压oswbb软件到指定的目录


  1. ######这里我使用的是v8.4的版本,直接放到root目录下
  2. [root@oracle19c ~]# tar xvf oswbb840.tar
  3. oswbb/
  4. oswbb/uncpr.bat
  5. oswbb/sarsub.sh
  6. oswbb/psmemsub.sh
  7. oswbb/stopOSWbb.sh
  8. oswbb/analysis/
  9. oswbb/piddsub.sh
  10. oswbb/arpsub.sh
  11. oswbb/docs/
  12. oswbb/docs/OSWatcher/
  13. oswbb/docs/OSWatcher/oswbb_README.txt

2、安装jdk8.0以上版本,oswbba需要调用


  1. #####解压jdk8.0版本到指定目录
  2. [root@oracle19c archive]# tar xzvf jdk1.8.0_11.tar.gz
  3. #####设置java home环境变量
  4. vi .bash_profile
  5. JAVA_HOME=/root/jdk1.8.0_11
  6. PATH=$JAVA_HOME/bin:$HOME/bin

3、启动Oswatcher收集系统资源状态


  1. ######设置lang环境变量
  2. [root@oracle19c oswbb]# export LANG=zh_US
  3. [root@oracle19c oswbb]# date
  4. Fri Aug 27 15:44:39 CST 2021
  5. [root@oracle19c oswbb]#
  6. #####示例:启动oswbb.sh 以5秒钟一次并删除1个小时前的归档数据,收集的数据存放在archive目录,默认1个小时进行归档
  7. [root@oracle19c oswbb]# ./startOSWbb.sh 5 1 gzip /root/oswbb/archive/
  8. [root@oracle19c oswbb]# Info...Zip option IS specified.
  9. Info...OSW will use /root/oswbb/archive/ to compress files.
  10. Setting the archive log directory to/root/oswbb/archive
  11. Testing for discovery of OS Utilities...
  12. VMSTAT found on your system.
  13. IOSTAT found on your system.
  14. MPSTAT found on your system.
  15. IP found on your system.
  16. TOP found on your system.
  17. PIDSTAT found on your system.
  18. NFSIOSTAT found on your system.
  19. TRACEROUTE found on your system.
  20. Discovery of CPU CORE COUNT
  21. CPU CORE COUNT will be used by oswbba to automatically look for cpu problems
  22. CPU CORE COUNT = 4
  23. VCPUS/THREADS = 4
  24. Discovery completed.
  25. Starting OSWatcher v8.4.0 on Fri Aug 27 15:10:59 CST 2021
  26. With SnapshotInterval = 5
  27. With ArchiveInterval = 1
  28. OSWatcher - Written by Carl Davis, Center of Expertise,
  29. Oracle Corporation
  30. For questions on install/usage please go to MOS (Note:301137.1)
  31. Data is stored in directory: /root/oswbb/archive
  32. Starting Data Collection...
  33. oswbb heartbeat:Fri Aug 27 15:24:50 CST 2021
  34. oswbb heartbeat:Fri Aug 27 15:24:55 CST 2021
  35. oswbb heartbeat:Fri Aug 27 15:25:00 CST 2021
  36. ............

4、到archive目录,看到到已经收集到的系统状态


  1. #####进入到archive,查看已经收集到的数据
  2. [root@oracle19c oswbb]# cd archive/
  3. [root@oracle19c archive]# ls
  4. oswarp oswcpuinfo oswifconfig oswiostat oswmeminfo oswmpstat oswnetstat oswnfsiostat oswpidstat oswpidstatd oswprvtnet oswps oswslabinfo oswtop oswvmstat oswxentop
  5. [root@oracle19c archive]#
  6. #######查看已经收集到的磁盘io信息
  7. [root@oracle19c archive]# cd oswiostat/
  8. [root@oracle19c oswiostat]#
  9. [root@oracle19c oswiostat]#
  10. [root@oracle19c oswiostat]# cat oracle19c_iostat_21.08.27.1500.dat |more
  11. Linux OSWbb v8.4.0
  12. zzz ***Fri Aug 27 15:24:50 CST 2021
  13. avg-cpu: %user %nice %system %iowait %steal %idle
  14. 0.25 0.00 1.01 0.00 0.00 98.74
  15. Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
  16. sda 0.00 2.00 0.00 11.00 0.00 98.50 17.91 0.01 0.82 0.00 0.82 0.09 0.10
  17. sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  18. zzz ***Fri Aug 27 15:24:55 CST 2021
  19. avg-cpu: %user %nice %system %iowait %steal %idle
  20. 0.50 0.00 1.51 0.00 0.00 97.98
  21. Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
  22. sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  23. sdb 0.00 0.00 0.00 2.00 0.00 32.00 32.00 0.00 0.00 0.00 0.00 0.00 0.00
  24. zzz ***Fri Aug 27 15:25:00 CST 2021
  25. avg-cpu: %user %nice %system %iowait %steal %idle
  26. 0.25 0.00 1.26 0.00 0.00 98.49
  27. Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util
  28. sda 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  29. sdb 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
  30. #####查看已收集到的top信息
  31. [root@oracle19c archive]# cd oswtop/
  32. [root@oracle19c oswtop]# ls
  33. oracle19c_top_21.08.27.1500.dat
  34. [root@oracle19c oswtop]# cat oracle19c_top_21.08.27.1500.dat |more
  35. Linux OSWbb v8.4.0
  36. zzz ***Fri Aug 27 15:25:21 CST 2021
  37. top - 15:25:22 up 57 min, 3 users, load average: 0.90, 1.54, 1.37
  38. Tasks: 289 total, 14 running, 275 sleeping, 0 stopped, 0 zombie
  39. %Cpu(s): 2.2 us, 5.2 sy, 0.0 ni, 27.4 id, 59.3 wa, 0.0 hi, 5.9 si, 0.0 st
  40. KiB Mem : 5780284 total, 2805832 free, 773836 used, 2200616 buff/cache
  41. KiB Swap: 2047996 total, 2047996 free, 0 used. 1829288 avail Mem
  42. PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
  43. 19 root 20 0 0 0 0 S 55.6 0.0 0:43.76 ksoftirqd/2
  44. 24 root 20 0 0 0 0 R 50.9 0.0 0:33.38 ksoftirqd/3
  45. 406 root 0 -20 0 0 0 S 44.4 0.0 0:01.36 kworker/2:1H
  46. 405 root 20 0 0 0 0 R 43.5 0.0 0:07.08 xfsaild/sda2
  47. 865 root 20 0 250744 8372 4680 R 19.4 0.1 1:22.31 vmtoolsd
  48. 13 root rt 0 0 0 0 S 18.5 0.0 0:06.99 migration/1
  49. 61270 root 20 0 58544 2324 1528 R 5.6 0.0 0:00.06 top
  50. 53917 oracle 20 0 2051652 33636 29708 S 3.7 0.6 0:01.08 ora_m002_orcl
  51. 33319 root 20 0 0 0 0 R 2.8 0.0 1:07.99 kworker/u256:2
  52. 35576 root 20 0 0 0 0 S 2.8 0.0 0:04.65 kworker/0:0
  53. 61237 root 20 0 4964 1264 656 S 2.8 0.0 0:00.05 pidstat
  54. 61239 root 20 0 4964 1264 656 S 2.8 0.0 0:00.04 pidstat
  55. 52752 oracle -2 0 2050060 20348 17272 R 1.9 0.4 0:11.47 ora_vktm_orcl
  56. 61188 oracle 20 0 109132 1404 544 R 1.9 0.0 0:00.65 dd
  57. 61219 root 20 0 4396 760 632 S 1.9 0.0 0:00.02 mpstat
  58. 42985 root 20 0 0 0 0 S 0.9 0.0 0:03.32 kworker/u256:1
  59. 1 root 20 0 191272 4236 2588 S 0.0 0.1 0:11.09 systemd
  60. 2 root 20 0 0 0 0 S 0.0 0.0 0:00.02 kthreadd

5、使用oswbba查看收集的信息


  1. #####Oracle 提供了OSWbba(OS Watcher Black Box Analyzer)工具,可以分析收集的数据并用图表展示出来。
  2. [root@oracle19c oswbb]# java -jar oswbba.jar -i /root/oswbb/archive/
  3. Starting OSW Analyzer V8.4.0
  4. OSWatcher Analyzer Written by Oracle Center of Expertise
  5. Copyright (c) 2019 by Oracle Corporation
  6. Parsing Data. Please Wait...
  7. WARNING. oswbba has detected at least some of the files in you
  8. archive have been compressed. These files will not be analyzed.
  9. You must uncompress all the files in the archive for full
  10. analysis and graphing capabilities.
  11. Scanning file headers for version and platform info...
  12. Compressed file found. Ignoring oracle19c_iostat_21.08.27.1500.dat.gz ...
  13. Compressed file found. Ignoring oracle19c_pidstat_21.08.27.1500.dat.gz ...
  14. Parsing file oracle19c_pidstat_21.08.27.1600.dat ...
  15. Compressed file found. Ignoring oracle19c_iostat_21.08.27.1500.dat.gz ...
  16. Parsing file oracle19c_iostat_21.08.27.1600.dat ...
  17. This directory already exists. Rewriting...
  18. Parsing Completed.
  19. Enter 1 to Display CPU Process Queue Graphs
  20. Enter 2 to Display CPU Utilization Graphs
  21. Enter 3 to Display CPU Other Graphs
  22. Enter 4 to Display Memory Graphs
  23. Enter 5 to Display Disk IO Graphs
  24. Enter 61 to Display Individual OS Process I/O RPS Graphs
  25. Enter 62 to Display Individual OS Process I/O WPS Graphs
  26. Enter 63 to Display Individual OS Process Percent User CPU Graphs
  27. Enter 64 to Display Individual OS Process Percent System CPU Graphs
  28. Enter 65 to Display Individual OS Process Percent Total CPU (User + System) Graphs
  29. Enter 66 to Display Individual OS Process Percent Memory Graphs
  30. Enter GP to Generate Individual Process Profile
  31. Enter GC to Generate All CPU Gif Files
  32. Enter GM to Generate All Memory Gif Files
  33. Enter GD to Generate All Disk Gif Files
  34. Enter L to Specify Alternate Location of Gif Directory
  35. Enter Z to Zoom Graph Time Scale (Does not change analysis dataset)
  36. Enter B to Returns to Baseline Graph Time Scale (Does not change analysis dataset)
  37. Enter R to Remove Currently Displayed Graphs
  38. Enter X to Export Parsed Data to Flat File
  39. Enter S to Analyze Subset of Data(Changes analysis dataset including graph time scale)
  40. Enter A to Analyze Data
  41. Enter D to Generate DashBoard
  42. Enter Q to Quit Program
  43. Please Select an Option:5
  44. Device Name Average Wait Times in Milliseconds
  45. sda 87.03
  46. sdb 150.21
  47. Specify A Case Sensitive Device Name to View (Q to exit): sdb
  48. #####

备注:图表示例:展示的是sdb磁盘等待时间及繁忙状态

oswatcher更为具体的使用方法,请参考docs内的OSWatcherOverview_840.pdf文档。

文章知识点与官方知识档案匹配,可进一步学习相关知识

[转帖]oracle OSWatcher安装部署的更多相关文章

  1. Oracle RAC安装部署文档

    1.    部署环境步骤 1.1 软件环境 操作系统:CentOS release 6.5(推荐使用5.*的系统)192.168.1.151    racnode1 192.168.1.152    ...

  2. Centos 下oracle 11g 安装部署及手动建库过程

    Oracle 11g 手动建库,在虚拟环境中,不使用DBCA工具进行创建数据库 1.Linux环境的基本配置 2.ip  10.11.30.60 3.Oracle 11g安装过程 ---------- ...

  3. Oracle安装部署,版本升级,应用补丁快速参考

    一.Oracle安装部署 1.1 单机环境 1.2 Oracle RAC环境 1.3 Oracle DataGuard环境 1.4 主机双机 1.5 客户端部署 二.Oracle版本升级 2.1 单机 ...

  4. Linux平台oracle 11g单实例 + ASM存储 安装部署 快速参考

    操作环境:Citrix虚拟化环境中申请一个Linux6.4主机(模板)目标:创建单机11g + ASM存储 数据库 1. 主机准备 2. 创建ORACLE 用户和组成员 3. 创建以下目录并赋予对应权 ...

  5. Oracle Grid Infrastructure安装部署文档

    1. 部署环境步骤 1.1 软件环境 操作系统: CentOS release 6.5 oracle安装包: linux.x64_11gR2_grid.zip linux.x64_11gR2_data ...

  6. Oracle 19C的下载和安装部署(图形安装和静默安装)

    Oracle 19C的下载和安装部署(图形安装和静默安装)   https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/ ...

  7. Linux平台Oracle 12.1.0.2 单实例安装部署

    主题:Linux平台Oracle 12.1.0.2 单实例安装部署 环境:RHEL 6.5 + Oracle 12.1.0.2 需求:安装部署OEM 13.2需要Oracle 12.1.0.2版本作为 ...

  8. [转帖]VMware Vsphere 6.0安装部署 (三) vCenter Server安装

    VMware Vsphere 6.0安装部署 (三) vCenter Server安装 2016年08月29日 14:59:14 dAng1r0Us 阅读数:72942   版权声明:本文为博主原创文 ...

  9. 1. Oracle安装部署文档

    一. 部署环境步骤 1.1 软件环境 操作系统:CentOS release 6.5oracle安装包:linux.x64_11gR2_database_1of1.zip:linux.x64_11gR ...

  10. Oracle Grid control 11g及Active DataGuard 11g安装部署

    Oracle Grid control 11g及Active DataGuard 11g安装部署(一) 原贴 http://blog.csdn.net/lichangzai/article/detai ...

随机推荐

  1. GDAL从二进制数据流中构造数据集

    目录 1. 概述 2. 实现 1. 概述 参看<从二进制数据流中构造GDAL可以读取的图像数据>这篇文章.这个问题的内涵在于,处理图像时都会将其读取成宽X高X波段的三维数组的内存Buffe ...

  2. Spring Boot 应用部署流程

    在本机操作,执行以下步骤启动项目 1.从Github上下载源码 git clone https://github.com/ChinaSilence/any-video.git 2.在数据库中建库,建表 ...

  3. 记录:idea git push失败问题

    问题描述: 重复弹出密码登录框,但是push失败 解决,用ssh的方式登录 1.生成ssh 配置用户名 git config --global user.name "tmqq2333&quo ...

  4. 谁说AI看不懂视频?

    摘要:人工智能在视觉领域发展趋于成熟,基于人工智能的视频内容分析能从根本上解决传统内容分析方法性能低下的问题,视频分析开启2.0智能时代. 视频数据量激增,数据处理和内容运营成本居高不下 云计算.大数 ...

  5. 打破“双十定律”,华为云AI推动超级抗菌药Drug X研发加速

    摘要:学科交叉已经逐渐变成了科技创新的一个主要源泉,成为这个科学时代一个不可替代的研究范式.在科技与技术合力赋能之下,中国科研人创新奋斗再出新成果,人类与病菌的博弈因此有了新武器. 本文分享自华为云社 ...

  6. aPaaS将如何改变软件行业?

    摘要:当SaaS在云计算中的占比越来越高的时候,几乎所有软件厂商言必谈SaaS,各大云厂商.咨询机构也都将目光瞄准了SaaS.如此火爆的现象背后,真实情况如何呢? 本文分享自华为云社区<[开天a ...

  7. Hadoop中mapreduce作业日志是如何生成的

    摘要:本篇博客介绍了hadoop中mapreduce类型的作业日志是如何生成的.主要介绍日志生成的几个关键过程,不涉及过多细节性的内容. 本文分享自华为云社区<hadoop中mapreduce作 ...

  8. 再谈BOM和DOM(6):dom对象及event对象位值计算—如offsetX/Top,clentX

    总是会被javascript的event对象的clientX,offsetX,screenX,pageX 弄得头晕,于是决定做个图来区分一下(画得我手那个酸呀....) event对象位置信息获取 先 ...

  9. Solon2 常用注解之 @Component 与 @Bean 的区别

    @Component 与 @Bean 设计的目的是一样的,都是注册 Bean 到容器里. 1.@Component 注解 及它的子类型 @Configuration,@Controller,@Remo ...

  10. Cypress系列(1)-Window下安装Cypress并打开

    Cypress系列(1)-Window下安装Cypress并打开 系统要求 Cypress是一个被安装在你电脑上的桌面应用,你的操作系统需要满足如下条件才能正常安装 Mac OS 10.9+(仅提供6 ...