From: Xuehan Xu Date: Mon, 14 Jun 2021 11:49:14 +0000 (+0800) Subject: crimson: add tracing mode for crimson-osd X-Git-Tag: v17.1.0~919^2~11 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c677ae4165961e139ad968ef533a03cdd3503cbd;p=ceph.git crimson: add tracing mode for crimson-osd Signed-off-by: Xuehan Xu --- diff --git a/src/crimson/osd/main.cc b/src/crimson/osd/main.cc index 799d8d136039..596dea0b1f4e 100644 --- a/src/crimson/osd/main.cc +++ b/src/crimson/osd/main.cc @@ -208,6 +208,7 @@ int main(int argc, char* argv[]) "This is normally used in combination with --mkfs") ("mkfs", "create a [new] data directory") ("debug", "enable debug output on all loggers") + ("trace", "enable trace output on all loggers") ("no-mon-config", "do not retrieve configuration from monitors on boot") ("prometheus_port", bpo::value()->default_value(0), "Prometheus port. Set to zero to disable") @@ -247,6 +248,11 @@ int main(int argc, char* argv[]) seastar::log_level::debug ); } + if (config.count("trace")) { + seastar::global_logger_registry().set_all_loggers_level( + seastar::log_level::trace + ); + } sharded_conf().start(init_params.name, cluster_name).get(); auto stop_conf = seastar::defer([] { sharded_conf().stop().get(); diff --git a/src/vstart.sh b/src/vstart.sh index 98c7ad635cc5..12d98ccc4663 100755 --- a/src/vstart.sh +++ b/src/vstart.sh @@ -141,6 +141,7 @@ extra_conf="" new=0 standby=0 debug=0 +trace=0 ip="" nodaemon=0 redirect=0 @@ -197,6 +198,7 @@ read -r -d '' usage <: bind to specific ip @@ -270,6 +272,9 @@ case $1 in -d | --debug) debug=1 ;; + -t | --trace) + trace=1 + ;; -s | --standby_mds) standby=1 ;; @@ -916,6 +921,9 @@ start_osd() { if [ "$debug" -ne 0 ]; then extra_seastar_args+=" --debug" fi + if [ "$trace" -ne 0]; then + extra_seastar_args+=" --trace" + fi fi if [ "$new" -eq 1 -o $inc_osd_num -gt 0 ]; then wconf <