34 #include <boost/format.hpp> 35 #include <boost/date_time/posix_time/posix_time.hpp> 44 const std::string & _unit_name = std::string(
"UNKNOWN")) {
52 const std::string & _unit_name = std::string(
"UNKNOWN")) {
80 void init(
const std::string & outfile) {
81 start_seconds = boost::posix_time::second_clock::local_time();
87 void openFiles(
const std::string & of_name);
102 boost::posix_time::ptime now;
103 now = boost::posix_time::second_clock::local_time();
104 boost::posix_time::time_duration duration = now -
start_seconds;
105 return duration.total_seconds();
bool getInfo()
retrieve current memory usage info from statm
std::string unit_name
the name of the unit reporting status
boost::posix_time::ptime start_seconds
unsigned long resident_pages
unsigned long data_stack_pages
unsigned long dirty_pages
std::string curDateTime()
ProcInfo(const std::string &outfile, const std::string &_unit_name=std::string("UNKNOWN"))
unsigned long shared_pages
unsigned long last_elapsed
unsigned long getElapsedTime()
ProcInfo(const std::string &outfile, unsigned int pid, const std::string &_unit_name=std::string("UNKNOWN"))
void openFiles(const std::string &of_name)
std::string statm_file_name
A simple base class to provide debug messaging from any derived class.
void reportInfo(bool only_if_changed=false)
void init(const std::string &outfile)