Commit c42ad817 authored by Eric Cano's avatar Eric Cano
Browse files

Added PID/TID in the long rados call logs.

This will allow indentification of impacted processes.
parent c903c7bb
......@@ -38,6 +38,7 @@
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <syscall.h>
#endif //RADOS_SLOW_CALLS_LOGGING
namespace cta { namespace objectstore {
......@@ -131,7 +132,8 @@ private:
std::string date=std::ctime(&end_time);
// Chomp newline in the end
date.erase(std::remove(date.begin(), date.end(), '\n'), date.end());
logFile << date << " op=" << radosCall << " obj=" << objectName << " duration=" << m_timer.secs() << std::endl;
logFile << date << " pid=" << ::getpid() << " tid=" << syscall(SYS_gettid) << " op="
<< radosCall << " obj=" << objectName << " duration=" << m_timer.secs() << std::endl;
}
#endif //RADOS_SLOW_CALLS_LOGGING
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment