]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: add tracing mode for crimson-osd
authorXuehan Xu <xxhdx1985126@gmail.com>
Mon, 14 Jun 2021 11:49:14 +0000 (19:49 +0800)
committerXuehan Xu <xxhdx1985126@gmail.com>
Wed, 8 Sep 2021 03:03:00 +0000 (11:03 +0800)
Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
src/crimson/osd/main.cc
src/vstart.sh

index 799d8d13603961b8b4f53dd11d8d9ac39e839fc0..596dea0b1f4e4df63bed614456e952e3332be4d1 100644 (file)
@@ -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<uint16_t>()->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();
index 98c7ad635cc576b7b885a49681306d2a5b43e915..12d98ccc4663af73e9de9591127b8c18387119e3 100755 (executable)
@@ -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 <<EOF || true
 usage: $0 [option]... \nex: MON=3 OSD=1 MDS=1 MGR=1 RGW=1 NFS=1 $0 -n -d
 options:
        -d, --debug
+        -t, --trace
        -s, --standby_mds: Generate standby-replay MDS for each active
        -l, --localhost: use localhost instead of hostname
        -i <ip>: 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 <<EOF