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.
To run the ^GLOSTAT routine you must be in the %SYS namespace. The name of the routine is case-sensitive.
Enter the following command:
Do ^GLOSTATCopy code to clipboard
Press Enter to show summary block totals (Example A).
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), Timed Stats (# sec > 0), Quit (q)?Copy code to clipboard
You may enter one of the following:
Response Action 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 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 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.|
|WIJ writes||Number of writes to the write image journal file.|
|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.|
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 Caché 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 Caché 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 Caché 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)?