Skip to main content

This version of the product is no longer supported, and this documentation is no longer updated regularly. See the latest version of this content.Opens in a new tab

Gathering Global Activity Statistics Using ^GLOSTAT

Caché provides the ^GLOSTAT utility, which gathers global activity statistics and displays a variety of information about disk I/O operations. This chapter describes how to use the routine; it covers the following topics:

You can also use the InterSystems Management Portal to view the statistics reported by ^GLOSTAT. Logon to the portal application for the system you are monitoring and navigate to the System, System Usage page.

Running ^GLOSTAT

To run the ^GLOSTAT routine you must be in the %SYS namespace. The name of the routine is case-sensitive.

  1. Enter the following command:

     Do ^GLOSTAT
    
  2. The following prompt appears:

    Should detailed statistics be displayed for each block type? No =>
    

    As shown, the default is No. Press Enter to show summary block totals (Example A), or type Yes and press Enter to display detailed statistics by block type (Example B).

  3. The ^GLOSTAT routine displays statistics according to your request. Each time Caché starts, it initializes the ^GLOSTAT statistical counters; therefore, the output of the first run reflects operations since Caché has started.

    After the first and subsequent displays of the ^GLOSTAT report, the following prompt appears:

    Continue (c), zero statistics (z), timed stats (# sec > 0), quit?
    

    You may enter one of the following:

    Response Action
    c Displays the report again with updated cumulative statistics since the last initialization.
    z Initializes the ^GLOSTAT statistical counters to zero.
    q Quits the ^GLOSTAT routine.
    # (a positive integer indicating number of seconds) Initializes statistics, counts statistics for the indicated number of seconds, and reports statistics as an average per second (Example C and Example G).
  4. To report statistics for a determinate interval (Example D):

    1. Enter z to initialize the statistics to zeroes.

    2. Either enter q to exit the utility, or remain at the prompt without entering anything.

    3. Wait for desired period of time.

    4. If you quit ^GLOSTAT, run it again. Otherwise, enter c to continue.

    5. The ^GLOSTAT report displays statistics that reflect operations since you initialized the counters.

Note:

The ^GLOSTAT utility uses 32-bit counters for most statistics; extremely large time intervals may cause some counters to overflow.

Overview of ^GLOSTAT Statistics

Each ^GLOSTAT statistic represents the number of times a type of event has occurred since Caché has started since the counters have been initialized, or per second during a defined interval. You may run ^GLOSTAT at any time from the system manager’s namespace. In most cases, it is significant to run the utility on an active system, not an idle one.

If the Caché instance is a stand-alone configuration or an ECP data server, then the report displays only the “Total” column. If it is an ECP application server (that is, it connects to a remote database) then three columns are shown: “Local,” “Remote,” and “Total” (Example E).

The following table defines the ^GLOSTAT statistics.

Statistics Produced by ^GLOSTAT
Statistic Definition
Global references (all) Logical count of accesses to globals, including Sets, Kills, $Data, $Order, $Increment, $Query, and global references in expressions.
Global update references Logical count of global references that are Sets, Kills, or $Increments.
Routine calls Number of calls to a routine.
Routine buffer loads and saves Total number of routine loads and saves as a result of ZLoad, ZSave, and running routines. (In a well-tuned environment, this number increases slowly, since most routine loads are satisfied by the routine cache memory without accessing the disk. Each routine load or save transfers up to 32 KB of data (64 KB for Unicode).)
Routine commands Number of routine commands executed since system startup.
Routine not cached Number of routines not cached in memory. This information help you determine whether or not the routine buffer cache is adequately sized.
Cache Efficiency Number of all global references divided by the number of physical block reads and writes. Not a percentage.
Journal Entries Number of journal records created—one for each database modification (Set , Kill, etc.) or transaction event (TStart, TCommit) or other event that is saved to the journal.
Journal Block Writes Number of 64-KB journal blocks written to the journal file.
Logical Block Requests Number of database blocks read by the global database code. (In a well-tuned environment, many of these reads are satisfied without disk access.)
Physical Block Reads Number of physical database blocks read from disk for both global and routine references.
Database Physical Block Writes Number of physical database blocks written to disk for both global and routine references.
WIJ Physical Block Writes Number of physical Write Image Journaling (WIJ) blocks written to disk for both global and routine references.
Blocks Queued to be Written Number of database blocks that have been queued to be written to disk.

If the option is selected, ^GLOSTAT also reports the following detailed block statistics for the “Logical Block Requests,” “Physical Block Reads,” and “Blocks Queued to be Written” statistics. A total for all block types within each category appears in the right-most column (Example F).

Block types include:

Label Description
Data Data blocks.
Dir Directory blocks.
Bdata Big data blocks—blocks that contain big strings.
Map Map blocks.
Upper ptr Upper pointer blocks.
Bottom ptr Bottom pointer blocks.
Other Other blocks that are not any of the above. (For example, incremental backup or storage allocation information.)

Examples of ^GLOSTAT Output

The following output samples show the various options when running the ^GLOSTAT utility routine:

  • Example A — Initial running with no detailed statistics on a stand-alone or server configuration.

  • Example B — Initial running with detailed block statistics on a stand-alone or server configuration.

  • Example C — Subsequent running with no detailed statistics at a timed interval.

  • Example D — Subsequent runnings with no detailed statistics showing the use of the c, z, and q responses.

  • Example E — Initial running with no detailed statistics on a client configuration.

  • Example F — Initial running with detailed block statistics on a client configuration.

  • Example G — Initial and subsequent runnings with detailed block statistics at a timed interval.

Example A

The following is sample output of the initial running of the ^GLOSTAT routine. No detailed statistics are chosen and the Caché instance is either a stand-alone configuration or a server:

%SYS>Do ^GLOSTAT
 
Should detailed statistics be displayed for each block type? No =>n
 
Statistics                                Total
-------------------------------   -------------
Global references (all):                538,784
Global update references:                26,327
Routine calls:                           65,643
Routine buffer loads and saves:             420
Routine commands:                     2,919,070
Routine not cached:                         671
Logical block requests:                 109,140
Block reads:                              6,836
Block writes:                               236
WIJ writes:                                  75
Cache Efficiency:                            76
Journal Entries:                         14,173
Journal Block Writes:                        27
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?

Example B

The following is sample output of the initial running of the ^GLOSTAT routine. Detailed block statistics have been chosen and the Caché instance is either a stand-alone configuration or a server:

%SYS>do ^GLOSTAT
 
Should detailed statistics be displayed for each block type? No =>y
 
Statistics                                                              Total
-------------------------------                                 -------------
Global references (all):                                            6,444,341
Global update references:                                           1,322,017
Routine calls:                                                        896,130
Routine buffer loads and saves:                                         9,008
Routine commands:                                                   2,945,059
Routine not cached:                                                       671
Cache Efficiency:                                                         176
Journal Entries:                                                      211,164
Journal Block Writes:                                                     363
Logical Block Requests        Data:            1,643,739
      Dir:           13,147   Upper ptr:         138,837
      BData:        164,102   Bottom ptr:      1,034,472
      Map:            3,043   Other:                   1            2,997,341
Physical Block Reads          Data:               33,846
      Dir:               42   Upper ptr:              31
      BData:            452   Bottom ptr:            290
      Map:               12   Other:                   1               34,674
Database Physical Block Writes                                          1,918
WIJ Physical Block Writes                                                  75
Blocks Queued to be Written   Data:                1,952
      Dir:               11   Upper ptr:               0
      BData:            317   Bottom ptr:             65
      Map:               22   Other:                   6                2,373
Obj cache Hit/Miss/Load:                                               29,623/405/1,331
Obj OREFs newed/del:                                                    8,617/8,604

Continue (c), zero statistics (z), timed stats (# sec > 0), quit?

Example C

The following example shows ^GLOSTAT statistics per second for a 30-second timed interval. The user has not requested detailed statistics for each block type. The Caché instance is either a stand-alone configuration or a server:

 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  30
 
Counts per Second for 30 Seconds...
 
Statistics (per second)                   Total
-------------------------------   -------------
Global references (all):                1,369.8
Global update references:                 299.6
Routine calls:                          1,057.6
Routine buffer loads and saves:            12.0
Routine commands:                          26.0
Routine not cached:                           0
Logical block requests:                   696.9
Block reads:                                0.7
Block writes:                               3.2
WIJ writes:                                   0
Cache Efficiency:                         354.3
Journal Entries:                          277.5
Journal Block Writes:                       0.5
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?

Example D

The following example shows ^GLOSTAT results from running the routine multiple times.

After the initial output, entering z initializes the counters and then q quits the routine. After waiting the desired amount of time, the routine is run again and displays statistics reflecting operations since z was entered.

Entering z again initializes the statistics a second time, and entering c to continue immediately displays the initialized statistics. Entering c once more shows the statistics once again accumulating.

%SYS>Do ^GLOSTAT
 
Should detailed statistics be displayed for each block type? No =>
 
Statistics                                Total
-------------------------------   -------------
Global references (all):                 85,414
Global update references:                23,073
Routine calls:                           67,092
Routine buffer loads and saves:             477
Routine commands:                          29.0
Routine not cached:                           0
Logical block requests:                  64,587
Block reads:                                140
Block writes:                                49
WIJ writes:                                   0
Cache Efficiency:                           452
Journal Entries:                         25,341
Journal Block Writes:                        44
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  z
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  q
 
%SYS>Do ^GLOSTAT
 
Should detailed statistics be displayed for each block type? No =>
 
Statistics                                Total
-------------------------------   -------------
Global references (all):                  4,332
Global update references:                   568
Routine calls:                            3,487
Routine buffer loads and saves:              95
Routine commands:                          45.0
Routine not cached:                           0
Logical block requests:                   1,423
Block reads:                                  0
Block writes:                               130
WIJ writes:                                   4
Cache Efficiency:                            33
Journal Entries:                            218
Journal Block Writes:                         1
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  z
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  c
Statistics                                Total
-------------------------------   -------------
Global references (all):                      0
Global update references:                     0
Routine calls:                                0
Routine buffer loads and saves:               0
Routine commands:                             1
Routine not cached:                           0
Logical block requests:                       0
Block reads:                                  0
Block writes:                                 0
WIJ writes:                                   0
Cache Efficiency:                        no i/o
Journal Entries:                              0
Journal Block Writes:                         0
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  c
Statistics                                Total
-------------------------------   -------------
Global references (all):                  9,362
Global update references:                 1,742
Routine calls:                            7,382
Routine buffer loads and saves:              96
Routine commands:                          45.0
Routine not cached:                           0
Logical block requests:                   4,404
Block reads:                                  4
Block writes:                                 0
WIJ writes:                                  14
Cache Efficiency:                         2,341
Journal Entries:                          1,548
Journal Block Writes:                         3
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?

Example E

The following is sample output of the initial running of the ^GLOSTAT routine. No detailed statistics are chosen and the Caché instance is a client:

%SYS>DO ^GLOSTAT
 
Should detailed statistics be displayed for each block type? No =>n
 
Statistics                                Local         Remote          Total
-------------------------------   -------------  -------------  -------------
Global references (all):              1,558,696              0      1,558,696
Global update references:               531,676              0        531,676
Routine calls:                           95,987              0         95,987
Routine buffer loads and saves:             747              0            747
Routine commands:                          26.0              0           26.0
Routine not cached:                           0              0              0
Logical block requests:               1,121,187            n/a      1,121,187
Block reads:                              3,155              0          3,155
Block writes:                             1,450            n/a          1,450
WIJ writes:                                  14              0             14
Cache Efficiency:                           338        no gets
Journal Entries:                        525,177            n/a        525,177
Journal Block Writes:                    12,546            n/a         12,546
 
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?

Example F

The following is sample output of the initial running of the ^GLOSTAT routine. Detailed block statistics are chosen and the Caché instance is a client:

%SYS>DO ^GLOSTAT
 
Should detailed statistics be displayed for each block type? No =>y
 
Statistics                                Local         Remote          Total
-------------------------------   -------------  -------------  -------------
Global references (all):              1,558,611              0      1,558,611
Global update references:               531,676              0        531,676
Routine calls:                           95,979              0         95,979
Routine buffer loads and saves:             747              0            747
Routine commands:                        45,059              0          45059
Routine not cached:                          133             0            133
Cache Efficiency:                           338        no gets
Journal Entries:                        525,177            n/a        525,177
Journal Block Writes:                    12,546            n/a         12,546
Logical Block Requests        Data:              608,909
      Dir:              792   Upper ptr:           2,475
      BData:         81,750   Bottom ptr:        426,330
      Map:              879   Other:                   1            1,121,136
Physical Block Reads          Data:                2,823
      Dir:               11   Upper ptr:               9
      BData:            240   Bottom ptr:             66
      Map:                5   Other:                   1                3,155
Database Physical Block Writes                                          1,450
WIJ Physical Block Writes                                                  64
Blocks Queued to be Written   Data:                  959
      Dir:               10   Upper ptr:               0
      BData:            430   Bottom ptr:             38
      Map:               17   Other:                   7                1,461
Obj cache Hit/Miss/Load:                                               29,623/405/1,331
Obj OREFs newed/del:                                                    8,617/8,604

Continue (c), zero statistics (z), timed stats (# sec > 0), quit?

Example G

The following example shows ^GLOSTAT statistics per second for a 30-second timed interval after the initial running when the user requests detailed statistics for each block type. The Caché instance is either a stand-alone configuration or a server:

%SYS>Do ^GLOSTAT
 
Should detailed statistics be displayed for each block type? No =>y
 
Statistics                                                              Total
-------------------------------                                 -------------
Global references (all):                                               50,818
Global update references:                                               8,920
Routine calls:                                                         25,279
Routine buffer loads and saves:                                         1,027
Routine commands:                                                       4,059
Routine not cached:                                                        13
Cache Efficiency:                                                         100
Journal Entries:                                                          236
Journal Block Writes:                                                       4
Logical Block Requests        Data:               16,375
      Dir:            1,760   Upper ptr:             263
      BData:            165   Bottom ptr:          2,538
      Map:               83   Other:                   1               21,185
Physical Block Reads          Data:                  153
      Dir:                6   Upper ptr:               5
      BData:            165   Bottom ptr:             38
      Map:                4   Other:                   1                  372
Database Physical Block Writes                                            134
WIJ Physical Block Writes                                                  64
Blocks Queued to be Written   Data:                  104
      Dir:                6   Upper ptr:               0
      BData:              0   Bottom ptr:             29
      Map:                9   Other:                   5                  153
Obj cache Hit/Miss/Load:                                               29,623/405/1,331
Obj OREFs newed/del:                                                    8,617/8,604

Continue (c), zero statistics (z), timed stats (# sec > 0), quit?  30
 
Counts per Second for 30 Seconds...
 
Statistics (per second)                                                 Total
-------------------------------                                 -------------
Global references (all):                                              4,232.7
Global update references:                                             1,453.4
Routine commands:                                                       446.8
Routine buffer loads and saves:                                          14.1
Cache Efficiency:                                                       507.9
Journal Entries:                                                         33.3
Journal Block Writes:                                                     0.1
Logical Block Requests        Data:                909.8
      Dir:             15.6   Upper ptr:            21.3
      BData:            0.2   Bottom ptr:          589.3
      Map:              1.3   Other:                   0              1,537.5
Physical Block Reads          Data:                  6.8
      Dir:                0   Upper ptr:               0
      BData:            0.2   Bottom ptr:            0.1
      Map:                0   Other:                   0                  7.1
Database Physical Block Writes                                            1.2
WIJ Physical Block Writes                                                 134
Blocks Queued to be Written   Data:                  2.6
      Dir:              0.0   Upper ptr:               0
      BData:              0   Bottom ptr:            0.2
      Map:              0.1   Other:                   0                  2.9
Obj cache Hit/Miss/Load:                                                3,963/36/1,37
Obj OREFs newed/del:                                                    792/2,59

Continue (c), zero statistics (z), timed stats (# sec > 0), quit?
FeedbackOpens in a new tab