#include <ProcInfoFetcher.h>
Definition at line 41 of file ProcInfoFetcher.h.
ProcInfoFetcher::ProcInfoFetcher |
( |
| ) |
|
ProcInfoFetcher::~ProcInfoFetcher |
( |
| ) |
|
ProcInfo ProcInfoFetcher::fetch |
( |
| ) |
const |
Definition at line 186 of file ProcInfoFetcher.cc.
References buf_, fd_, pg_size_, readEcalDQMStatus::read, runTheMatrix::ret, edm::service::ProcInfo::rss, and edm::service::ProcInfo::vsize.
Referenced by edm::service::ResourceEnforcer::check().
190 double pr_size = 0.0, pr_rssize = 0.0;
195 lseek(
fd_, 0, SEEK_SET);
198 perror(
"Read of Proc file failed:");
206 Fetcher fetcher(
buf_);
207 fetcher >> pinfo.pid >> pinfo.comm >> pinfo.state >> pinfo.ppid >> pinfo.pgrp >> pinfo.session >> pinfo.tty >>
208 pinfo.tpgid >> pinfo.flags >> pinfo.minflt >> pinfo.cminflt >> pinfo.majflt >> pinfo.cmajflt >>
209 pinfo.utime >> pinfo.stime >> pinfo.cutime >> pinfo.cstime >> pinfo.priority >> pinfo.nice >>
210 pinfo.num_threads >> pinfo.itrealvalue >> pinfo.starttime >> pinfo.vsize >> pinfo.rss >> pinfo.rlim >>
211 pinfo.startcode >> pinfo.endcode >> pinfo.startstack >> pinfo.kstkesp >> pinfo.kstkeip >> pinfo.signal >>
212 pinfo.blocked >> pinfo.sigignore >> pinfo.sigcatch >> pinfo.wchan;
213 }
catch (boost::bad_lexical_cast& iE) {
214 LogWarning(
"ProcInfoFetcher") <<
"Parsing of Prof file failed:" << iE.what() << std::endl;
219 pr_size = (double)pinfo.vsize;
220 pr_rssize = (
double)pinfo.rss;
222 ret.vsize = pr_size / (1024.0 * 1024.0);
223 ret.rss = (pr_rssize *
pg_size_) / (1024.0 * 1024.0);
ret
prodAgent to be discontinued
char edm::service::ProcInfoFetcher::buf_[500] |
|
mutableprivate |
int edm::service::ProcInfoFetcher::fd_ |
|
private |
double edm::service::ProcInfoFetcher::pg_size_ |
|
private |