Kbase 21656: 4GL Program to calculate APW, BIW and AIW activity from VST
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/10/2009 |
|
Status: Verified
GOAL:
Sample 4GL code that calculates the writes per APW, BIW, AIW
GOAL:
Sample 4GL that calculates buffer hits
GOAL:
How to get buffer hits using VSTs
GOAL:
4GL program that uses VST's to calculate database activity metrics
FACT(s) (Environment):
All Supported Operating Systems
Progress 8.2x
Progress 8.3x
Progress 9.x
OpenEdge 10.x
FIX:
This 4GL program will search information from the following "virtual system tables" (VST) to perform the calculation:
_ActPWs
_ActBILog
_ActAILog
_ActBuffer
_ActSummary
It will provide the same information as the PROMON utility: Option 5. Activity.
This code is compatible for any Progress database version 8.2x and above. The only restriction is that you need to first enable VST's prior executing this code on a version 8 database (please, refer to Progress Solution P11501 for information on how to enable these).
In Progress 9.x or later VST's are already enabled by default.
/* APW, BIW and AIW calculation */
FIND FIRST _ActPWs NO-LOCK.
DISPLAY 100.0 * _PW-DBWrites / _PW-TotDBWrites LABEL "Writes per APW" WITH SIDE-LABELS.
FIND FIRST _ActBILog NO-LOCK.
DISPLAY 100.0 * _BiLog-BIWWrites / _BiLog-TotalWrts LABEL "Writes per BIW" WITH SIDE-LABELS.
FIND FIRST _ActAILog NO-LOCK.
DISPLAY 100.0 * _AiLog-AIWWrites / _AiLog-TotWrites LABEL "Writes per AIW" WITH SIDE-LABELS.
/* Buffer Hits */
FIND FIRST _ActBuffer NO-LOCK.
DISPLAY ((_Buffer-LogicRds - _Buffer-OSRds) * 100.0) / _Buffer-LogicRds LABEL "Buffer Hits" WITH SIDE-LABELS.
/* Some other information related to database summary */
FIND FIRST _ActSummary NO-LOCK.
DISPLAY _ActSummary WITH SIDE-LABELS.