From c4efbdd3a6940842f0e55c582a3ef106e1b829ae Mon Sep 17 00:00:00 2001 From: zhoupengcheng Date: Tue, 26 Mar 2024 17:34:57 +0800 Subject: [PATCH] Modifying the Usage Description of Log_dir --- ...47\224\250\346\210\267\346\214\207\345\215\227.md" | 11 +++++++---- analysis/atuned/config.py | 2 -- analysis/engine/config.py | 2 -- misc/atuned.cnf | 4 ++-- misc/engine.cnf | 4 +++- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git "a/Documentation/UserGuide/A-Tune\347\224\250\346\210\267\346\214\207\345\215\227.md" "b/Documentation/UserGuide/A-Tune\347\224\250\346\210\267\346\214\207\345\215\227.md" index ed7ad26..3313ede 100644 --- "a/Documentation/UserGuide/A-Tune\347\224\250\346\210\267\346\214\207\345\215\227.md" +++ "b/Documentation/UserGuide/A-Tune\347\224\250\346\210\267\346\214\207\345\215\227.md" @@ -532,8 +532,10 @@ tuning为系统进行离线调优时需要用到的参数信息。 [log] # either "debug", "info", "warn", "error", "critical", default is "info" level = info - # you can set log_dir to specify the location where the log is written. default location is /var/log/messages - # log_dir = "/var/log/atune" + # you can set log_dir to specify the location where the log is written,specified directory can only be under /var/log/atune,default location is /var/log/messages + # log_dir = /var/log/atune + + #################################### monitor ############################### [monitor] @@ -632,8 +634,9 @@ A-Tune engine配置文件/etc/atuned/engine.cnf的配置项说明如下: [log] # either "debug", "info", "warn", "error", "critical", default is "info" level = info - # you can set log_dir to specify the location where the log is written. default location is /var/log/messages - # log_dir = "/var/log/atune" + # you can set log_dir to specify the location where the log is written,specified directory can only be under /var/log/atune,default location is /var/log/messages + # log_dir = /var/log/atune + #################################### database ############################### [database] diff --git a/analysis/atuned/config.py b/analysis/atuned/config.py index 2541e59..9e280d6 100644 --- a/analysis/atuned/config.py +++ b/analysis/atuned/config.py @@ -101,8 +101,6 @@ class AtunedConfig: ENGINE_CERT_PATH + 'client.key') AtunedConfig.level = get_or_default(config, 'log', 'level', 'info') AtunedConfig.log_dir = get_or_default(config, 'log', 'log_dir', None) - if AtunedConfig.log_dir: - AtunedConfig.log_dir.strip('"') AtunedConfig.module = get_or_default(config, 'monitor', 'module', 'mem_topo, cpu_topo') AtunedConfig.disk = get_or_default(config, 'system', 'disk', 'sda') AtunedConfig.network = get_or_default(config, 'system', 'network', 'enp5s0') diff --git a/analysis/engine/config.py b/analysis/engine/config.py index 3e2b008..3daf004 100644 --- a/analysis/engine/config.py +++ b/analysis/engine/config.py @@ -62,8 +62,6 @@ class EngineConfig: 'tlsengineserverkeyfile', ENGINE_CERT_PATH + 'server.key') EngineConfig.level = get_or_default(config, 'log', 'level', 'info') EngineConfig.log_dir = get_or_default(config, 'log', 'level', None) - if EngineConfig.log_dir: - EngineConfig.log_dir.strip('"') EngineConfig.db_enable = get_or_default_bool(config, 'database', 'db_enable', False) if EngineConfig.db_enable: EngineConfig.database = get_or_default(config, 'database', 'database', 'PostgreSQL') diff --git a/misc/atuned.cnf b/misc/atuned.cnf index 351a118..1f6a50a 100755 --- a/misc/atuned.cnf +++ b/misc/atuned.cnf @@ -72,8 +72,8 @@ tlsengineclientkeyfile = /etc/atuned/engine_certs/client.key [log] # either "debug", "info", "warn", "error", "critical", default is "info" level = info -# you can set log_dir to specify the location where the log is written. default location is /var/log/messages -# log_dir = "/var/log/atune" +# you can set log_dir to specify the location where the log is written,specified directory can only be under /var/log/atune,default location is /var/log/messages +# log_dir = /var/log/atune #################################### monitor ############################### [monitor] diff --git a/misc/engine.cnf b/misc/engine.cnf index 0cadd6b..57e48b0 100755 --- a/misc/engine.cnf +++ b/misc/engine.cnf @@ -28,6 +28,8 @@ tlsengineserverkeyfile = /etc/atuned/engine_certs/server.key [log] # either "debug", "info", "warn", "error", "critical", default is "info" level = info +# you can set log_dir to specify the location where the log is written,specified directory can only be under /var/log/atune,default location is /var/log/messages +# log_dir = /var/log/atune #################################### database ############################### [database] @@ -78,4 +80,4 @@ net_stat_rxkbs = 70 net_stat_txkbs = 70 # disk I/OF -storage_stat_util = 70 \ No newline at end of file +storage_stat_util = 70 -- Gitee