Requesting Database and Server Status Reports Using the Services API

From InterBase

Go Up to Invoking Service Tasks with isc_service_start( )


This section describes how to request database statistics and the server error log.

Requesting Database Statistics Using the Services API

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

Requesting the Server Log Using the Services API

You can use the cluster identifier isc_action_svc_get_ib_log to request the Services Manager to return the contents of the interbase.log file from the server. There are no arguments for this cluster.

You can retrieve the text that the server manager returns by using isc_service_query(). See Querying Service Tasks.

Advance To: