Oracle OS Watcher(OSW)
发布时间:2011-8-10 15:23
相?下??接如下:http://www.itpub.net/655904.html
介?
OS Watcher (OSW) is a collection of shell scripts intended to collect and archive operating
system and network metrics to aid support of generic performance issues. OSW operates as a
set of background processes on the server and gathers OS data on a regular basis, invoking
such utilities as vmstat, netstat and iostat.
Note: For more details, refer to the OS Watcher user’s guide in MetaLink note 301137.1.
The MetaLink note contains the link for downloading OS Watcher.
1:Installing OSW
安?很??,直接解??即可。?保相?文件上有?行的?限。
$ tar -xf osw.tar
$ cd osw
$ ls -gG
total 56
drwxr-xr-x 11 4096 Sep 30 13:50 archive
-rwxr-xr-x 1 1731 Mar 29 2005 Exampleprivate.net
-rwxr-xr-x 1 4451 Apr 5 2005 OSWatcherFM.sh
-rwxr-xr-x 1 10231 Aug 2 2005 OSWatcher.sh
-rwxr-xr-x 1 334 Mar 28 2005 oswnet.sh
-rwxr-xr-x 1 401 Mar 21 2005 oswsub.sh
-rw-r--r-- 1 3029 Mar 22 2005 README
-rwxr-xr-x 1 1101 Mar 18 2005 startOSW.sh
-rwxr-xr-x 1 560 Dec 16 2004 stopOSW.sh
-rwxr-xr-x 1 57 Jun 14 2005 tarupfiles.sh
-rwxr-xr-x 1 409 Mar 18 2005 topaix.sh
2:Configuring OSW
OSWatcher can be configured by editing the CONFIGURATION section of the OSWatcher.sh
script.
Here, the commands, along with their arguments, are listed. You can edit these here to
cause the behavior and output of the commands to change. The default setting for the Linux
platform is shown in the slide.
For example, the output from iostat with the ?x option, as shown above, shows the statistics
of the hard drive but not the partitions. You could change the ?x option to ?p /dev/hda and
the
output would show the individual partitions.
#########################################################
#############
# CONFIGURATION Determine Host Platform
#########################################################
#############
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'
;;
3:Running OSW
要运行 OSW,使用?本 startOSW.sh。
This is the script that starts the OSWatcher program. It accepts 2
arguments which control the frequency that data is collected and the
number of hours worth of data to archive.
$1 = ??的???隔(s)
$2 = 存???的保留??(hours)
缺省情?下,OSW??以 30s????隔,存?48 小?的??.
[oracle@Channel-MQ3 osw]$ startOSW.sh 60 2
[oracle@Channel-MQ3 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 V2.0.2 on Tue Jul 17 14:34:49 CST 2007
With SnapshotInterval = 60
With ArchiveInterval = 2
OSWatcher - Written by Carl Davis, Center of Expertise, Oracle Corporation
Starting Data Collection...
osw heartbeat:Tue Jul 17 14:34:49 CST 2007
[oracle@Channel-MQ3 osw]$
[oracle@Channel-MQ3 osw]$ ls
archive OSWatcherFM.sh OSWgREADME OSW.tar stopOSW.sh
Exampleprivate.net OSWatcher.sh oswnet.sh README tarupfiles.sh
nohup.out OSWg.jar oswsub.sh startOSW.sh topaix.sh
[oracle@Channel-MQ3 osw]$ cd archive
[oracle@Channel-MQ3 archive]$ ls -l
total 72
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswiostat
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswmeminfo
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswmpstat
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswnetstat
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswprvtnet
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswps
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswslabinfo
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswtop
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswvmstat
4:Stop OSW
停止 OSW,使用?本 stopOSW.sh.
[oracle@Channel-MQ3 osw]$ stopOSW.sh
[oracle@Channel-MQ3 osw]$ Terminated
[oracle@Channel-MQ3 osw]$
5:Viewing OSW Output
The only directory immediately under the osw installation directory is called archive.
That is where all output is stored. In that directory is a subdirectory for each command
that is being repeatedly run during the session. The subdirectory names are made up by
prepending the string “osw” to the command name. They are:
oswiostat
oswmeminfo
oswmpstat
oswnetstat
oswprvtnet
oswps
oswslabinfo
oswtop
Oswvmstat
Under each of those directories are the files that contain the collected data.
The names of those files follow this pattern for organizational purposes:
hostname_command_timestamp.dat
[oracle@Channel-MQ3 osw]$ cd archive
[oracle@Channel-MQ3 archive]$ ls -l
total 72
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswiostat
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswmeminfo
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswmpstat
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswnetstat
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswprvtnet
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswps
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswslabinfo
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswtop
drwxr-xr-x 2 oracle dba 4096 Jul 17 14:29 oswvmstat
[oracle@Channel-MQ3 archive]$ ls oswiostat
Channel-MQ3_iostat_07.17.07.1400.dat
OSWg is a graphing utility which comes shipped with OSW v2.0.0 and
higher. This utility is a stand-alone java program which requires java
1.4.2 or higher. OSWg graphs vmstat data for all unix platforms and
graphs iostat data for solaris and linux only.
[oracle@Channel-MQ3 archive]$ java -version
java version "1.4.2"
gcj (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[oracle@Channel-MQ3 archive]$ cd $ORACLE_HOME/jre/1.4.2/bin
[oracle@Channel-MQ3 bin]$ export PATH=$ORACLE_HOME/jre/1.4.2/bin:$PATH
[oracle@Channel-MQ3 bin]$ cd
[oracle@Channel-MQ3 ~]$ cd osw
[oracle@Channel-MQ3 osw]$ java -jar OSWg.jar -i /home/oracle/osw/archive
Starting OSWg V2.0.2
OSWatcher Graph Written by Oracle Center of Expertise
Copyright (c) 2006 by Oracle Corporation
Parsing Data. Please Wait...
Parsing file Channel-MQ3_iostat_07.17.07.1400.dat ...
Parsing file Channel-MQ3_vmstat_07.17.07.1400.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 Q to Quit Program
Please Select an Option:5
The Following Devices and Average Service Times Are Ready to Display:
Device Name Average Service Times in Milliseconds
hda 0.5478571428571428
Specify A Case Sensitive Device Name to View (Q to exit): hda
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 Q to Quit Program
Please Select an Option:Q
相??考?源:
Tools:OSW 工具-Oracle 的 OS
watcherhttp://www.eygle.com/archives/2007/07/oracle_os_watcher.html
Oracle OS Watcher 使用说明(1)http://tomszrp.itpub.net/post/11835/307576
Oracle OS Watcher 使用说明(2)http://tomszrp.itpub.net/post/11835/307577
Oracle OS Watcher 使用说明(3)http://tomszrp.itpub.net/post/11835/307578
Oracle OS Watcher 使用说明(4)http://tomszrp.itpub.net/post/11835/307580
Oracle OS Watcher 使用说明(5)http://tomszrp.itpub.net/post/11835/307581OSW 的诊断信息
字段含义说明
Oracle OS Watcher 使用说明(6)http://tomszrp.itpub.net/post/11835/307583
Oracle OS Watcher 使用说明(7)http://tomszrp.itpub.net/post/11835/307584
本文使用 Blog_Backup 未注册版本导出,请到 soft.pt42.com 注册。