]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd: record startup_time
authorSage Weil <sage@redhat.com>
Mon, 8 Jul 2019 22:28:01 +0000 (17:28 -0500)
committerSage Weil <sage@redhat.com>
Mon, 5 Aug 2019 18:34:14 +0000 (13:34 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/osd/OSD.cc
src/osd/OSD.h

index f65086028a16feb51bd6f767f1c1d9876572b4db..f3c975c48d9ab3bda8cb16b0dd10b4706d5df7db 100644 (file)
@@ -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) {
index 189c645d7da788454fb585e6347cf3624e042a5d..5ac1348e77bf5671b16403d3749a7fd5c5a9fae2 100644 (file)
@@ -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);