From: Sage Weil Date: Mon, 8 Jul 2019 22:28:01 +0000 (-0500) Subject: osd: record startup_time X-Git-Tag: v15.1.0~1952^2~10 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=37a79dd20996abffc8e7cbdbc477043637b0537b;p=ceph-ci.git osd: record startup_time Signed-off-by: Sage Weil --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index f65086028a1..f3c975c48d9 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -503,6 +503,7 @@ void OSDService::request_osdmap_update(epoch_t e) osd->osdmap_subscribe(e, false); } + class AgentTimeoutCB : public Context { PGRef pg; public: @@ -2799,6 +2800,8 @@ int OSD::init() goto out; } + startup_time = ceph::mono_clock::now(); + // load up "current" osdmap assert_warn(!osdmap); if (osdmap) { diff --git a/src/osd/OSD.h b/src/osd/OSD.h index 189c645d7da..5ac1348e77b 100644 --- a/src/osd/OSD.h +++ b/src/osd/OSD.h @@ -1452,7 +1452,8 @@ private: Messenger *hb_back_server_messenger; utime_t last_heartbeat_resample; ///< last time we chose random peers in waiting-for-healthy state double daily_loadavg; - + ceph::mono_time startup_time; + void _add_heartbeat_peer(int p); void _remove_heartbeat_peer(int p); bool heartbeat_reset(Connection *con);