4、执行诊断过程
执行start参数,进行诊断。
[Oracle@SimpleLinux prw]$ ./prw.sh start
Wed Apr 30 09:32:21 CST 2014: Starting Procwatcher
Wed Apr 30 09:32:21 CST 2014: Thank you for using Procwatcher. :-)
Wed Apr 30 09:32:21 CST 2014: Please add a comment to Oracle Support Note 459694.1
Wed Apr 30 09:32:21 CST 2014: if you have any comments, suggestions, or issues with this tool.
Procwatcher files will be written to: /prw
Wed Apr 30 09:32:21 CST 2014: Started Procwatcher
对应目录/prw中,就有诊断的结果显示。
[oracle@SimpleLinux prw]$ ls -l
total 232
-rw-r--r--. 1 oracle oinstall 36203 Apr 30 09:16 prw_12.1.13.11.1.zip
drwxrwxrwx. 2 oracle oinstall 4096 Apr 30 09:32 PRW_DB_ora11g –数据库诊断
-rwxr-xr-x. 1 oracle oinstall 187245 Nov 26 23:12 prw.sh
-rwxrwxrwx. 1 oracle oinstall 2917 Apr 30 09:32 prw_SimpleLinux.log –Procwatcher执行日志
drwxrwxrwx. 2 oracle oinstall 4096 Apr 30 09:32 PRW_SYS_SimpleLinux –中间过程操作系统层面结果
PRW_DB_ora11g中,显示了对ora11g的数据库实例诊断结果。
[oracle@SimpleLinux prw]$ cd PRW_DB_ora11g/
[oracle@SimpleLinux PRW_DB_ora11g]$ ls -l
total 72
-rwxrwxrwx. 1 oracle oinstall 2095 Apr 30 09:33 prw_ora_arc0_ora11g_1626_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2095 Apr 30 09:33 prw_ora_arc1_ora11g_1629_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2095 Apr 30 09:33 prw_ora_arc2_ora11g_1631_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2095 Apr 30 09:33 prw_ora_arc3_ora11g_1633_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2050 Apr 30 09:33 prw_ora_ckpt_ora11g_1604_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2050 Apr 30 09:32 prw_ora_dbw0_ora11g_1600_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 3136 Apr 30 09:33 prw_ora_fg_ora11g_1988_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 6993 Apr 30 09:33 prw_ora_fg_ora11g_2012_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2050 Apr 30 09:32 prw_ora_lgwr_ora11g_1602_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2091 Apr 30 09:32 prw_ora_pmon_ora11g_1582_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2050 Apr 30 09:33 prw_ora_rvwr_ora11g_1623_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 2065 Apr 30 09:33 prw_ora_smon_ora11g_1606_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 158 Apr 30 09:32 pw_latchholder_ora11g_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 583 Apr 30 09:32 pw_lock_ora11g_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 587 Apr 30 09:32 pw_sessionwait_ora11g_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 667 Apr 30 09:32 pw_sqltimings_ora11g_04-30-14.out
-rwxrwxrwx. 1 oracle oinstall 1616 Apr 30 09:32 pw_waitchains_ora11g_04-30-14.out
目录中所有的文件都是对特定实例后台进程的分析和dump结果。Procwather是一个综合性程序,如果存在ASM实例,或者诊断RAC环境,对每一个实例都会有专门的文件夹。
结果进程中包括三个类型结果:首先是核心后台进程解析,比如dbwr、pmon等关键进行的dump结果和跟踪结果。第二部分是特定后台Server Process分析。如果Procwather的确发现相互锁定的进程,会特意将这些进程信息导出。最后就是分析情况,会从latch、sessionwait、lock和SQL Timing等多个角度进行分析。从快速问题分析的角度看,最后一部分是比较重要的。
目录PRW_SYS_SIMPLELINUX中包括的就是分析过程中使用的脚本和中间结果文件。
[oracle@SimpleLinux prw]$ cd PRW_SYS_SimpleLinux/
[oracle@SimpleLinux PRW_SYS_SimpleLinux]$ ls -l
total 244
-rwxrwxrwx. 1 oracle oinstall 1 Apr 30 09:32 badsidlist
-rwxrwxrwx. 1 oracle oinstall 5 Apr 30 09:32 examinebg
-rwxrwxrwx. 1 oracle oinstall 3 Apr 30 09:33 idlecpu
-rwxrwxrwx. 1 oracle oinstall 6 Apr 30 09:32 israc_ora11g
-rwxrwxrwx. 1 oracle oinstall 10 Apr 30 09:33 lastvmstat
(篇幅原因,有省略……)
-rwxrwxrwx. 1 oracle oinstall 2 Apr 30 09:33 viewtype_ora11g
-rwxrwxrwx. 1 oracle oinstall 245 Apr 30 09:33 vmstat
下面我们对结果文件进行分析和解析。