Domino Cosole设置

本文介绍控制台日志镜像的功能及启用方法。通过设置相关变量,可实现日志文件按指定大小分割,并保留旧日志。适用于需要监控服务器控制台输出并长期保存数据的场景。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Technote (FAQ)


Question

What is Console Log Mirroring and How is it enabled?

Answer

Console log mirroring works like a file splitter for the console log file on the server so you can specify how large each file is allowed to grow and also keep previous data. When console log mirroring is not enabled and a maximum size is set for the console log the oldest data is overwritten when that limit is hit.
Related Notes.ini variables

CONSOLE_LOG_ENABLED=1: Enables the console logging feature
CONSOLE_LOG_MIRROR=1: Enables the mirroring feature
RETAIN_MIRROR_LOGS=1: Prevents deletion of previous mirrors when Domino starts
CONSOLE_LOG_MAX_KBYTES: Sets the maximum size of the Console Log/mirror files

There are no changes to existing behavior if Mirroring is not enabled.

Enabling Mirroring
If Mirroring is enabled, then the new Server thread is created, titled "Console Log Mirror Task". The task begins by deleting previous mirror files if RETAIN_MIRROR_LOGS is not specified. Then a new file is created. This file is the name of the console log (console.log by default) with a number appended to it, 999 maximum. The first available number is used, meaning that the file does not exist. Holes will be filled so, if console10.log exists then console9.log and then console11.log will be created. As the Console Log changes the data is read from the console log and copied to the new mirror log file.

Mirroring makes use of the circular log mechanism. The variable CONSOLE_LOG_MAX_KBYTES needs to be set to the value to which the Console Log can grow, and then wrap around; when the Console Log wraps, the new mirror file is created. If mirroring is enabled, then the Maximum value for CONSOLE_LOG_MAX_KBYTES is 1,000,000 (1 GB).

If mirroring fails for any reason then a message is printed to the Console Log - "Console Log Mirror Task has been disabled". The server can tolerate up to a 3 second delay by the mirror task. If the mirror fails to catch up in 3 seconds then mirroring is automatically disabled. A failed read or write will also disable the feature. The feature will remain disabled until the server is restarted.

When mirroring is enabled then all keystrokes are copied to the console log and mirrored, so backspaces may appear in the console logs.

Note that Console Log Mirroring and Console Logging must be enabled, and CONSOLE_LOG_MAX_KBYTES must be set to some value when Domino starts, in order for the mirroring to work. Enabling Console Logging after Domino starts will not enable Console Log Mirroring.

Example
Notes.ini contains CONSOLE_LOG_MIRROR=1, CONSOLE_LOG_ENABLED=1, CONSOLE_LOG_MAX_KBYTES=102400, and Domino is started. The file console.log will be created in the IBM_TECHNICAL_SUPPORT directory under the data directory. The file console1.log will also be created. The console.log file will capture console output, grow to 102400 KB, and the data will also be written to console1.log. When 102400 KB is reached, then console1.log will be closed and console2.log will be created. The position in console.log will be reset to the beginning and overwrite the previous data. New data will be copied to console2.log. The cycle will repeat until Domino terminates, or until console999.log reaches 102400 KB. When Domino is restarted, then console1.log thru console999.log will be deleted, since RETAIN_MIRROR_LOGS=1 was not specified in the Notes.ini file.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值