Skip to content

Commit 36c322a

Browse files
committed
docs
Signed-off-by: Liao PengFei <[email protected]>
1 parent 3334ad7 commit 36c322a

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

playbook/logs/scripts/log_retention.txt

+16-4
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@ log_retention.sh文件使用说明:
22

33
1. 执行该文件之前,需要使用'chmod +x'命令给该文件添加执行权限。
44
2. 该程序须自定义参数来执行自定义日志保留计划,可以在config.json定义相关参数。
5-
3. 相关参数设定可使用 'man logrotate'查询
5+
3. 该程序有清理日志,与日志轮转两种模式,可以通过cnofig文件的clean参数来选择。
6+
4. 其余日志轮转相关参数设定可使用 'man logrotate'查询。
7+
5. 清理日志模式,是一次性操作,会删除所有日志压缩文件。
8+
成功执行的结果为:Clean all .gz files in $folder。
9+
6. 日志轮转模式,是logrotate自动执行的周期性操作,会根据设定的参数,将日志文件进行压缩。
10+
成功执行的结果为:Logrotate started successfully.
611

7-
提示:此命令须在工作节点上以root权限执行,用于压缩或删除curve工作日志。
12+
13+
提示:此命令须在每个工作节点上以root权限执行,用于压缩或删除curve工作日志。
814
#######################################################################
915
Instructions for using log_retention.sh file:
1016

1117
1. Before executing the file, you need to use the 'chmod +x' command to add execution permissions to the file.
1218
2. The program requires customized parameters to execute a customized log retention plan. Relevant parameters can be defined in config.json.
13-
3. Relevant parameter settings can be queried using 'man logrotate'
19+
3. This program has two modes: log cleaning and log rotation, which can be selected through the clean parameter of the cnofig file.
20+
4. The remaining log rotation related parameter settings can be queried using 'man logrotate'.
21+
5. Clean log mode is a one-time operation and will delete all compressed log files.
22+
The result of successful execution is: Clean all .gz files in $folder.
23+
6. Log rotation mode is a periodic operation automatically performed by logrotate. It will compress log files according to the set parameters.
24+
The result of successful execution is: Logrotate started successfully.
25+
1426

15-
Tip: This command must be executed with root privileges on the working node to compress or delete the curve working log.
27+
Tip: This command must be executed with root privileges on each working node to compress or delete the curve working log.

0 commit comments

Comments
 (0)