DB2 10.5 for Linux, UNIX, and Windows

GET MONITOR SWITCHES command

Displays the status of the database system monitor switches for the current session. Monitor switches instruct the database manager to collect database activity information.

Each application using the database system monitor interface has its own set of monitor switches. This command displays them. To display the database manager-level switches, use the GET DBM MONITOR SWITCHES command.

Scope

This command is issued on the currently attached member and, by default, returns information only for that member. In the case of multiple members per host, the currently attached member is the first member that is listed in the db2nodes.cfg file on that host.

To issue the command for a specific member that is not the currently attached member, specify the ATTACH_MEMBER parameter. To issue the command for all members and receive an aggregated result, specify the GLOBAL parameter.

To change the currently attached member, issue the SET CLIENT command with the ATTACH_MEMBER parameter . You must issue the DETACH command followed by the ATTACH command from your application for this change to take effect.

Authorization

One of the following authorities:
  • SYSADM
  • SYSCTRL
  • SYSMAINT
  • SYSMON

Required connection

Instance. If there is no instance attachment, a default instance attachment is created.

To display the settings for a remote instance, or for a different local instance, it is necessary to first attach to that instance.

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-GET MONITOR SWITCHES--+--------------------------+----------><
                         +-AT MEMBER--member-number-+   
                         '-GLOBAL-------------------'   

Command parameters

AT MEMBER member-number
Specifies the member for which the status of the monitor switches is to be displayed.
GLOBAL
Returns the status of the monitor switches from all members.

Examples

The following is sample output from GET MONITOR SWITCHES:

            Monitor Recording Switches

Switch list for member number 1
Buffer Pool Activity Information  (BUFFERPOOL) = ON  02-20-2003 16:04:30.070073
Lock Information                        (LOCK) = OFF
Sorting Information                     (SORT) = OFF
SQL Statement Information          (STATEMENT) = ON  02-20-2003 16:04:30.070073
Table Activity Information             (TABLE) = OFF
Take Timestamp Information         (TIMESTAMP) = ON  02-20-2003 16:04:30.070073
Unit of Work Information                 (UOW) = ON  02-20-2003 16:04:30.070073

Usage notes

The recording switch TIMESTAMP is on by default, but can be switched off using UPDATE MONITOR SWITCHES. When this switch is on the system issues timestamp calls when collecting information for timestamp monitor elements.

The recording switch TIMESTAMP is on by default, but can be switched off using UPDATE MONITOR SWITCHES. If this switch is off, this command also displays the time stamp for when the switch was turned off. When this switch is on the system issues timestamp calls when collecting information for timestamp monitor elements. Examples of these elements are:
  • agent_sys_cpu_time
  • agent_usr_cpu_time
  • appl_con_time
  • con_elapsed_time
  • con_response_time
  • conn_complete_time
  • db_conn_time
  • elapsed_exec_time
  • gw_comm_error_time
  • gw_con_time
  • gw_exec_time
  • host_response_time
  • last_backup
  • last_reset
  • lock_wait_start_time
  • network_time_bottom
  • network_time_top
  • prev_uow_stop_time
  • rf_timestamp
  • ss_sys_cpu_time
  • ss_usr_cpu_time
  • status_change_time
  • stmt_elapsed_time
  • stmt_start
  • stmt_stop
  • stmt_sys_cpu_time
  • stmt_usr_cpu_time
  • uow_elapsed_time
  • uow_start_time
  • uow_stop_time

If the TIMESTAMP switch is off, timestamp operating system calls are not issued to determine these elements and these elements will contain zero. Turning this switch off becomes important as CPU utilization approaches 100%; when this occurs, the CPU time required for issuing timestamps increases dramatically.

Compatibilities

For compatibility with previous versions:
  • DBPARTITIONNUM or NODE can be substituted for MEMBER, except when the DB2_ENFORCE_MEMBER_SYNTAX registry variable is set to ON.