7 #pragma warning(disable:2259)
15 #include <sys/signal.h>
16 #include <sys/syscall.h>
17 #include <sys/procfs.h>
248 pg_size = sysconf(_SC_PAGESIZE);
255 cerr <<
"Failed to open " <<
fname << endl;
265 if(
valid ==
false )
return false;
268 double pr_size, pr_rssize;
272 fd.lseek(0,SEEK_SET);
274 if((cnt=
fd.read(
buf,
sizeof(
buf)))<0)
276 cout <<
"LINUX Read of Proc file failed:" << endl;
286 "%d %s %c %d %d %d %d %d %lu %lu %lu %lu %lu %lu %lu %ld %ld %ld %ld %ld %ld %llu %lu %ld %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu",
325 pr_size = (double)pinfo.
vsize;
326 pr_rssize = (
double)pinfo.
rss;
328 f.
vsize = pr_size / (1024*1024);
337 bool rc = (
curr==f)?
false:
true;
string to_string(const T &value)
static ProcStats * instance()
unique_fd & open(Args &&...args)
unsigned long long starttime
bool fetch(procInfo &fill_me)