SoDaRadio-5.0.3-master:8901fb5
|
A simple base class to provide debug messaging from any derived class. More...
#include <ProcInfo.hxx>
Public Member Functions | |
ProcInfo (const std::string &outfile, const std::string &_unit_name=std::string("UNKNOWN")) | |
ProcInfo (const std::string &outfile, unsigned int pid, const std::string &_unit_name=std::string("UNKNOWN")) | |
bool | getInfo () |
retrieve current memory usage info from statm More... | |
void | reportInfo (bool only_if_changed=false) |
void | printInfo (std::ostream &out) |
void | printInfo () |
Protected Member Functions | |
void | init (const std::string &outfile) |
void | openFiles (const std::string &of_name) |
void | clearStats () |
std::string | curDateTime () |
unsigned long | getElapsedTime () |
Protected Attributes | |
unsigned long | vm_size |
unsigned long | resident_pages |
unsigned long | shared_pages |
unsigned long | text_pages |
unsigned long | lib_pages |
unsigned long | data_stack_pages |
unsigned long | dirty_pages |
bool | stats_changed |
bool | report_file_ok |
bool | stat_file_ok |
std::string | unit_name |
the name of the unit reporting status More... | |
std::string | statm_file_name |
std::ifstream | f_statm |
std::ofstream | f_report |
boost::posix_time::ptime | start_seconds |
unsigned long | last_elapsed |
A simple base class to provide debug messaging from any derived class.
Definition at line 41 of file ProcInfo.hxx.
|
inline |
Definition at line 43 of file ProcInfo.hxx.
References init(), statm_file_name, and unit_name.
|
inline |
Definition at line 50 of file ProcInfo.hxx.
References getInfo(), init(), statm_file_name, and unit_name.
|
inlineprotected |
|
protected |
Definition at line 122 of file ProcInfo.cxx.
Referenced by clearStats(), and printInfo().
|
inlineprotected |
bool kb1vc::ProcInfo::getInfo | ( | ) |
retrieve current memory usage info from statm
Definition at line 59 of file ProcInfo.cxx.
References data_stack_pages, dirty_pages, f_statm, getElapsedTime(), last_elapsed, lib_pages, resident_pages, shared_pages, stat_file_ok, stats_changed, text_pages, and vm_size.
Referenced by init(), ProcInfo(), and reportInfo().
|
inlineprotected |
Definition at line 80 of file ProcInfo.hxx.
References clearStats(), getInfo(), openFiles(), and start_seconds.
Referenced by ProcInfo().
|
protected |
Definition at line 31 of file ProcInfo.cxx.
References f_report, f_statm, report_file_ok, stat_file_ok, statm_file_name, and unit_name.
Referenced by init().
void kb1vc::ProcInfo::printInfo | ( | std::ostream & | out | ) |
Definition at line 113 of file ProcInfo.cxx.
References curDateTime(), data_stack_pages, dirty_pages, last_elapsed, lib_pages, resident_pages, shared_pages, text_pages, unit_name, and vm_size.
Referenced by main().
|
inline |
Definition at line 69 of file ProcInfo.hxx.
References f_report, printInfo(), and report_file_ok.
Referenced by printInfo(), and reportInfo().
|
inline |
Definition at line 60 of file ProcInfo.hxx.
References getInfo(), printInfo(), and stats_changed.
|
protected |
Definition at line 74 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().
|
protected |
Definition at line 74 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().
|
protected |
Definition at line 114 of file ProcInfo.hxx.
Referenced by openFiles(), and printInfo().
|
protected |
Definition at line 113 of file ProcInfo.hxx.
Referenced by getInfo(), and openFiles().
|
protected |
Definition at line 117 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().
|
protected |
Definition at line 74 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().
|
protected |
Definition at line 108 of file ProcInfo.hxx.
Referenced by openFiles(), and printInfo().
|
protected |
Definition at line 74 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().
|
protected |
Definition at line 74 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().
|
protected |
Definition at line 116 of file ProcInfo.hxx.
Referenced by getElapsedTime(), and init().
|
protected |
Definition at line 109 of file ProcInfo.hxx.
Referenced by getInfo(), and openFiles().
|
protected |
Definition at line 112 of file ProcInfo.hxx.
Referenced by openFiles(), and ProcInfo().
|
protected |
Definition at line 78 of file ProcInfo.hxx.
Referenced by getInfo(), and reportInfo().
|
protected |
Definition at line 74 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().
|
protected |
the name of the unit reporting status
Definition at line 111 of file ProcInfo.hxx.
Referenced by openFiles(), printInfo(), and ProcInfo().
|
protected |
Definition at line 74 of file ProcInfo.hxx.
Referenced by getInfo(), and printInfo().