InterSystems FAQ rubric
A tool (^GLOBUFF utility) is available to check the database cache usage for each global variable.
You can run the utility directly or programmatically in the %SYS namespace.
Here's how to run the utility directly:
%SYS>do ^GLOBUFF
Find which globals are using the most buffers.
Display the top <25>: → Press Enter // Default is to display top 25 globals
Total buffers: 102400 Buffers in use: 6926 PPG buffers: 77 (1.112%) // Global name, database name, percentage occupied by the buffer
Item Global Database Percentage (Count)
1 oddDEF IRISLIB 34.551 (2393)
2 rOBJ IRISLIB 15.261 (1057)
3 rOBJ IRISSYS 13.630 (944)
:
The way to run it programmatically is as follows.
set log="C:\temp\g.log"
open log:"WNS"
use log
do display^GLOBUFF(200)
close log
ObjectScriptObjectScript
The execution result will be as follows.
Item Global Database Percentage (Count)
1 oddDEF IRISLIB 34.551 (2393)
2 rOBJ IRISLIB 15.261 (1057)
3 rOBJ IRISSYS 13.630 (944)
:
Great post! This utility is highly underrated!
Thanks for sharing that
Is there any way to get this information programmatically?
%SYS>s return=1
%SYS>do display^GLOBUFF(200,.return)
After the call return() contains the sorted array with same info s displayed.
Enrico
Thanks for sharing that! It would be pretty useful!