PROMON displays BI Checkpoint information through the following menu:
$ promon dbname > R&D > 3. Other Displays > 4. Checkpoints
Checkpoint information can be also be accessed through the
_Checkpoint and
_ActSummary VST tables.
Example: The following example ABL code uses the _Checkpoint and _ActSummary VST tables which can be customised to requirement.
The
_Checkpoint-Duration and
_Checkpoint-SyncTime were added in 10.2B06 Service Pack and need VST's to be updated offline against the database in order to use them:
$ proutil dbname -C updatevst
DEFINE VARIABLE seq# AS INTEGER NO-UNDO.
DEFINE TEMP-TABLE tt_checkpoint NO-UNDO
FIELD ndx AS INT64
FIELD id AS INT64
FIELD beg AS CHARACTER
FIELD fin AS CHARACTER
FIELD drty AS INT64
FIELD cptq AS INT64
FIELD scan AS INT64
FIELD apwq AS INT64
FIELD flush AS INT64
FIELD duration AS DEC
FIELD synctime AS DEC
INDEX ndx-idx IS UNIQUE PRIMARY ndx.
EMPTY TEMP-TABLE tt_checkpoint.
seq# = 0.
FOR EACH _Checkpoint NO-LOCK:
FIND tt_checkpoint EXCLUSIVE-LOCK
WHERE tt_checkpoint.id = _checkpoint._checkpoint-id NO-ERROR.
IF NOT AVAILABLE tt_checkpoint THEN
DO:
CREATE tt_checkpoint.
ASSIGN
seq# = seq# + 1
tt_checkpoint.ndx = seq#.
END.
ASSIGN
tt_checkpoint.id = _Checkpoint._Checkpoint-Id
tt_checkpoint.beg = SUBSTRING ( _Checkpoint._Checkpoint-Time, 12, 8 )
tt_checkpoint.fin = SUBSTRING ( _Checkpoint._Checkpoint-Len, 12, 8 )
tt_checkpoint.drty = _Checkpoint._Checkpoint-dirty
tt_checkpoint.cptq = _Checkpoint._Checkpoint-CptQ
tt_checkpoint.scan = _Checkpoint._Checkpoint-Scan
tt_checkpoint.apwq = _Checkpoint._Checkpoint-ApwQ
tt_checkpoint.flush = _Checkpoint._Checkpoint-Flush
tt_checkpoint.duration = _Checkpoint._Checkpoint-Duration
tt_checkpoint.synctime = _Checkpoint._Checkpoint-SyncTime
.
IF tt_checkpoint.fin = ? THEN tt_checkpoint.fin = "".
END.
FIND dictdb._ActSummary NO-LOCK.
DISP _ActSummary._Summary-Chkpts FORMAT "->,>>>,>>9"
_ActSummary._Summary-Flushed FORMAT "->,>>>,>>9"
DATETIME(TODAY, MTIME) FORMAT "99/99/9999 HH:MM:SS"
WITH FRAME a COLUMN 1 ROW 2.
RELEASE dictdb._ActSummary.
FOR EACH tt_checkpoint WHERE tt_checkpoint.beg NE ? NO-LOCK:
DISP
tt_checkpoint.id FORMAT ">>>9"
tt_checkpoint.beg FORMAT "x(8)"
tt_checkpoint.fin FORMAT "x(8)"
tt_checkpoint.drty FORMAT "->,>>>,>>9"
tt_checkpoint.cptq FORMAT "->,>>>,>>9"
tt_checkpoint.scan FORMAT "->,>>>,>>9"
tt_checkpoint.apwq FORMAT "->,>>>,>>9"
tt_checkpoint.flush FORMAT "->,>>>,>>9"
tt_checkpoint.duration FORMAT "->>,>>9.99"
tt_checkpoint.synctime FORMAT "->>,>>9.99"
SKIP WITH NO-BOX USE-TEXT.
END.