2.109 pdstbegin (Start output of statistical information)

Organization of this section
(1) Function
(2) Executor
(3) Format
(4) Options
(5) Rules
(6) Notes

(1) Function

The pdstbegin command outputs to the statistics log file statistical information about a unit located at the server machine with a specified host name. When output of statistical information is to be stopped, the pdstend command must be executed.

The statistical information is output to the statistics log file named pdstj1 or pdstj2 at each host.

The obtained statistical information can be read by the statistics analysis utility. For details about the statistics analysis utility, see Chapter 14. Statistics Analysis Utility (pdstedit).

(2) Executor

HiRDB administrator

(3) Format

(a) HiRDB single server configuration

pdstbegin [-k statistical-information-type[,statistical-information-type]...] [-m system-operation-statistical-information-output-interval]

          [-I database-I/O-statistical-information-output-interval]

          [-D [database-I/O-statistical-information-option
              [,database-I/O-statistical-information-option]]]

          [-a|-s server-name[,server-name]...}]

          [-w]

(b) HiRDB parallel server configuration

pdstbegin [-k statistical-information-type[,statistical-information-type]...] [-m system-operation-statistical-information-output-interval]

          [-I database-I/O-statistical-information-output-interval]

          [-D [database-I/O-statistical-information-option
              [,database-I/O-statistical-information-option]]]

          [{-x host-name|-u unit-identifier}]

          [{-a|-s server-name[,server-name]...}]

          [-w]

(4) Options

(a) -k statistical-information-type ~<<sys>>

Specifies the type of statistical information to be output:

sys
System activity statistical information
uap
UAP statistical information
sql
SQL statistical information
sqh
SQL statement statistical information (statistical information about issued data manipulation SQL, definition SQL, and the LOCK statement and SQL)
This statistical information is output when the output of SQL statistical information is specified.
buf
Global buffer pool statistical information
fil
Statistical information on HiRDB files for database manipulation
dfw
Deferred write processing statistical information
idx
Index statistical information
sop
SQL static optimization information
dop
SQL dynamic optimization information
pcd
SQL object execution information
obj
Statistics on SQL object transmission (applicable to a HiRDB parallel server configuration only)
dio
Statistical information about database I/O operations
all
All statistical information except sqh, pcd, andobj
(b) -m system-operation-statistical-information-output-interval ~<unsigned integer> ((1-1440)) <<10>> (minutes)

When system activity statistical information (-k sys specified) is to be output to the statistics log file, specifies in minutes the interval at which the information is to be output.

(c) -I database-I/O-statistical-information-output-interval ~<unsigned integer> ((10 to 3600))<<60>> (seconds)

When statistical information about database I/O operations is to be output to the statistics log file (-k dio is specified), this option specifies, in seconds, the interval at which the information is to be output.

If no database I/O operations occur within the specified interval, there is no output to the statistics log file.

When -k dio is not specified, this option is ignored.

If the pdstbegin -I command is executed while database I/O statistical information is being output, the time at which the command is executed is set as the start point for the interval. The following figure shows the interval at which information is output.

Figure 2-14 Interval specified in the -I option

[Figure]

As the statistical information output interval becomes shorter, the volume of statistics log information that is output increases and the frequency of statistics log buffer swapping increases, resulting in an increase in the system's workload. For this reason, change the default output interval to a smaller value only when detailed investigation is needed. Once the needed information has been acquired, change the setting back to the previous value.

(d) -D [database-I/O-statistical-information-option[,database-I/O-statistical-information-option]]

Specifies management of the measuring operation for statistical information about database I/O operations. This option is ignored when -k dio is not specified.

This option can manage the following items:

The following tables describe the operational differences depending on the values that are specified for these items.

Table 2-33 Frequency of I/O time measurement

ValueActionAdvantageDisadvantage
OmittedMeasures the input/output times for 100 I/O operations per second in the order of the operations that occur on each HiRDB file constituting an RDAREA.Adverse effects on performance can be minimized.The input/output times for I/O operations after the first 100 I/O operations that occur within the measurement second on each HiRDB file constituting an RDAREA are not measured.
everyioMeasures the input/output times of all I/O operations that occur on HiRDB files constituting an RDAREA.All input and output information can be acquired.Transaction performance is affected adversely because of the overhead of measuring input/output times.

When everyio is specified, overhead increases because the input/output time is measured for every I/O operation on an RDAREA that is processed by the transaction. Perform a test in advance in which you specify this option only to determine if it will have adverse effects on performance during actual application processing.

Table 2-34 Amount of statistical information that is output

ValueActionBenefitDisadvantage
Omitted
  • In the input/output information for the HiRDB files constituting an RDAREA that is accessed within the output interval, information about the top 10 files on each unit is output to the statistics log for each of the following items that are acquired as statistical information:
    [Figure]Maximum number of reads
    [Figure]Maximum read time
    [Figure]Total read time
    [Figure]Maximum number of writes
    [Figure]Maximum
    [Figure]Total write time
  • If the same file is subject to output under multiple items, all instances are output without eliminating duplications.
  • If there are more than 10 records with the same rank, the first 10 are selected based on the following order:
    1. RDAREA area definition
    2. HiRDB files specification
Because the size of the statistics log information that is output at one time is fixed, the required disk space is small, thereby minimizing adverse effects that result from frequent statistics log buffer swapping.Because information about only the top 10 files is output for each unit, input/output information for all HiRDB files that constitute an RDAREA might not be obtained.
everyfileInput/output information is output for all HiRDB files that constitute an RDAREA that was accessed within the output interval.Input/output trends for all files constituting an RDAREA can be output.Because the size of the statistics log information that is output at one time is not fixed, a large amount of disk space is used, thereby increasing the adverse effects of frequent buffer swapping.

When everyfile is specified, the amount of statistics log information that is output at one time is not fixed. Specify in the pd_stj_file_size operand in the system common definition the value obtained from Formulas for determining size of statistics log file (pd_stj_file_size) in the manual HiRDB Version 9 System Definition.

Specify in the pd_stj_buff_size operand in the system common definition the value obtained from the estimation formula shown in pd_stj_buff_size in the manual HiRDB Version 9 System Definition.

To change the measuring operation while output of statistical information about database I/O operations is in effect, execute the pdstbegin -k dio command with the -D option specified. When you do this, the default operation is applied to the items that are not specified in the -D option.

If the -D option is omitted, the current operation is inherited.

The example shown in the following figure specifies the -D option to change the measuring operation.

Figure 2-15 I/O statistical information measuring operation specified with the -D option

[Figure]

Explanation:
The following table describes the measuring operation for each interval.

Table 2-35 Measuring operation for each interval

IntervalOperation for each item
Frequency of I/O time measurementAmount of statistical information that is output
ANot specifiedNot specified
BeveryioNot specified
CNot specifiedeveryfile
Deveryioeveryfile
Eeveryioeveryfile
FNot specifiedNot specified
(e) {-x host-name|-u unit-identifier}

Specifies the identifier of the unit or the name of the host for which statistical information is to be output. If this option is omitted, statistical information for the entire HiRDB system is output to the statistics log file.

-x host-name ~<identifier> ((1-32))
Specifies the name of the host for which statistical information is to be output. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command starts output of statistical information about both hosts, whether the specified host name belongs to the normal BES or to the alternate BES.
-u unit-identifier ~<identifier> ((4 characters))
Specifies the identifier of the unit for which statistical information is to be output. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command starts output of statistical information about both units, whether the specified unit identifier belongs to the normal BES or to the alternate BES.
(f) {-a|-s server-name[,server-name]...}<<-a>>

Specifies the servers for which statistical information is to be output. When this option is omitted, the statistical information to be output depends on the server type. For details about the statistical information that is output, see Table 2-36 Relationship between statistical information output and the -s option specification: HiRDB single server configuration or Table 2-37 Relationship between statistical information output and the -s option specification: HiRDB parallel server configuration.

-a
Specifies that statistical information about the entire system and all servers is to be output.
This option and the -s option are mutually exclusive.
-s server-name[, server-name] ~<identifier> ((1-8))
Specifies the name of a server for which statistical information is to be output.
This option and the -a option are mutually exclusive. If the standby-less system switchover (1:1) facility is used and the alternate system is in use, the command starts output of statistical information about both servers, whether the normal BES or the alternate BES is specified.
(g) -w

Specifies that information about thread-to-thread lock-release wait time is to be collected as statistical information. The thread-to-thread lock-release wait time is the time required to acquire a thread-to-thread lock since a thread-to-thread lock request was placed in wait status.

You can collect information about thread-to-thread lock-release wait time as part of the following statistical information:

To collect information about thread-to-thread lock-release wait time, the system activity statistical information must also be collected. Therefore, if you are not collecting the system activity statistical information, collect it.

To collect more accurate information, execute the pdstjsync command immediately before or after you execute this command. For details, see 2.112 pdstjsync (Apply statistics log buffer to statistics log file).

To check the collection status of statistical information on the thread-to-thread lock-release wait time, execute the pdls -d stj command. For details, see 2.73 pdls [-d stj] (Display whether statistical data output type by unit and server is specified).

The following describes the conditions under which the statistical information on the thread-to-thread lock-release wait time can be collected for each statistical information type.

System activity statistical information (sys)

The following figure shows the period for which the system activity statistical information and the statistical information on the thread-to-thread lock-release wait time can be collected.

Figure 2-16 Period for which the statistical information on the thread-to-thread lock-release wait time can be collected (sys)

[Figure]

The period for which statistical information on the thread-to-thread lock-release wait time can be collected is from t3 to t4.

UAP statistical information (uap)

The following figure shows the period for which the UAP statistical information and the statistical information on the thread-to-thread lock-release wait time can be collected.

Figure 2-17 Period for which the statistical information on the thread-to-thread lock-release wait time can be collected (uap)

[Figure]

You can collect statistical information on the thread-to-thread lock-release wait time for UAPs that are started between the time the pdstbegin -w command is executed and the time the pdstend -w command is executed.

Global buffer pool statistical information (buf)

The following figure shows the period for which the global buffer pool statistical information and the statistical information on the thread-to-thread lock-release wait time can be collected.

Figure 2-18 Period for which the statistical information on the thread-to-thread lock-release wait time can be collected (buf)

[Figure]

After the pdstbegin -w command is executed, the period for which accurate statistical information on the thread-to-thread lock-release wait time can be collected is from synchronization point s2 that falls immediately after execution of the pdstbegin -w command to synchronization point s4 that falls immediately after execution of the pdstend -w command. In this example, the pdstend -w command is executed during transaction D, but the statistical information on the thread-to-thread lock-release wait time is collected until the transaction is completed.

If the unit contains a server that is not collecting statistical information on the thread-to-thread lock-release wait time, a value displayed as the result of editing the system activity statistical information for each unit will be smaller than the actual value. Therefore, if you limit the servers that will collect the system activity statistical information, evaluate the statistical information from the editing results for each server.

(5) Rules

  1. The pdstbegin command can be executed only while HiRDB is active.
  2. The pdstbegin command must be executed at the server machine containing the single server or the server machine where the system manager is located.
  3. Once output of statistical information begins, it continues until HiRDB is shut down or the pdstend command is executed.
  4. The type of statistical information to be output depends on the specification of the -s option. Table 2-36 Relationship between statistical information output and the -s option specification: HiRDB single server configuration (for a HiRDB single server configuration) and Table 2-37 Relationship between statistical information output and the -s option specification: HiRDB parallel server configuration (for a HiRDB parallel server configuration) show the relationship between the statistical information to be output and the specification of the -s option.

    Table 2-36 Relationship between statistical information output and the -s option specification: HiRDB single server configuration

    Types of statistical informationServers specified with -s option (single server)
    sysY
    uapY
    sqlY
    sqhY
    bufY
    filY
    dfwY
    idxY
    sopY
    dopY
    pcdY
    obj--
    dioY
    Y:Statistical information is output.
    --: statistical information is not output.

    Table 2-37 Relationship between statistical information output and the -s option specification: HiRDB parallel server configuration

    Types of statistical informationServers specified with -s option
    FESDSBES
    sysYYY
    uapY----
    sqlY----
    sqhY----
    buf--YY
    fil--YY
    dfw--YY
    idx--YY
    sopY----
    dopY----
    pcdYYY
    obj--YY
    dioNYY
    Y: Statistical information is output.
    --: Statistical information is not output.
    FES: Front-end server
    DS: Dictionary server
    BES: Back-end server
  5. Collection of the statistical information on the thread-to-thread lock-release wait time is started for all servers in the following cases:
    • The -a option was specified.
    • The -s and -a options were omitted and the -w option was specified.

(6) Notes

  1. The following are the pdstbegin command's return codes:
    0: Normal termination
    4: At least one unit terminated normally.
    8: Abnormal termination (such as an invalid option or rsh error)
  2. The pdstbegin command can also be executed using pdststart as the command name.
  3. If all servers on the unit are stopped, unit statistical information is not collected.
  4. In a HiRDB parallel server configuration, if a unit contains only the system manager (there is no front-end server, back-end server, or dictionary server on the unit), no statistical information is collected for that unit.
  5. If the standby-less system switchover (effects distributed) facility is used on a unit and the unit does not contain a server that is running as the running system, no statistical information is collected for that unit.
  6. When acquisition of a server's sys (statistical information about system activities) is started, acquisition of the unit's sys also begins.
  7. When HiRDB is terminated and then restarted, the statistical information output operation is not inherited. To output statistical information after HiRDB has started, you must re-execute the pdstbegin command.
  8. Once a server is terminated, the statistical information output operation is not inherited when the server is started normally. To output statistical information for a server that was terminated, the pdstbegin command must be re-executed after the server has been started normally.
  9. Execute the pdls -d stj command to determine whether statistical information is being output.
  10. UAP-related statistical information is output only for those UAPs that are executing between the time the pdstbegin command was entered and the time the pdstend command was entered. For UAPs executing in the OLTP environment or UAPs connected to the primary function-provided server by using an XDS client, UAP-related statistical information is output only for transactions that executed between the time the pdstbegin command was entered and the time the pdstend command was entered.
  11. SQL-related statistical information is output only for SQLs that executed between the time the pdstbegin command was entered and the time the pdstend command was entered.
  12. UAP-related statistical information and SQL-related statistical information may not be in agreement, depending on the timing of the pdstbegin command and pdstend command entry. The figure below shows the relationship between the output of statistical information and entry of the pdstbegin and pdstend commands.

    Figure 2-19 Relationship between output of statistical information and entry of the pdstbegin and pdstend commands

    [Figure]

  13. Following are the times at which the different types of statistical information are output:
    sys
    Output at the time interval specified in the -m option
    uap
    Output when connected to HiRDB and when disconnected from HiRDB
    sql
    Output when SQL execution starts and when SQL execution terminates
    sqh
    Output information during PREPARE and during execution of an embedded data-type SQL statement.
    buf, fil, idx
    Output at synchronization points
    dfw
    Output at synchronization points and deferred write triggers
    sop
    Output when the specified SQL object was not found in the SQL object buffer during dynamic and static SQL preprocessing
    dop
    Output when an SQL statement other than FETCH or CLOSE was executed
    pcd
    Output when an SQL object is executed
    obj
    Output when an SQL object execution request is issued at the dictionary server and back-end server.
    dio
    Output when database I/O operations occur at the interval (in seconds) specified in the -I option.
  14. The statistical information listed below is collected at synchronization points, and the information that exists between synchronization points is edited. Therefore, this statistical information is not collected unless there are at least two synchronization points:
    • Global buffer pool statistical information
    • Statistical information on HiRDB files for database manipulation
    • Index statistical information
      To collect this statistical information, synchronization points must be created by executing the pdlogswap command immediately after the pdstbegin command and immediately before the pdstend command.
  15. SQL statement statistical information is output when the output of SQL statistical information is specified.
  16. When the standby-less system switchover (effects distributed) facility is used, if restart occurs after execution of the pdstbegin command but before execution of the pdstend command, the same statistical information is output after the restart as before the restart. If system switchover occurs after execution of the pdstbegin command but before execution of the pdstend command (as in the case of a server that was being used as the running system on the erroneous unit), the same statistical information is output after the switchover at the target accepting unit as before the switchover. To stop output of statistical information, you must execute the pdstend command.
  17. When the standby-less system switchover (effects distributed) facility is used and the -x or -u option is specified, the target of the pdstbegin command execution is different before and after system switchover, as shown below:
    Server typeServer statusTarget
    Host BESExecutingY
    StandbyN
    Guest BESExecutingY
    Acceptable statusN
    Legend:
    Y: Can be executed
    N: Cannot be executed. The KFPS01882-E message is displayed.
  18. You should note the following when the standby-less system switchover (effects distributed) facility is used and the -x or -u option is specified together with the -s option:
    • Acquisition of statistical information begins if the back-end server specified in the -s option on the unit specified in the -x or -u option is running when the pdstbegin command is executed.
    • If the back-end server specified in the -s option is not running on the unit specified in the -x or -u option, the command displays the KFPS01882-E message and then terminates with an error.
      Use the pdls -d svr command to determine the unit on which the back-end server is running, and then re-execute the pdstbegin command.
  19. Collecting statistical information on the thread-to-thread lock-release wait time with the pdstbegin -w command might affect the performance of the entire system. Therefore, normally do not specify this command.