Gathering Global Activity Statistics Using ^GLOSTAT
InterSystems IRIS® data platform provides the ^GLOSTAT utility, which gathers global activity statistics and displays a variety of information about disk I/O operations.
You can also view the statistics reported by ^GLOSTAT from the Management Portal to . Log in to the Portal for the system you are monitoring and navigate to the System Usage page (System Operation > System Usage).
To run the ^GLOSTAT routine you must be in the %SYS namespace. The name of the routine is case-sensitive. Type the following command and press Enter:
The ^GLOSTAT routine displays statistics, as seen in Example A. Each time InterSystems IRIS starts, it initializes the ^GLOSTAT statistical counters; the initial output of ^GLOSTAT reflects operations since InterSystems IRIS has started.
The following prompt appears beneath the report:
Continue (c), Timed Stats (# sec > 0), Quit (q)?
You may enter one of the following:
|c||Displays the report again with updated cumulative statistics since the last initialization.|
|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 B).|
Overview of ^GLOSTAT Statistics
Each ^GLOSTAT statistic represents the number of times a type of event has occurred since InterSystems IRIS has started, or per second during a defined interval. You may run ^GLOSTAT at any time from the system manager’s namespace. In most cases, you should run the utility on an active system, not an idle one.
If the InterSystems IRIS 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 C).
The following table defines the ^GLOSTAT statistics.
|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.|
|Private global references||The count of all process private global accesses.|
|Private update references||The count of process private global references that are SETs or KILLs, etc.|
|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.|
|Logical block requests||Number of database blocks read by the globals database code. (In a well-tuned environment, many of these reads are satisfied without disk access.)|
|Block reads||Number of physical database blocks read from disk for both global and routine references.|
|Block writes||Number of physical database blocks written to disk for both global and routine references.|
|WIJ writes||Number of writes to the write image journal file.|
|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.|
Examples of ^GLOSTAT Output
The following output samples show the various options when running the ^GLOSTAT utility routine:
Example A — Initial running on a stand-alone or server configuration.
Example B — Subsequent running at a timed interval.
Example C — Initial running on a client configuration.
The following is sample output of the initial running of the ^GLOSTAT routine. The InterSystems IRIS instance is either a stand-alone configuration or a server.
%SYS>do ^GLOSTAT Statistics Total -------------- --------- Global references (all): 530,801 Global update references: 175,073 Private global references: 160,267 Private update references: 76,739 Routine calls: 650,085 Routine buffer loads & saves: 570 Routine commands: 17,747,411 Routine not cached: 710 Logical block requests: 289,166 Block reads: 2,179 Block writes: 680 WIJ writes: 903 Cache Efficiency: 186 Journal Entries: 1,356 Journal Block Writes: 6 Continue (c), Timed Stats (# sec > 0), Quit (q)?
The following example shows ^GLOSTAT statistics per second for a 30-second timed interval. The InterSystems IRIS instance is either a stand-alone configuration or a server.
Continue (c), Timed Stats (# sec > 0), Quit (q)? 30 Counts per Second for 30 Seconds... Statistics (per second) Total -------------- --------- Global references (all): 4.0 Global update references: 2.0 Private global references: 2.0 Private update references: 0.9 Routine calls: 8.8 Routine buffer loads & saves: 0 Routine commands: 222.2 Routine not cached: 0 Logical block requests: 2.3 Block reads: 0 Block writes: 0 WIJ writes: 0 Cache Efficiency: no i/o Journal Entries: 0 Journal Block Writes: 0 Continue (c), Timed Stats (# sec > 0), Quit (q)?
The following is sample output of the initial running of the ^GLOSTAT routine. The InterSystems IRIS instance is a client.
%SYS>do ^GLOSTAT Statistics Local Remote Total -------------- --------- --------- --------- Global references (all): 123,783 3 123,786 Global update references: 6,628 0 6,628 Private global references: 3,558 n/a 3,558 Private update references: 1,644 n/a 1,644 Routine calls: 55,275 0 55,275 Routine buffer loads & saves: 759 0 759 Routine commands: 1,304,213 Routine not cached: 167 Logical block requests: 83,959 n/a 83,959 Block reads: 2,125 0 2,125 Block writes: 217 n/a 217 WIJ writes: 126 n/a 126 Cache Efficiency: 53 no gets Journal Entries: 511 n/a 511 Journal Block Writes: 3 n/a 3 Continue (c), Timed Stats (# sec > 0), Quit (q)?