This parameter helps control the maximum sizes of the diagnostic log and administration notification log files.
If the value of this parameter is 0, the default, there is only one diagnostic log file, called the db2diag.log file. There is also only one administration notification log file, called the <instance>.nfy file, which is used only on Linux and UNIX operating systems. The sizes of these files can increase indefinitely.
If you set the parameter to a non-zero value and restart the <instance>, a series of rotating diagnostic log files and a series of rotating administration notification log files are used. These files are called the db2diag.n.log and <instance>.n.nfy files, where n is an integer; <instance>.n.nfy files apply only to Linux and UNIX operating systems. The number of db2diag.n.log files and <instance>.n.nfy files cannot exceed 10 each. When the size of 10th file is full, the oldest file is deleted, and a new file is created.
For example, on Linux and UNIX operating systems the rotating log files under diagpath might look like the following output:
db2diag.14.log, db2diag.15.log, ... , db2diag.22.log, db2diag.23.log
<instance>.0.nfy, <instance>.1.nfy...,<instance>.8.nfy,<instance>.9.nfy
If db2diag.23.log is full, db2diag.14.log will be deleted, db2diag.24.log will be created for db2diag logging
If <instance>.9.nfy is full, <instance>.0.nfy is deleted , <instance>.10.nfy will be created for administration notification logging.
Note that the messages are always logged to rotating log file with the largest index number db2diag.largest n.log, <instance>.largest n.nfy
The total size of the db2diag.n.log and <instance>.n.nfy files are determined by the value of the diagsize configuration parameter. By default, except on Windows operating systems, 90% of the value of diagsize is allocated to the db2diag.n.log files, and 10% of the value of diagsize is allocated to the <instance>.n.nfy files. For example, if you set diagsize to 1024 on a Linux or UNIX operating system, the total size of the db2diag.n.log files cannot exceed 921.6 MB, and the total size of the <instance>.n.nfy files cannot exceed 102.4 MB. On Windows operating systems, the total value of diagsize is allocated to the db2diag.n.log files. The size of each log file is determined by the total amount of space allocated to each type of log file divided by 10. For example, if the total size of the db2diag.n.log files cannot exceed 921.6 MB, the size of each db2diag.n.log file is 92.16 MB.
The maximum value that you specify for the diagsize configuration parameter cannot exceed the amount of free space in the directory that you specify for the diagpath configuration parameter. The diagnostic and administration notification log files are stored in this directory. To avoid losing information too quickly because of file rotation (the deletion of the oldest log file), set diagsize to a value that is greater than 50 MB but not more than 80% of the free space in the directory that you specify for diagpath.
db2 update dbm cfg using diagsize 1024
db2 update dbm cfg using diagsize 0
If you change the value of the diagsize configuration parameter and do not restart the instance, the instance and existing processes continue to use the old value. Any new processes that are created after the value is changed uses the new value. This might result in 2 log files being written to until the instance is restarted.