主要讲解了如何通过操作系统,SQL语句,TKPROF来进行ORACLE使用情况的分析.对解决一些SQL优化问题有帮助.
一、TOP情况
--- ---- ----- ----- ----- ----- ----- ----- ----- -----System: cqrtc1 Tue Apr 10 17:42:45 2007 Load averages: 0.73, 0.72, 0.72 300 processes: 259 sleeping, 41 running Cpu states: CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS 0 0.80 69.6% 0.0% 3.6% 26.8% 0.0% 0.0% 0.0% 0.0% 1 0.65 83.3% 0.0% 0.4% 16.3% 0.0% 0.0% 0.0% 0.0% 2 0.93 59.1% 0.0% 5.4% 35.5% 0.0% 0.0% 0.0% 0.0% 3 0.72 31.0% 0.0% 3.4% 65.7% 0.0% 0.0% 0.0% 0.0% 4 0.81 11.1% 0.0% 19.2% 69.6% 0.0% 0.0% 0.0% 0.0% 5 0.57 11.9% 0.0% 5.2% 82.9% 0.0% 0.0% 0.0% 0.0% 6 0.76 22.4% 0.0% 4.6% 73.0% 0.0% 0.0% 0.0% 0.0% 7 0.62 32.7% 0.0% 4.8% 62.5% 0.0% 0.0% 0.0% 0.0%
avg 0.73 40.1% 0.0% 6.0% 54.0% 0.0% 0.0% 0.0% 0.0%
Memory: 17519428K (4956172K) real, 19105896K (6173700K) virtual, 11877864K free Page# 1/8
CPU TTY PID USERNAME PRI NI SIZE RES STATE TIME %WCPU %CPU COMMAND 0 ? 13597 oracle 241 20 11303M 17216K run 8:13 80.39 80.25 oracleora8 6 ? 29940 oracle 154 20 11288M 1792K sleep 0:09 94.02 36.99 oracleora8 4 ? 15943 oracle 154 20 11289M 2880K sleep 14:57 33.40 33.34 oracleora8 7 ? 15733 billing 168 20 378M 366M sleep 3:42 18.30 18.27 stand 7 ? 15958 oracle 154 20 11289M 2880K sleep 9:54 16.58 16.55 oracleora8 7 ? 15922 oracle 154 20 11289M 2880K sleep 17:20 12.25 12.23 oracleora8 6 ? 15314 root 154 20 5908K 708K run 0:22 11.07 11.05 ftpd: 2 ? 15981 oracle 154 20 11289M 2880K sleep 9:11 9.52 9.50 oracleora8 7 ? 15894 oracle 154 20 11289M 2880K sleep 10:32 7.45 7.44 oracleora8 2 ? 15736 billing 168 20 378M 356M sleep 1:03 5.15 5.14 stand 1 ? 15731 billing 168 20 378M 366M sleep 5:10 4.77 4.76 stand 2 ? 15911 oracle 154 20 11289M 2880K sleep 11:09 3.07 3.07 oracleora8 1 ? 15977 oracle 154 20 11289M 2880K sleep 8:09 2.95 2.95 oracleora8 4 ? 1792 root -16 20 40496K 18820K run 122:53 2.76 2.76 midaemon 4 ? 24571 emedia 168 20 26892K 5492K sleep 144:57 2.68 2.68 emec_18 7 ? 24114 oracle 156 20 11295M 8960K sleep 3:20 2.10 2.09 ora_dbw1_ora8 3 ? 24112 oracle 156 20 11295M 8960K sleep 3:23 2.08 2.07 ora_dbw0_ora8 4 ? 24118 oracle 156 20 11295M 8960K sleep 3:20 2.08 2.07 ora_dbw3_ora8 3 ? 24116 oracle 156 20 11295M 8960K sleep 3:21 2.06 2.05 ora_dbw2_ora8 7 ? 15979 oracle 154 20 11289M 2880K sleep 6:22 1.97 1.97 oracleora8 6 ? 15903 oracle 154 20 11289M 2880K sleep 12:03 1.85 1.85 oracleora8 2 ? 15950 oracle 203 20 11289M 2880K run 8:04 1.62 1.62 oracleora8 5 ? 41 root 152 20 16032K 16032K run 91:31 1.58 1.58 vxfsd 6 ? 2197 root 152 20 286M 86384K run 83:45 1.55 1.55 java 5 ? 24124 oracle 156 20 11289M 2880K sleep 0:57 1.51 1.51 ora_smon_ora8 2 ? 15932 oracle 154 20 11289M 2880K sleep 8:44 1.43 1.43 oracleora8 3 ? 15734 billing 168 20 378M 366M sleep 1:25 1.36 1.36 stand 2 ? 27582 weblogic 152 20 560M 298M run 727:30 1.26 1.25 java 7 ? 24120 oracle 156 20 11288M 1792K sleep 7:49 1.14 1.14 ora_lgwr_ora8 0 ? 15983 oracle 154 20 11289M 2880K sleep 8:33 1.11 1.10 oracleora8 2 ? 17281 root -27 20 11128K 7236K run 45:09 0.93 0.93 cmcld 6 ? 24685 emedia 168 20 23512K 3564K sleep 52:39 0.89 0.88 emec_23 4 ? 15735 billing 168 20 378M 366M sleep 2:56 0.82 0.81 stand 7 ? 24122 oracle 156 20 11288M 1792K sleep 2:07 0.60 0.60 ora_ckpt_ora8 3 ? 1404 root 152 20 220M 25820K run 35:50 0.51 0.51 java 7 pts/tk 26831 root 168 20 7224K 988K sleep 0:34 0.44 0.44 top 5 ? 27576 weblogic 152 20 290M 85048K run 14:12 0.44 0.44 java 3 pts/tq 6443 oracle 178 20 7224K 988K run 0:03 0.41 0.40 top