]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: include age in 'slow request' messages
authorSage Weil <sage@inktank.com>
Wed, 16 May 2012 20:07:38 +0000 (13:07 -0700)
committerSage Weil <sage@inktank.com>
Wed, 16 May 2012 20:07:38 +0000 (13:07 -0700)
Make log messages easier to interpret, without subtracting timestamps in
your head.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OpRequest.cc

index f3507630195cc789f2a3f96b9b99df0122e94de3..254bbfccfff34651662a96c66aa3dca37d10e598 100644 (file)
@@ -103,8 +103,9 @@ bool OpTracker::check_ops_in_flight(std::vector<string> &warning_vector)
       if (warned > g_conf->osd_op_log_threshold)
         break;
 
+      utime_t age = now - (*i)->received_time;
       stringstream ss;
-      ss << "slow request received at " << (*i)->received_time
+      ss << "slow request " << age << " seconds old, received at " << (*i)->received_time
           << ": " << *((*i)->request) << " currently " << (*i)->state_string();
       warning_vector.push_back(ss.str());