From 839fc76f99bae8a01b2d975c549eb5d4117ded29 Mon Sep 17 00:00:00 2001 From: Nathan Cutler Date: Fri, 28 Feb 2020 18:16:17 +0100 Subject: [PATCH] doc/cephadm/administration: clarify log gathering This is an attempt to bring the current state of the documentation more into line with the current state of the cephadm code. However, when I try to grab logs from a daemon on a host other than the one where the daemon is running, I get an empty log... References: https://tracker.ceph.com/issues/44354 Signed-off-by: Nathan Cutler --- doc/cephadm/administration.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/cephadm/administration.rst b/doc/cephadm/administration.rst index 30340d0fbb6..855f2df9402 100644 --- a/doc/cephadm/administration.rst +++ b/doc/cephadm/administration.rst @@ -202,10 +202,17 @@ To read the log file of one specific daemon, run:: cephadm logs --name +Note: this only works when run on the same host where the daemon is running. To +get logs of a daemon running on a different host, give the ``--fsid`` option:: + + cephadm logs --fsid --name + +Where the ```` corresponds to the cluster id printed by ``ceph status``. + To fetch all log files of all daemons on a given host, run:: for name in $(cephadm ls | jq -r '.[].name') ; do - cephadm logs --name "$name" > $name; + cephadm logs --fsid --name "$name" > $name; done Collecting systemd status -- 2.39.5