转自:http://www.eygle.com/archives/2007/07/oracle_os_watcher.html
OSW是Oracle提供的一个用于操作系统监控的工具包,这个工具包可以从Metalink下载。Metalink Note:301137.1
下载解包以后即可使用:
$ tar -xvf osw.tar
x ., 0 bytes, 0 tape blocks
x ./osw, 0 bytes, 0 tape blocks
x ./osw/Exampleprivate.net, 1731 bytes, 4 tape blocks
x ./osw/OSWatcher.sh, 11784 bytes, 24 tape blocks
x ./osw/OSWatcherFM.sh, 4451 bytes, 9 tape blocks
x ./osw/OSWg.jar, 722088 bytes, 1411 tape blocks
x ./osw/oswnet.sh, 334 bytes, 1 tape blocks
x ./osw/oswsub.sh, 401 bytes, 1 tape blocks
x ./osw/startOSW.sh, 1101 bytes, 3 tape blocks
x ./osw/stopOSW.sh, 560 bytes, 2 tape blocks
x ./osw/tarupfiles.sh, 127 bytes, 1 tape blocks
x ./osw/topaix.sh, 409 bytes, 1 tape blocks
x ./osw/README, 4997 bytes, 10 tape blocks
x ./osw/OSWgREADME, 3426 bytes, 7 tape blocks
调用执行从startOSW.sh文件开始,该文件需要两个参数,第一个参数指定采样时间间隔,第二个指定存储数据的时间。缺省的,如果不输入参数,OSW采样以30秒为间隔,存储2448小时的数据。
以下是自定义参数的执行过程:
bash-2.03$ ./startOSW.sh 30 240
bash-2.03$
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 Jul 3 14:40:21 CST 2007
With SnapshotInterval = 30
With ArchiveInterval = 240
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:Tue Jul 3 14:40:21 CST 2007
osw heartbeat:Tue Jul 3 14:40:51 CST 2007
osw heartbeat:Tue Jul 3 14:41:21 CST 2007
分析监控得到的数据,可以得到图表输出
具体设置可以参考OSWgREADME文件中的说明。
OSW生成的图表非常直观,可以用来对服务器的运行状况进行监控和报告:
-The End-