Requesting Database Statistics Using the Services API

From InterBase
Jump to: navigation, search

You can use the cluster identifier isc_action_svc_db_stats to request the Service Manager prepare database statistics. This corresponds to the functionality of the gstat command-line utility. You can subsequently receive this information using isc_service_query() (see Querying Service Tasks). The following table lists arguments to isc_action_svc_db_stats:

Services API status report arguments
Argument Purpose Argument length Argument
value

isc_spb_dbname

Path of the primary file of the database, from the server’s point of view

2 bytes + string

String

isc_spb_options

The following value is a bitmask of isc_spb_sts_xxxx options below

4 bytes

Bitmask

isc_spb_sts_data_pages

Request statistics for user data pages; corresponds to gstat -data

Bit

isc_spb_sts_db_log

Request only the information in the database log pages; corresponds to gstat -log

Bit

isc_spb_sts_hdr_pages

Request only the information in the database header page; corresponds to gstat -header

Bit

isc_spb_sts_idx_pages

Request statistics for user index pages; corresponds to gstat -index

Bit

isc_spb_sts_sys_relations

Request statistics for system tables and indexes in addition to user tables and indexes; corresponds to gstat -system

Bit