Top  Previous  Next


The FSTAT command collects and report file access statistics.





FSTAT ON file.name...Enable statistic collection
FSTAT file.name... {LPTR}Report statistics
FSTAT OFF file.name...Disable statistics collection


FSTAT GLOBAL {LPTR}Report global system statistics
FSTAT RESETClear global statistics counters
FSTATPeriodic global statistics display




file.nameis the name of the file to be processed. Multiple file names may be included in a single command. Alternatively, if no file.name is specified and the default select list is active, this list will be used to determine the files to be processed.


LPTRdirects the report to the default printer. When reporting for multiple files, each file's data appears on a separate page.



The FSTAT command controls collection and reporting of file access statistics for dynamic files and any associated alternate key indices. Directory files cannot be used with this command but are included in the global statistics.


Use of FSTAT with the ON keyword clears the statistics counters associated with the file and enables collection of statistics. The overhead for data collection is extremely low except that a file that is opened to read only a few records will require a write to update the counters on disk when the file is closed. The LISTF, LISTFL and LISTFR commands can be used to determine which files have file statistics enabled.


The second form of FSTAT displays or prints a report of the file access statistics. Data collection must be enabled when this mode is used. When using a select list, entries that do not correspond to dynamic files for which statistics are enabled will be ignored.


Use of FSTAT with the OFF keyword disables collection of statistics.


The GLOBAL keyword displays a report of statistics accumulated across all files regardless of whether statistics collection is enabled for the individual files. The global counters are reset when QM is started. On Windows NT and later, this occurs automatically when the last user leaves QM unless QMSvc has been configured to maintain a persistent shared memory image. The counters can be reset manually by use of the RESET keyword.


Use of the FSTAT command with no arguments displays a periodic display of the global statistics, updated once per second. This shows four columns; the overall data since the counts were last reset, the data since FSTAT was entered, the data for the last second and average per-second values since FSTAT was entered.


The figures displayed by FSTAT are:

OpensThe number of times the file has been opened.
ReadsThe number of read operations performed. This covers all types of read action (e.g. READ, READU, READL, MATREAD, MATREADU, MATREADL, etc). Reads that fail because a lock is held by another user are not counted.
WritesThe number of write operations performed.
DeletesThe number of delete operations performed. This includes deletes attempted for records that did not exist.
ClearsThe number of times the file was cleared.
SelectsThe number of QMBasic style SELECT operations performed.
SplitsThe number of dynamic file split actions.
MergesThe number of dynamic file merge actions.
AK ReadsThe number of records read from alternate key indices. This includes both application level reads (e.g. SELECTINDEX) and internal reads performed when updating an AK.
AK WritesThe number of records written to alternate key indices.
AK DeletesThe number of records deleted from alternate key indices.
Cache HitsThe number of records found in the record cache. See the RECCACHE configuration parameter.





                            GLOBAL FILE STATISTICS            12:02:33


          ........System  .........Total  ..............  .......Average

          .........Total  ......this run  .......Per sec  .......per sec

Period       00:17:05    00:00:34

Opens             124           0           0         0.0

Reads          273161      143505        4228      4220.7

Writes         258086      134876        3958      3966.9

Deletes         13901        8628         269       253.8

Clears              0           0           0         0.0

Selects             0           0           0         0.0

Splits           4937          10           0         0.3

Merges              0           0           0         0.0

AK Reads       501091      269179        7924      7917.0

AK Writes      344094      178509        5221      5250.3

AK Deletes     156997       90670        2705      2666.8