c++distributed-systemcephcephfs

How to set ceph dout level?


I am learning bluestore of ceph. I am trying to use the ceph_object_store to test bluestore. But I see lots of unrelated log output. But I can't see any output related to the benchmark. I found the benchmark uses dout(0) to print log. So how could I close the unrelated log output and set the benchmark to print?

Those unrelated log output likes:

2021-07-13T08:17:51.821+0000 7f9b76d5f2c0 1 bluestore(/var/lib/ceph/osd/ceph-admin) _upgrade_super from 4, latest 4 2021-07-13T08:17:51.821+0000 7f9b76d5f2c0 1 bluestore(/var/lib/ceph/osd/ceph-admin) _upgrade_super done 2021-07-13T08:17:51.825+0000 7f9b6cddd700 0 Writing 10 MB in blocks of 4 KB 2021-07-13T08:17:51.885+0000 7f9b76d5f2c0 0 Wrote 10 MB in 64958us, at a rate of 157640 KB/s and 39410 iops 2021-07-13T08:17:51.889+0000 7f9b76d5f2c0 1 bluestore(/var/lib/ceph/osd/ceph-admin) umount 2021-07-13T08:17:51.897+0000 7f9b6d5de700 0 bluestore(/var/lib/ceph/osd/ceph-admin) allocation stats probe 1: cnt: 2560 frags: 2560 size: 10485760 2021-07-13T08:17:51.897+0000 7f9b6d5de700 0 bluestore(/var/lib/ceph/osd/ceph-admin) probe -1: 0, 0, 0 2021-07-13T08:17:51.897+0000 7f9b6d5de700 0 bluestore(/var/lib/ceph/osd/ceph-admin) probe -3: 0, 0, 0 2021-07-13T08:17:51.897+0000 7f9b6d5de700 0 bluestore(/var/lib/ceph/osd/ceph-admin) probe -5: 0, 0, 0 2021-07-13T08:17:51.897+0000 7f9b6d5de700 0 bluestore(/var/lib/ceph/osd/ceph-admin) probe -9: 0, 0, 0 2021-07-13T08:17:51.897+0000 7f9b6d5de700 0 bluestore(/var/lib/ceph/osd/ceph-admin) probe -17: 0, 0, 0 2021-07-13T08:17:51.897+0000 7f9b6d5de700 0 bluestore(/var/lib/ceph/osd/ceph-admin) ------------ 2021-07-13T08:17:51.897+0000 7f9b76d5f2c0 4 rocksdb: [db/db_impl/db_impl.cc:446] Shutdown: canceling all background work 2021-07-13T08:17:51.897+0000 7f9b76d5f2c0 4 rocksdb: [db/db_impl/db_impl.cc:625] Shutdown complete 2021-07-13T08:17:51.897+0000 7f9b76d5f2c0 1 bluefs umount 2021-07-13T08:17:51.897+0000 7f9b76d5f2c0 1 bdev(0x55d2cc098800 /var/lib/ceph/osd/ceph-admin/block) close 2021-07-13T08:17:52.173+0000 7f9b76d5f2c0 1 freelist shutdown 2021-07-13T08:17:52.173+0000 7f9b76d5f2c0 1 bdev(0x55d2cc098400 /var/lib/ceph/osd/ceph-admin/block) close


Solution

  • You can set the Ceph subsystem log levels to 0 and just set the log level on the needed subsystem. The full list and how to set is documented here: https://docs.ceph.com/en/latest/rados/troubleshooting/log-and-debug/#ceph-subsystems