#include <ProcInfoFetcher.h>
Definition at line 41 of file ProcInfoFetcher.h.
◆ ProcInfoFetcher() [1/2]
ProcInfoFetcher::ProcInfoFetcher |
( |
| ) |
|
◆ ~ProcInfoFetcher()
ProcInfoFetcher::~ProcInfoFetcher |
( |
| ) |
|
◆ ProcInfoFetcher() [2/2]
◆ fetch()
ProcInfo ProcInfoFetcher::fetch |
( |
| ) |
const |
Definition at line 185 of file ProcInfoFetcher.cc.
References buf_, cppFunctionSkipper::exception, fd_, pg_size_, fileinputsource_cfi::read, and runTheMatrix::ret.
Referenced by edm::service::ResourceEnforcer::check(), and edm::service::SimpleMemoryCheck::fetch().
189 double pr_size = 0.0, pr_rssize = 0.0;
194 lseek(
fd_, 0, SEEK_SET);
197 perror(
"Read of Proc file failed:");
205 Fetcher fetcher(
buf_);
206 fetcher >> pinfo.pid >> pinfo.comm >> pinfo.state >> pinfo.ppid >> pinfo.pgrp >> pinfo.session >> pinfo.tty >>
207 pinfo.tpgid >> pinfo.flags >> pinfo.minflt >> pinfo.cminflt >> pinfo.majflt >> pinfo.cmajflt >>
208 pinfo.utime >> pinfo.stime >> pinfo.cutime >> pinfo.cstime >> pinfo.priority >> pinfo.nice >>
209 pinfo.num_threads >> pinfo.itrealvalue >> pinfo.starttime >> pinfo.vsize >> pinfo.rss >> pinfo.rlim >>
210 pinfo.startcode >> pinfo.endcode >> pinfo.startstack >> pinfo.kstkesp >> pinfo.kstkeip >> pinfo.signal >>
211 pinfo.blocked >> pinfo.sigignore >> pinfo.sigcatch >> pinfo.wchan;
213 LogWarning(
"ProcInfoFetcher") <<
"Parsing of Prof file failed:" << iE.what() << std::endl;
218 pr_size = (double)pinfo.vsize;
219 pr_rssize = (
double)pinfo.rss;
221 ret.vsize = pr_size / (1024.0 * 1024.0);
222 ret.rss = (pr_rssize *
pg_size_) / (1024.0 * 1024.0);
ret
prodAgent to be discontinued
Log< level::Warning, false > LogWarning
◆ operator=()
◆ buf_
char edm::service::ProcInfoFetcher::buf_[500] |
|
mutableprivate |
◆ fd_
int edm::service::ProcInfoFetcher::fd_ |
|
private |
◆ pg_size_
double edm::service::ProcInfoFetcher::pg_size_ |
|
private |