2.90 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

pdstbegin [-k statistical-information-type[,statistical-information-type]...]
          [-m interval] [-a|-s server-name[,server-name]...}]
          [-w]

(b) HiRDB/Parallel Server

pdstbegin [-k statistical-information-type[,statistical-information-type]...]
          [-m interval] [{-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 HiRDB/Parallel Server only)
all
All statistical information except sqh, pcd, andobj
(b) -m interval ~<unsigned integer> ((1-1440)) <<10>>

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) {-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.
(d) {-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-16 Relationship between statistical information output and the -s option specification: HiRDB/Single Server or Table 2-17 Relationship between statistical information output and the -s option specification: HiRDB/Parallel Server.

-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.
(e) -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-93 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-66 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-6 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-7 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-8 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-16 Relationship between statistical information output and s option specification: HiRDB/Single Server (for a HiRDB/Single Server) and Table 2-17 Relationship between statistical information output and -s option specification: HiRDB/Parallel Server (for a HiRDB/Parallel Server) show the relationship between the statistical information to be output and the specification of the -s option.

    Table 2-16 Relationship between statistical information output and the -s option specification: HiRDB/Single Server

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

    Table 2-17 Relationship between statistical information output and the -s option specification: HiRDB/Parallel Server

    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
    fsv----Y
    hba----Y
    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
    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. For a HiRDB/Parallel Server, 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-9 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.
  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
  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.
  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.