IBM Support

db2diag may read db2diag.*.log manually created by users

Technical Blog Post


db2diag may read db2diag.*.log manually created by users


If you set the DIAGSIZE database manager configuration parameter, the db2diag tool reads from db2diag.*.log files

under the DIAGPATH directory configured. This is intended for the rotating db2diag log files - db2diag.0.log, db2diag.1.log etc.

$ db2 get dbm cfg |grep DIAG

 Diagnostic error capture level       (DIAGLEVEL) = 3

 Diagnostic data directory path        (DIAGPATH) = /db2diagpath/

 Current member resolved DIAGPATH            = /db2diagpath/

 Alternate diagnostic data directory path (ALT_DIAGPATH) =

 Current member resolved ALT_DIAGPATH          =

 Size of rotating db2diag & notify logs (MB) (DIAGSIZE) = 2048


If you manually create any files that match the pattern "db2diag.*.log",the files will be read by db2diag command

and printed as output. As a result, the output may not be expected.

The following is an example that matches the naming pattern that db2diag looks for:



Please note users are not supposed to create files under DIAGPATH in order to have db2diag tool working properly.

If you have to create files under DIAGPATH, you can change the naming format to avoid db2diag.*.log.

[{"Business Unit":{"code":"BU029","label":"Data and AI"}, "Product":{"code":"SSEPGG","label":"DB2 for Linux, UNIX and Windows"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]