Monitoring GoldenGate Processing

bb
Overview monitoring tools
  • GGSCI information commands 
  • The ggserr.log file (error log)
  • Process report
  • The discard files
  • The logs at operating-system level

Using the information commands in GGSCI
1. info all
Gives you a good indicator of your overall health.

GGSCI (cora) 13> info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     LEMP1       164:49:14     00:00:07
EXTRACT     RUNNING     PEMP1       165:14:16     00:00:03
REPLICAT    STOPPED     REMP2       00:00:00      329:58:44
注意: 一般正常的情况下, Lag at Chkpt  的值应该为0,而 Time Since Chkpt 应该小于10秒。

2. info lemp1 [ detail ]
Run status, checkpoints, approximate lag.Add detail to show current environmental information.
该命令给出当前进程组的状态、进程启动时间、lag信息、读写信息以及与该进程相对应的目录信息等等。

GGSCI (cora) 14> info lemp1 detail

EXTRACT    LEMP1     Last Started 2012-11-26 10:18   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:01 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2012-11-26 10:19:21  Seqno 28, RBA 10964480
                     SCN 0.1390403 (1390403)

  Target Extract Trails:

  Remote Trail Name                                Seqno        RBA     Max MB

  /u01/app/gg/dirdat/l1                               18       1034        100

  Extract Source                          Begin             End

  /u01/app/oracle/oradata/orcl11/redo01.log  2012-11-19 13:28  2012-11-26 10:19
  /u01/app/oracle/oradata/orcl11/redo03.log  2012-11-19 09:33  2012-11-19 13:28
  /u01/app/oracle/oradata/orcl11/redo02.log  2012-11-16 16:14  2012-11-19 09:33
  /u01/app/oracle/oradata/orcl11/redo02.log  2012-11-16 11:00  2012-11-16 16:14
  /u01/app/oracle/oradata/orcl11/redo02.log  2012-11-14 11:29  2012-11-16 11:00
  /u01/app/oracle/oradata/orcl11/redo01.log  2012-11-14 11:25  2012-11-14 11:29
  /u01/app/oracle/oradata/orcl11/redo01.log  2012-11-13 14:34  2012-11-14 11:26
  /u01/app/oracle/oradata/orcl11/redo03.log  * Initialized *   2012-11-13 14:34
  /u01/app/oracle/oradata/orcl11/redo03.log  2012-11-13 13:05  2012-11-13 14:34
  /u01/app/oracle/oradata/orcl11/redo03.log  2012-11-09 15:58  2012-11-13 13:05
  /u01/app/oracle/oradata/orcl11/redo02.log  * Initialized *   2012-11-09 15:58
  /u01/app/oracle/oradata/orcl11/redo02.log  2012-11-09 13:22  2012-11-09 15:36
  /u01/app/oracle/oradata/orcl11/redo02.log  * Initialized *   2012-11-09 13:22
  /u01/app/oracle/oradata/orcl11/redo02.log  2012-11-09 09:49  2012-11-09 13:18
  /u01/app/oracle/oradata/orcl11/redo01.log  * Initialized *   2012-11-09 09:49
  /u01/app/oracle/oradata/orcl11/redo01.log  2012-11-09 09:24  2012-11-09 09:37
  /u01/app/oracle/oradata/orcl11/redo01.log  * Initialized *   2012-11-09 09:24
  /u01/app/oracle/oradata/orcl11/redo01.log  2012-11-08 16:15  2012-11-09 09:19
  /u01/app/oracle/oradata/orcl11/redo01.log  * Initialized *   2012-11-08 16:15
  /u01/app/oracle/oradata/orcl11/redo01.log  2012-11-08 15:03  2012-11-08 16:07
  /u01/app/oracle/oradata/orcl11/redo01.log  2012-11-08 11:22  2012-11-08 15:03
  /u01/app/oracle/oradata/orcl11/redo03.log  2012-11-08 11:06  2012-11-08 11:22
  /u01/app/oracle/oradata/orcl11/redo03.log  * Initialized *   2012-11-08 11:06
  /u01/app/oracle/oradata/orcl11/redo03.log  2012-11-07 17:14  2012-11-08 10:21
  /u01/app/oracle/oradata/orcl11/redo03.log  * Initialized *   2012-11-07 17:14
  /u01/app/oracle/oradata/orcl11/redo03.log  2012-11-07 13:40  2012-11-07 17:09
  /u01/app/oracle/oradata/orcl11/redo03.log  * Initialized *   2012-11-07 13:40
  /u01/app/oracle/oradata/orcl11/redo03.log  2012-11-07 13:05  2012-11-07 13:35
  Not Available                           * Initialized *   2012-11-07 13:05

Current directory    /u01/app/gg

Report file          /u01/app/gg/dirrpt/LEMP1.rpt
Parameter file       /u01/app/gg/dirprm/lemp1.prm
Checkpoint file      /u01/app/gg/dirchk/LEMP1.cpe
Process file         /u01/app/gg/dirpcs/LEMP1.pce
Stdout file          /u01/app/gg/dirout/LEMP1.out
Error log            /u01/app/gg/ggserr.log

Also, we can use command send lemp1 status to get familiar information about the current status of Extract lemp1.

GGSCI (cora) 17> send lemp1 status

Sending STATUS request to EXTRACT LEMP1 ...

EXTRACT LEMP1 (PID 5696)
  Current status: Recovery complete: At EOF

  Current read position:
  Redo thread #: 1
  Sequence #: 28
  RBA: 22324736
  Timestamp: 2012-11-26 10:29:28.000000
  SCN: 0.1391293
  Current write position:
  Sequence #: 18
  RBA: 1034
  Timestamp: 2012-11-26 10:30:13.307645
  Extract Trail: /u01/app/gg/dirdat/l1


Monitoring process volume
1. stats lemp1
Statistics for operations processed: lists all the tables that have transactions.
该命令主要用于显示某进程组自启动以来所处理的所有事务的统计信息,如在哪个schema下对哪张表做了哪些操作,该操作以统计信息的方式给出。
在单方向的数据复制过程中,一对相关联的Extract和Replicat进程组处理的事务信息要完全一致,如经过对lemp1分析可知,自进程启动以来对Scott下的sal表进行了5次的插入操作,在target一端的remp1分析,应该有完全一致的处理信息。示例如下:

GGSCI (cora) 2> stats lemp1 --source

Sending STATS request to EXTRACT LEMP1 ...

Start of Statistics at 2012-11-26 10:39:42.

DDL replication statistics (for all trails):

*** Total statistics since extract started     ***
        Operations                                         0.00
        Mapped operations                                  0.00
        Unmapped operations                                0.00
        Other operations                                   0.00
        Excluded operations                                0.00

Output to /u01/app/gg/dirdat/l1:

Extracting from SCOTT.SAL to SCOTT.SAL:

*** Total statistics since 2012-11-26 10:39:20 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

*** Daily statistics since 2012-11-26 10:39:20 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

*** Hourly statistics since 2012-11-26 10:39:20 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

*** Latest statistics since 2012-11-26 10:39:20 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

End of Statistics.


GGSCI (cora) 1> stats remp1 --target

Sending STATS request to REPLICAT REMP1 ...

Start of Statistics at 2012-11-26 10:54:44.

DDL replication statistics:

*** Total statistics since replicat started     ***
        Operations                                         0.00
        Mapped operations                                  0.00
        Unmapped operations                                0.00
        Other operations                                   0.00
        Excluded operations                                0.00
        Errors                                             0.00
        Retried errors                                     0.00
        Discarded errors                                   0.00
        Ignored errors                                     0.00

Replicating from SCOTT.SAL to SCOTT.SAL:

*** Total statistics since 2012-11-26 10:39:27 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

*** Daily statistics since 2012-11-26 10:39:27 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

*** Hourly statistics since 2012-11-26 10:39:27 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

*** Latest statistics since 2012-11-26 10:39:27 ***
        Total inserts                                      5.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   5.00

End of Statistics.


Monitoring lag
1. lag lemp1
     or
    send lemp1 getlag
Lag statistics show you how well the Oracle GoldenGate processes are keeping pace with the amount of data that is being generated by the business applications.

GGSCI (cora) 9> send lemp1 getlag

Sending GETLAG request to EXTRACT LEMP1 ...
Last record lag: 22 seconds.
At EOF, no more records to process.

You get one of the three statuses:

  1. ‘At EOF, no more records to process’
  2. ‘Waiting for data to process’ 
  3. ‘Processing data’ 
NOTE: The INFO command also returns a lag statistic, but this statistic is taken from the 
last record that was checkpointed, not the current record that is being processed. 
It is less accurate than LAG or INFO.


Using the error log
1. view ggsevt
Use the Oracle GoldenGate error log to view:
  1. a history of GGSCI commands
  2. Oracle GoldenGate processes that started and stopped
  3. processing that was performed
  4. errors that occurred
  5. informational and warning messages

Using the process report
1. view report lemp1
Use the process report to view (depending on the process):
  1. parameters in use
  2. table and column mapping
  3. database information
  4. runtime messages and errors
  5. runtime statistics for the number of operations processed

Using the discard file
1. view report
Use a discard file to capture information about Oracle GoldenGate operations that failed.The discard file reports such information as:
  1. The database error message
  2. The sequence number of the data source or trail file
  3. The relative byte address of the record in the data source or trail file
  4. The details of the discarded operation, such as column values of a DML statement or the text of a DDL statement

Using the system log

fj.pngPicture2.jpg

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26679417/viewspace-749952/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26679417/viewspace-749952/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值