[.net programming language only]

Configuring log file pruning for WebSphere eXtreme Scale Client for .NET

[Version 8.6.0.4 and later]To prevent the client-generated log files from using the entire disk resources over time, configure pruning of the log files. When you configure log file pruning, old log files and associated log file directories are deleted.

About this task

When you are using WebSphere® eXtreme Scale Client for .NET, log files are generated for each application domain. While log files within an application domain are limited in number due to log file wrapping, log files across application domains are not limited. You can configure pruning to delete old log directories and log files to prevent the log files from using too much disk space. For more information about the log files that are generated, see WebSphere eXtreme Scale Client for .NET logs.

Files are pruned under the top level log directory. The top level directory is specified during installation. If you created files and directories in the log directory, they are not deleted. In general, files older than the maximum log file age are deleted. When all files are removed from a directory, excluding the top level log directory, the directory is deleted. However, if any one log file in that directory is younger than the maximum log file age, then all files in that directory are preserved.

Procedure

  1. Set properties in the client properties file to configure log file pruning.

    If you want to trigger log file pruning based on the total amount of disk space that is consumed by the log files, set the logPruningMaxTotalLogSize property. If you want to periodically trigger log file pruning regardless of how much disk space is consumed by the log files, set the logPruningInterval property. If you set either of these properties, you must also set the logPruningMaxLogfileAge property to the log file age retention limit.

    logPruningEnabled
    Specifies whether log file pruning is enabled or disabled.

    Default: true

    Valid values: true, false

    logPruningMaxTotalLogSize
    Specifies the upper limit on how much disk space, in megabytes (MB), the client log files can use. When this limit is exceeded, client log files older than the logPruningMaxLogfileAge are deleted. A value of 0 disables the check for total log size, which causes the old log files to be deleted at the specified logPruningInterval setting.

    Default: 0 (disabled)

    Valid values: Whole integers greater than or equal to 0

    logPruningMaxLogfileAge
    Specifies a log file age limit in days. When log pruning cycles run according to the logPruningInterval or logPruningMaxTotalLogSize setting, files older than this age limit are removed. If one log file is younger than the age limit in a subdirectory, all log files in the subdirectory are retained. This retention ensures that all related trace logs are kept intact.

    Default: 60

    Valid values: Whole integers greater than 0

    logPruningInterval
    Specifies the log pruning interval in hours. When the logPruningMaxTotalLogSize property is set to 0 (disabled), the time between pruning cycles is controlled by this property.

    Default: 1

    Valid values: Whole integers greater than 0

  2. Run your .NET data grid application with the client properties file that you configured.

Results

When the client application issues its first Connect method call and the logPruningEnabled property is set to true, log file pruning is activated. When a pruning cycle completes, a summary is written to the SystemOut.log file. The summary includes the size of the files and directories that were deleted. If a file or directory cannot be deleted, a first-failure data capture (FFDC) message is logged.

Example

An example of the message that is written to the log file follows:
CWOBJ6211I: Pruning complete for log dir C:\Program Files (x86)\IBM\WebSphere\eXtreme Scale Client for .NET\logs. 
0KB pruned from disk: 0 files deleted, 0 directories deleted.