分享几个11G用于监控的脚本

./blocks.sh

USERNAME

DEXTER

Select one schema from the list above or( Press enter to see all blocks in the database):

BLK_MODULE BLOCKER TY BLK_SESS CLIENT_INFO BLOCKED_OBJECT WAITER_MODUL WAITER WTR_SESS SQL_ID RO_ID DURATION


SQLPlus DEXTER TX 196,13 DEXTER.T SQLPlus DEXTER 133,9 0wsgbvrkjv9ds AAAVv2AAEAAAACrAAA 000:01:14

Session.sh

-bash-3.2$ ./session.sh
SID of database session to fetch full details: 196

SID :196
Username :DEXTER
App Machine :oel5
Serial number :13
Current Status :INACTIVE
SQL ID current :
Previous SQL ID :0wsgbvrkjv9ds
KCML Partition No :SQL*Plus
Program name :sqlplus@oel5 (TNS V1-V3)
Client Information :

Current SQL TEXT :

no rows selected

Previous SQL TEXT :

update t set id=101 where name=‘1str’

orapid.sh

-bash-3.2$ ./orapid.sh
What is the OS PID to fetch oracle session details: 30470

SID :196
Username :DEXTER
Serial number :13
Current Status :INACTIVE
SQL ID current :
Previous SQL ID :0wsgbvrkjv9ds
KCML Partition No :SQL*Plus
Program name :sqlplus@oel5 (TNS V1-V3)
Client Information :

Current SQL TEXT :

no rows selected

Previous SQL TEXT :

update t set id=101 where name=‘1str’

redo.sh

-bash-3.2$ ./redo.sh
Archive log distribution per hours on each day …

DAY 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 TOT


25-02-19 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 1 0 0 0 0 0 0 7
26-02-19 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2

To proceed with details analysis please press Y|y or enter N|n to exit : Y

Please enter the start time of interval format (DD-MM-YY HH24:MI) : 25-02-19 00
Please select the end time of interval format (DD-MM-YY HH24:MI) : 25-02-19 18

SNAP_TIME OBJECT_NAME OWNER BLOCK_CHANGED


25-02-19 15 ** TRANSIENT: 4197888 ** MISSING ** 7024
25-02-19 14 xxxxxxxx xxxxxx 32
Below is the query for the table generating the most redo :

mem.sh

-bash-3.2$ ./mem.sh
Total Mem :1998MB, Total Used :1889MB, Total Free :109 MB

memchk.sh

-bash-3.2$ ./memchk.sh

SGA_SIZE SGA_SIZE_FACTOR ESTD_DB_TIME ESTD_PHYSICAL_READS


   260              .5          445              176262
   390             .75          441              146745
   520               1          432               84336
   650            1.25          431               83805
   780             1.5          431               82287
   910            1.75          431               81485
  1040               2          431               81485

CURRENT_SGA DB_TIME BEST_DB_TIME PERCENT


    520        435          434 .230414747

PGA_TARGET_FOR_ESTIMATE PGA_TARGET_FACTOR ESTD_EXTRA_BYTES_RW ESTD_PGA_CACHE_HIT_PERCENTAGE ESTD_OVERALLOC_COUNT

           36700160              .125            51822592                            94                    5
           73400320               .25            51822592                            94                    5
          146800640                .5            40271872                            95                    4
          220200960               .75                   0                           100                    0
          293601280                 1                   0                           100                    0
          352321536               1.2                   0                           100                    0
          411041792               1.4                   0                           100                    0
          469762048               1.6                   0                           100                    0
          528482304               1.8                   0                           100                    0
          587202560                 2                   0                           100                    0
          880803840                 3                   0                           100                    0
         1174405120                 4                   0                           100                    0
         1761607680                 6                   0                           100                    0
         2348810240                 8                   0                           100                    0

OPTIMAL_PGA_FACTOR PGA_TARGET_IN_MB
.75 210

CURRENT_PGA_TARGET_IN_MB
280

还有一些其他的大家自己探索吧,已经上传到我的个人网站上。

wget www.10xdba.com/static/11g-script-1.0-0.el7.noarch.rpm
rpm -ivh 11g-script-1.0-0.el7.noarch.rpm
会将脚本安装到/scripts目录下面。

以后会将相应的资源上传到我的个人网站上,具体会将资源列表放入
http://www.10xdba.com/static/available.html
感兴趣的可以收藏以下。

你可能感兴趣的:(Oracle,Linux)