DBDIAGLOGSIZE
This option helps to control the amount of space that is used by diagnostic log files.
db2diag.14.log, db2diag.15.log, ... , db2diag.22.log, db2diag.23.log
When
db2diag.23.log is full, db2diag.14.log is deleted, and
db2diag.24.log is created.- The available space in the file system where the diagnostic log files are located is less than 20% of the total file system space.
- The available space in the file system where the server instance directory is located is less than 1 GB.
Parameters
- megabytes
- Specifies the amount of space that is used by diagnostic log files in megabytes. Specify a value
in the range 2 - 9999, or a value of 0. The default value is 1024.
If you specify a value in the range 2 - 9999, rotating log files are used, and the value specifies the total size in megabytes of all 10 log files. The value is reset to 1024 whenever the server is restarted.
If you specify a value of 0, one log file is used, and no limits are imposed on the size of the log file.
If you want to archive messages, specify a value of 0 to ensure that the db2diag.log file can use all the available space without using rotating log files.
After you set the value of the megabytes parameter to 0 by using the DBDIAGLOGSIZE option, messages are initially written to rotating log files. After the server is restarted, messages are written to the db2diag.log file.
Tip: If you specify a value in the range 2 - 9999 by using the server options file, dsmserv.opt, the value is not reset automatically at server startup. The value remains the same until it is changed or removed from the dsmserv.opt file, by using the SETOPT command.
Example: Specify a maximum size of 5120 megabytes
Specify the size of the diagnostic log files as 5120 megabytes (5 GB):
dbdiaglogsize 5120
Example: Archive messages in a single log file
Archive messages by specifying that the messages are written to the db2diag.log file:
dbdiaglogsize 0