From 16620cd8e13a8a0639720b3ba718fe6861eaceac Mon Sep 17 00:00:00 2001 From: Junhong Mao Date: Tue, 8 Oct 2024 16:47:20 -0400 Subject: [PATCH] Fix some hint message based on review comments. --- saidump/SaiDump.cpp | 2 +- syncd/scripts/saidump.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/saidump/SaiDump.cpp b/saidump/SaiDump.cpp index c166910fe..1f0a16366 100644 --- a/saidump/SaiDump.cpp +++ b/saidump/SaiDump.cpp @@ -31,7 +31,7 @@ void SaiDump::printUsage() std::cout << " -g --dumpGraph:" << std::endl; std::cout << " Dump current graph" << std::endl; std::cout << " -r --rdb:" << std::endl; - std::cout << " Dump by parsing the RDB JSON file, which is created based on Redis dump.rdb that is generated by Redis SAVE command" << std::endl; + std::cout << " Dump by parsing the RDB JSON file, which is created based on Redis dump.rdb that is generated by redis-cli --rdb command" << std::endl; std::cout << " -m --max:" << std::endl; std::cout << " Config the the RDB JSON file's max size in MB, which is optional with default value 100MB" << std::endl; std::cout << " -h --help:" << std::endl; diff --git a/syncd/scripts/saidump.sh b/syncd/scripts/saidump.sh index 60836861c..9d0902ad3 100755 --- a/syncd/scripts/saidump.sh +++ b/syncd/scripts/saidump.sh @@ -10,8 +10,7 @@ save_saidump_by_rdb() import json with open('$filepath') as json_file: data = json.load(json_file) - print(data['INSTANCES']['redis']['hostname'], data['INSTANCES']['redis']['port'], data['INSTANCES']['redis']['unix_socket_path']) - json_file.close()") + print(data['INSTANCES']['redis']['hostname'], data['INSTANCES']['redis']['port'], data['INSTANCES']['redis']['unix_socket_path'])") # split redis_config=(${redis_config// / }) @@ -26,7 +25,7 @@ with open('$filepath') as json_file: logger "saidump.sh: [2] Run rdb-cli command to convert the dump files into JSON files." rdb-cli $redis_dir/dump.rdb json | tee $redis_dir/dump.json > /dev/null - logger "saidump.sh: [3] Run saidump -r to update the JSON files' format as same as the saidump before. Then we can get the saidump's result in standard output." + logger "saidump.sh: [3] Run saidump -r to get the result at standard output from the JSON file." saidump -r $redis_dir/dump.json -m 100 logger "saidump.sh: [4] Clear the temporary files."