Caché provides the
^GLOSTAT utility, which gathers
global activity statistics and displays a variety of information about disk I/O operations.
This article describes how to use the routine; it covers the following topics:
The
Caché Control Panel provides statistical
information similar to that of the
^GLOSTAT routine. In the Control
Panel, right-click the configuration name and click
.
View the usage statistics on the
Overview tab.
To run the
^GLOSTAT routine you must be in the
%SYS namespace.
The name of the routine is case-sensitive.
-
Enter the following command:
-
The following prompt appears:
Should detailed statistics be displayed for each block type? No =>
-
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:
-
To report statistics for a determinate interval (
Example
D):
-
Enter
z to initialize the statistics to zeroes.
-
Either enter
q to exit the utility, or remain at the
prompt without entering anything.
-
Wait for desired period of time.
-
If you quit
^GLOSTAT, run it again. Otherwise,
enter
c to continue.
-
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 server,
then the report displays only the
Total column. If it is an ECP client
(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).) |
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 createdone
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 (2-KB or 8-KB) read from disk for both global and routine references. |
Physical Block Writes |
Number of
physical database blocks (2-KB or 8-KB) written to disk for both global and routine
references. |
Blocks Queued to be Written |
Number
of 2-KB or 8-KB 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
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.
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): 6,445,330
Global update references: 1,322,207
Routine calls: 896,625
Routine buffer loads and saves: 9,008
Logical block requests: 2,997,805
Block reads: 34,674
Block writes: 1,918
Cache Efficiency: 176
Journal Entries: 211,164
Journal Block Writes: 363
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?
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
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
Physical Block Writes 1,918
Blocks Queued to be Written Data: 1,952
Dir: 11 Upper ptr: 0
BData: 317 Bottom ptr: 65
Map: 22 Other: 6 2,373
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?
The following example shows
^GLOSTAT statistics per second
for a 30second 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
Logical block requests: 696.9
Block reads: 0.7
Block writes: 3.2
Cache Efficiency: 354.3
Journal Entries: 277.5
Journal Block Writes: 0.5
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?
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
Logical block requests: 64,587
Block reads: 140
Block writes: 49
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
Logical block requests: 1,423
Block reads: 0
Block writes: 130
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
Logical block requests: 0
Block reads: 0
Block 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
Logical block requests: 4,404
Block reads: 4
Block writes: 0
Cache Efficiency: 2,341
Journal Entries: 1,548
Journal Block Writes: 3
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?
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
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
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?
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
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
Physical Block Writes 1,450
Blocks Queued to be Written Data: 959
Dir: 10 Upper ptr: 0
BData: 430 Bottom ptr: 38
Map: 17 Other: 7 1,461
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?
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
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
Physical Block Writes 134
Blocks Queued to be Written Data: 104
Dir: 6 Upper ptr: 0
BData: 0 Bottom ptr: 29
Map: 9 Other: 5 153
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 calls: 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
Physical Block Writes 1.2
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
Continue (c), zero statistics (z), timed stats (# sec > 0), quit?