Question & Answer
Question
Cause
In “<db2agent_install_dir>/config/ud.environment” file,
Modify the KUD_DISABLE_DIAGLOG variable as,
KUD_DISABLE_DIAGLOG =Y
Once customer did this the CPU was not as high.
Answer
The DB2 agent has a predefined situation “UDB_Log_Diag_Msg_Crit” defined on KUD_DB2_Diagnostic_Log attribute group.
This situation Issues a critical alert if the severity level of the log record is critical in db2diag.log file.
If you disable diagnostic log collection then this situation will not work.
However, if you really want to collect db2diag log data then you can switch to ‘parsing db2diag.log file’ data collection approach. And check if this approach helps to minimize CPU usage.
Basically the DB2 agent collects diagnostic log data by two approaches.
1) By using DB2 table function, by default this method is used to collect diagnostic data.
In your environment, (before disabling diagnostic collection) this default collection approach is used; i.e. using DB2 table function.
In this approach diagnostic data is fetched using SQL query (from PD_GET_DIAG_HIST API).
When there are a lot of records, this can take a considerable amount of CPU time. This behavior has been introduced since the support for DB2 10.1.
2) By parsing db2diag.log file where agent parses the db2diag.log file to get diagnostic log data, this can be enabled by setting KUD_DIAGLOG_BY_TABLE=N in configuration file.
To switch data collection approach please follow below steps:
a) Stop DB2 agent, if running.
b) In <agent-installed-directory>.ud.environment file, Add/ modify-
KUD_DIAGLOG_BY_TABLE=N
c) Save file
d) Start Db2 agent
Also, you can adjust the monitoring interval (30 seconds by default) for db2diag.log by setting: KUD_DIAGLOG_INTERVAL=xxx,
where xxx is the wanted interval.
Note: Please enable diagnostic collection before switching to parsing db2diag.log approach.
Modify KUD_DISABLE_DIAGLOG variable to KUD_DISABLE_DIAGLOG =N
Product Synonym
APM DB2
Was this topic helpful?
Document Information
Modified date:
11 February 2021
UID
ibm16414683