OSWatch是Oracle的一个操作系统监控工具,可以从Metalink上下载(NODE 301137.1)。
[root@localhost ~]# tar xvf oswbb601.tar
[root@localhost ~]# cd oswbb
[root@localhost oswbb]# ls
analysis gif OSWatcher.sh profile tmp
call_du.sh iosub.sh oswbba.jar pssub.sh topaix.sh
call_sar.sh locks oswib.sh src vmsub.sh
docs mpsub.sh oswnet.sh startOSWbb.sh xtop.sh
Exampleprivate.net nfssub.sh oswrds.sh stopOSWbb.sh
extras.txt OSWatcherFM.sh oswsub.sh tarupfiles.sh
[root@localhost oswbb]# ./startOSWbb.sh 30 1 --开启监控,表示30秒收集一次,收集1小时
[root@localhost oswbb]# ./startOSWbb.sh 30 1
[root@localhost oswbb]# Setting the archive log directory to/oracle/oswbb/archive
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.
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 = 1
Discovery completed.
Starting OSWatcher Black Box v6.0.1 on Wed Apr 17 09:08:39 CST 2013
With SnapshotInterval = 30
With ArchiveInterval = 1
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: /oracle/oswbb/archive
Starting Data Collection...
oswbb heartbeat:Wed Apr 17 09:08:44 CST 2013
oswbb heartbeat:Wed Apr 17 09:09:14 CST 2013
如果是第一次开始收集的话,会在oswatch安装目录下生成一个archive子目录用于存放收集到信息
[root@localhost oswbb]# java -jar oswbba.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...
ERROR. You do not have a legitimate version of java in your PATH.
Linux users please download and install java from java.sun.com or
see the OSWgREADME for instructions on how to use the version of java
that comes shipped with the Oracle database.
那是因为没有使用oracle的java的版本,把oracle的java版本加到root的环境变量里即可,如下:
将jar 的环境加入path:
export PATH=/oracle/oswbb/jdk/jre/bin:$PATH
[root@localhost oswbb]# java -jar oswbba.jar -i ./archive/
oswbb heartbeat:Wed Apr 17 09:27:26 CST 2013
Starting OSW Black Box Analyzer V6.0.1
OSWatcher Black Box Analyzer Written by Oracle Center of Expertise
Copyright (c) 2012 by Oracle Corporation
Parsing Data. Please Wait...
Scanning file headers for version and platform. info...
Parsing file localhost.localdomain_iostat_13.04.16.1500.dat ...
Parsing file localhost.localdomain_iostat_13.04.17.0900.dat ...
Parsing file localhost.localdomain_vmstat_13.04.16.1500.dat ...
Parsing file localhost.localdomain_vmstat_13.04.17.0900.dat ...
Parsing file localhost.localdomain_netstat_13.04.16.1500.dat ...
Parsing file localhost.localdomain_netstat_13.04.17.0900.dat ...
Parsing file localhost.localdomain_top_13.04.16.1500.dat ...
Parsing file localhost.localdomain_top_13.04.17.0900.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 A to Analyze Data
Enter Q to Quit Program
Please Select an Option:
使用XMANAGE条用图形化。
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26655292/viewspace-758651/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26655292/viewspace-758651/