Using the ^%GSIZE Routine
The ^%GSIZE routine enables you to determine the size of one or more globals.
Basics
To use this routine:
-
Start an ObjectScript shell.
-
Start the routine:
do ^%GSIZE -
The first prompt lets you specify the database to look at. The prompt refers to the directory that contains the database file:
Directory name: c:\intersystems\iris211\mgr\enslib\ =>The default is the globals database used by the namespace that you are currently in. You can either press Enter to accept this default, or type a full directory name and then press Enter.
-
The next prompt is as follows:
All Globals? No =>If you want information on all globals, enter Y (case-insensitive). Otherwise press Enter.
Note:If you request information on all globals, that includes all the internal, undocumented globals as well as your own globals. Some of these are quite large.
-
If you did not enter Y in the previous step, the next prompt looks like the following, which is asking for a global name:
Global ^Type the global name, without the leading caret and press Enter.
Repeat as necessary. When you are done entering global names, press Enter again. Then the routine displays a message indicating how many globals you have selected:
All Globals? No => No Global ^IRIS.Msg Global ^Ens.Config Global ^ 2 globals selected from 64 available globals. -
The next prompt asks whether to provide a full report on the globals:
Show details?? No =>If you want full information, enter Y (case-insensitive). Otherwise press Enter
-
Press Enter for the next two prompts, which let you specify where to write the output:
Device:and
Right margin: 80 => -
The routine then displays output like the following (using N for the Show details prompt):
Global Size Display of c:\intersystems\iris211\mgr\enslib\ 2:44 PM Aug 15 2024 Ens.Config 1 IRIS.Msg 906 TOTAL: 907When using Y for the Show details prompt, the report looks like this instead:
Global Size Display of c:\intersystems\iris211\mgr\enslib\ 2:44 PM Aug 15 2024 Ens.Config 1 IRIS.Msg 906 TOTAL: 907 directory: c:\intersystems\iris211\mgr\enslib\ Page: 1 GLOBAL SIZE 15 Aug xxxx 2:42 PM Global Blocks Bytes Used Packing Contig. -------- -------- --------------- ------- ------- Ens.Config 1 36 0 % 0 IRIS.Msg 906 5,550,960 75 % 746 TOTAL Blocks Bytes Used Packing Contig. -------- -------- --------------- ------- ------- 907 5,550,996 75 % 746 <RETURN> to continue or '^' to STOP:
See Also
-
Globals (APIs) (which lists APIs that get the sizes of globals)