[20230221]19c oratop.txt

lfree發表於2023-02-24

[20230221]19c oratop.txt

--//我自己也不知道oracle從那個版本開始自帶oratop,便於快速瞭解當前資料庫的執行狀態.
--//貼一個生產系統的執行介面:



1.定位:
# locate --regex oratop$
/u01/app/oracle/product/19/db_1/suptools/oratop
/u01/app/oracle/product/19/db_1/suptools/oratop/oratop

$ file  /u01/app/oracle/product/19/db_1/suptools/oratop/oratop
/u01/app/oracle/product/19/db_1/suptools/oratop/oratop: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=d0ca854374b424dc870898c7216dc67eb6e20ad3, not stripped

$ /u01/app/oracle/product/19/db_1/suptools/oratop/oratop -h
oratop: Release 15.0.0
Usage:
  oratop [  [Options] [Logon] ]

  Logon:
  o prompt/cmd-line:     {username[@connect_identifier] | / } [AS SYSDBA]
  o prompt:              {password[@connect_identifier] } [AS SYSDBA]

         connect_identifier:
              o Net Service Name, (TNS) or
              o Easy Connect (host[:port]/[service_name])

  Options:
      -r : real-time (RT) wait events. (sec 3, default: Cumulative)
      -k : FILE#:BLOCK# (sec 4/process mode, defaut: EVENT/LATCH)
      -m : MODULE/ACTION. (sec 4/process mode, default: USERNAME/PROGRAM)
      -s : SQL mode. (sec 4, default: process mode)
      -f : detailed format, 132 columns. (default: standard, 80 columns)
      -b : batch mode. (default is text-based user interface)
      -n : maximum number of iterations. (requires number)
      -i : interval delay, requires value in seconds. (default: 5s)
      -v : oratop release version number
      -h : this help


2.執行測試:

$ /u01/app/oracle/product/19/db_1/suptools/oratop/oratop  -k -f -i 3 / as sysdba

Oracle 19c - Primary orcl   00:42:13 up: 230d,  1 ins,   51 sn,   3 us,  26G sga,    0% fra,   0 er,                        5.9%db
ID CPU  %CPU %DCP LOAD  AAS  ASC  ASI  ASW  IDL  ASP  LAT  MBPS IOPS  R/S  W/S  LIO  GCPS %FR  PGA TEMP UTPS  UCPS  RT/X DCTR DWTR
 1  16   3.3  3.5  1.1  0.9    0    2    6   43    0 8.6m   1.8  153   67   86 7.4k     0  10 1.5G 337M  116   742   19m   47   53

EVENT (C)                                                         TOTAL WAITS   TIME(s)  AVG_MS  PCT                    WAIT_CLASS
DB CPU                                                                          3838083           43
log file sync                                                       3.910E+08   2348997     6.0   26                        Commit
log file parallel write                                             3.978E+08   1157947     2.9   13                    System I/O
db file sequential read                                             1.520E+08    976297     6.4   11                      User I/O
RMAN backup & recovery I/O                                          1.059E+08    691985     6.5    8                    System I/O

ID   SID     SPID USERNAME  PROGRAM    SRV  SERVICE  PGA  SQLID/BLOCKER OPN  E/T  STA  STE  WAIT_CLASS  EVENT/*LATCH           W/T
 1  2550     8759 B/G       ARC1       DED  SYS$BAC  38M                    231d  ACT  I/O  User I/O    Disk file operations  824m
 1  4250   166854 LIS       w3wp.exe   DED  orcl    5.7M  c80kr4jznv16x SEL 1.0s  ACT  I/O  User I/O    db file parallel read 1.7m
 1  2556   169059 LIS       w3wp.exe   DED  orcl    4.1M                       0  ACT  WAI  Commit      log file sync         1.0m
 1  3974   167961 LIS       w3wp.exe   DED  orcl    4.8M                       0  ACT  WAI  Commit      log file sync         273u

--// -b 引數不斷輸出.也可以連線遠端資料庫,不過不能在命令列寫口令.*/

$ /u01/app/oracle/product/19/db_1/suptools/oratop/oratop -f sys@192.168.100.78:1521/book as sysdba
Oracle 11g - Primary book   08:58:57 up: 1.9d,  1 ins,    0 sn,   0 us, 613M sga,    0% fra,   0 er,                          0%db
ID CPU  %CPU %DCP LOAD  AAS  ASC  ASI  ASW  IDL  ASP  LAT  MBPS IOPS  R/S  W/S  LIO  GCPS %FR  PGA TEMP UTPS  UCPS  RT/X DCTR DWTR
 1  24   0.0  0.0  0.1    0    0    0    0    0    0    0   0.5   12    9    3    0     0   5 110M 6.0M    0     0  722m    0    9

EVENT (C)                                                         TOTAL WAITS   TIME(s)  AVG_MS  PCT                    WAIT_CLASS
DB CPU                                                                              240           73
change tracking file synchronous write                                   2684        39    14.8   12                         Other
os thread startup                                                        1709        38    22.5   12                   Concurrency
control file parallel write                                            174782         4       0    1                    System I/O
ADR block file read                                                      3428         4     1.4    1                         Other

ID   SID     SPID USERNAME  PROGRAM    SRV  SERVICE  PGA  SQLID/BLOCKER OPN  E/T  STA  STE  WAIT_CLASS  EVENT/*LATCH           W/T

*/

$ ll /u01/app/oracle/product/19/db_1/suptools
total 4
drwxr-xr-x. 10 oracle oinstall 4096 2023-02-22 08:51:44 orachk
drwxr-xr-x.  2 oracle oinstall   20 2020-11-12 18:11:22 oratop
drwxr-xr-x.  3 oracle oinstall   21 2019-04-17 18:43:07 tfa

--//suptools目錄下還有1個orachk程式,不會用.

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/267265/viewspace-2936971/,如需轉載,請註明出處,否則將追究法律責任。

相關文章