Workaround 1:If there is a stated requirement to monitor if the LRU2 mechanism has been enabled in production, then the Alternate Buffer Pool assignments will need to be unassigned at the Database Object level (through Database Administration) and re-assigned at the Storage Area through the command line:
$ proutil dbname -C enableB2 <storage_area_name>.
This may also involve moving the required Alternate Buffer Pool objects to Storage Areas that only contain -B2 assignment objects. By having Objects assigned at the Storage Area level, the LRU2 mechanism will be correctly reported when enabled and the LRU2 mechanism will be properly initialized when -B2 is exceeded
Workaround 2:Rely on the correct initial Alternate Buffer Pool sizing exercise. Monitoring with _tablestat/_indexstat is only reliable where object READS are concerned. Object writes for example in the Alternate Buffer Pool will reserve -B2 space and may result in the LRU2 being enabled.
Initial sizing of the LRU2 size needs to be undertaken in a controlled fashion.
For Tables, either by loading each "Alternate Buffer Pool" table to a variable length database extent, then dividing the file extent size on disk by the database blocksize, or relying on _tablestat-OSread values after a full table scan.
For Indexes, while _indexstat-OSread could similarly be used, it is easier to simply find the number of index blocks occupied through an IDXANALYS report.
The number of blocks for a given index are reported in the "INDEX BLOCK SUMMARY FOR AREA" section under the BLOCKS header
Example:$ PROUTIL dbname -C idxanalysThere are 7 index blocks for the Customer.Name index.
INDEX BLOCK SUMMARY FOR AREA "Cust_Index" : 10
-------------------------------------------------------
Table Index Fields Levels Blocks Size % Util Factor
PUB.Customer
Name 15 1 2 7 22.5K 80.8 1.4
The same information (in more detail) can be obtained through the IDXBLOCK report: Example:
$ PROUTIL -C idxblock Customer.NameThere are 7 index blocks for the Customer.Name index.
BlockSize = 4096 Block Capacity = 4004
Number Length On Length Delete
of of Delete of Chain Percent
DBKEY Level Entries Entries Chain Size Type Utilized
44 1 6 68 0 0 root 1
46 2 196 3970 0 0 leaf 99
45 2 183 3982 0 0 leaf 99
112 2 189 4001 0 0 leaf 99
113 2 185 3993 0 0 leaf 99
120 2 232 3998 0 0 leaf 99
121 2 132 2966 0 0 leaf 74