| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
Gaudi::SysProcStat Class Reference

`#include <SysProcStat.h>`

## Public Member Functions
| SysProcStat ()
virtual | ~SysProcStat ()
virtual int | update ()

## Public Attributes
int | pid
int | ppid
int | pgrp
int | session
int | tty_nr
int | tpgid
int | exit_signal
int | processor
long unsigned | flags
long unsigned | minflt
long unsigned | cminflt
long unsigned | majflt
long unsigned | cmajflt
long unsigned | utime
long unsigned | stime
long unsigned | startime
long unsigned | vsize
long unsigned | rlim
long unsigned | startcode
long unsigned | endcode
long unsigned | startstack
long unsigned | kstkesp
long unsigned | kstkeip
long unsigned | signal
long unsigned | blocked
long unsigned | sigingore
long unsigned | sigcatch
long unsigned | wchan
long unsigned | nswap
long unsigned | cnswap
long int | cutime
long int | cstime
long int | priority
long int | nice
long int | num_threads
long int | itrealvalue
long int | rss
char | comm [128]
char | state
long | time

## Detailed Description

Definition at line 12 of file SysProcStat.h.

## Constructor & Destructor Documentation

SysProcStat::SysProcStat | ( |  | ) |

Definition at line 14 of file SysProcStat.cpp.

{
update();
}

SysProcStat::~SysProcStat | ( |  | ) |
| virtual

Definition at line 18 of file SysProcStat.cpp.

{ }

## Member Function Documentation

int SysProcStat::update | ( |  | ) |
| virtual

Definition at line 23 of file SysProcStat.cpp.

{
FILE* file = fopen("/proc/self/stat", "r");
int par = fscanf(file,
"%d %s %c %d %d"
"%d %d %d %lu %lu"
"%lu %lu %lu %lu %lu"
"%ld %ld %ld %ld %ld"
"%ld %lu %lu %ld %lu"
"%lu %lu %lu %lu %lu"
"%lu %lu %lu %lu %lu"
"%lu %lu %d %d",
&pid, comm, &state, &ppid, &pgrp,
&session, &tty_nr, &tpgid, &flags, &minflt,
&cminflt, &majflt, &cmajflt, &utime, &stime,
&cutime, &cstime, &priority, &nice, &num_threads,
&itrealvalue, &startime, &vsize, &rss, &rlim,
&startcode, &endcode, &startstack, &kstkesp, &kstkeip,
&signal, &blocked, &sigingore, &sigcatch, &wchan,
&nswap, &cnswap, &exit_signal, &processor);
fclose(file);
if (par != 39)
return -1;
struct timeval tv;
gettimeofday(&tv, NULL);
time = tv.tv_sec * 1000 + tv.tv_usec / 1000;
return pid;
}

## Member Data Documentation

long unsigned Gaudi::SysProcStat::blocked

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::cmajflt

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::cminflt

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::cnswap

Definition at line 17 of file SysProcStat.h.

char Gaudi::SysProcStat::comm[128]

Definition at line 21 of file SysProcStat.h.

long int Gaudi::SysProcStat::cstime

Definition at line 20 of file SysProcStat.h.

long int Gaudi::SysProcStat::cutime

Definition at line 20 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::endcode

Definition at line 17 of file SysProcStat.h.

int Gaudi::SysProcStat::exit_signal

Definition at line 16 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::flags

Definition at line 17 of file SysProcStat.h.

long int Gaudi::SysProcStat::itrealvalue

Definition at line 20 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::kstkeip

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::kstkesp

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::majflt

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::minflt

Definition at line 17 of file SysProcStat.h.

long int Gaudi::SysProcStat::nice

Definition at line 20 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::nswap

Definition at line 17 of file SysProcStat.h.

long int Gaudi::SysProcStat::num_threads

Definition at line 20 of file SysProcStat.h.

int Gaudi::SysProcStat::pgrp

Definition at line 16 of file SysProcStat.h.

int Gaudi::SysProcStat::pid

Definition at line 16 of file SysProcStat.h.

int Gaudi::SysProcStat::ppid

Definition at line 16 of file SysProcStat.h.

long int Gaudi::SysProcStat::priority

Definition at line 20 of file SysProcStat.h.

int Gaudi::SysProcStat::processor

Definition at line 16 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::rlim

Definition at line 17 of file SysProcStat.h.

long int Gaudi::SysProcStat::rss

Definition at line 20 of file SysProcStat.h.

int Gaudi::SysProcStat::session

Definition at line 16 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::sigcatch

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::sigingore

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::signal

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::startcode

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::startime

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::startstack

Definition at line 17 of file SysProcStat.h.

char Gaudi::SysProcStat::state

Definition at line 21 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::stime

Definition at line 17 of file SysProcStat.h.

long Gaudi::SysProcStat::time

Definition at line 23 of file SysProcStat.h.

int Gaudi::SysProcStat::tpgid

Definition at line 16 of file SysProcStat.h.

int Gaudi::SysProcStat::tty_nr

Definition at line 16 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::utime

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::vsize

Definition at line 17 of file SysProcStat.h.

long unsigned Gaudi::SysProcStat::wchan

Definition at line 17 of file SysProcStat.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/RootCnv/RootCnv/SysProcStat.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/RootCnv/src/SysProcStat.cpp