The Gaudi Framework  master (37c0b60a)
Gaudi::SysProcStat Class Reference

#include </builds/gaudi/Gaudi/RootCnv/include/RootCnv/SysProcStat.h>

Public Member Functions

 SysProcStat ()
 
virtual ~SysProcStat ()=default
 
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 22 of file SysProcStat.h.

Constructor & Destructor Documentation

◆ SysProcStat()

SysProcStat::SysProcStat ( )

Definition at line 24 of file SysProcStat.cpp.

24 { update(); }

◆ ~SysProcStat()

virtual Gaudi::SysProcStat::~SysProcStat ( )
virtualdefault

Member Function Documentation

◆ update()

int SysProcStat::update ( )
virtual

Definition at line 29 of file SysProcStat.cpp.

29  {
30  FILE* file = fopen( "/proc/self/stat", "r" );
31  int par = fscanf( file,
32  "%d %127s %c %d %d"
33  "%d %d %d %lu %lu"
34  "%lu %lu %lu %lu %lu"
35  "%ld %ld %ld %ld %ld"
36  "%ld %lu %lu %ld %lu"
37  "%lu %lu %lu %lu %lu"
38  "%lu %lu %lu %lu %lu"
39  "%lu %lu %d %d",
44  fclose( file );
45 
46  if ( par != 39 ) return -1;
47 
48  struct timeval tv;
49  gettimeofday( &tv, nullptr );
50  time = tv.tv_sec * 1000 + tv.tv_usec / 1000;
51 
52  return pid;
53 }

Member Data Documentation

◆ blocked

long unsigned Gaudi::SysProcStat::blocked

Definition at line 27 of file SysProcStat.h.

◆ cmajflt

long unsigned Gaudi::SysProcStat::cmajflt

Definition at line 26 of file SysProcStat.h.

◆ cminflt

long unsigned Gaudi::SysProcStat::cminflt

Definition at line 26 of file SysProcStat.h.

◆ cnswap

long unsigned Gaudi::SysProcStat::cnswap

Definition at line 27 of file SysProcStat.h.

◆ comm

char Gaudi::SysProcStat::comm[128]

Definition at line 29 of file SysProcStat.h.

◆ cstime

long int Gaudi::SysProcStat::cstime

Definition at line 28 of file SysProcStat.h.

◆ cutime

long int Gaudi::SysProcStat::cutime

Definition at line 28 of file SysProcStat.h.

◆ endcode

long unsigned Gaudi::SysProcStat::endcode

Definition at line 26 of file SysProcStat.h.

◆ exit_signal

int Gaudi::SysProcStat::exit_signal

Definition at line 25 of file SysProcStat.h.

◆ flags

long unsigned Gaudi::SysProcStat::flags

Definition at line 26 of file SysProcStat.h.

◆ itrealvalue

long int Gaudi::SysProcStat::itrealvalue

Definition at line 28 of file SysProcStat.h.

◆ kstkeip

long unsigned Gaudi::SysProcStat::kstkeip

Definition at line 27 of file SysProcStat.h.

◆ kstkesp

long unsigned Gaudi::SysProcStat::kstkesp

Definition at line 27 of file SysProcStat.h.

◆ majflt

long unsigned Gaudi::SysProcStat::majflt

Definition at line 26 of file SysProcStat.h.

◆ minflt

long unsigned Gaudi::SysProcStat::minflt

Definition at line 26 of file SysProcStat.h.

◆ nice

long int Gaudi::SysProcStat::nice

Definition at line 28 of file SysProcStat.h.

◆ nswap

long unsigned Gaudi::SysProcStat::nswap

Definition at line 27 of file SysProcStat.h.

◆ num_threads

long int Gaudi::SysProcStat::num_threads

Definition at line 28 of file SysProcStat.h.

◆ pgrp

int Gaudi::SysProcStat::pgrp

Definition at line 25 of file SysProcStat.h.

◆ pid

int Gaudi::SysProcStat::pid

Definition at line 25 of file SysProcStat.h.

◆ ppid

int Gaudi::SysProcStat::ppid

Definition at line 25 of file SysProcStat.h.

◆ priority

long int Gaudi::SysProcStat::priority

Definition at line 28 of file SysProcStat.h.

◆ processor

int Gaudi::SysProcStat::processor

Definition at line 25 of file SysProcStat.h.

◆ rlim

long unsigned Gaudi::SysProcStat::rlim

Definition at line 26 of file SysProcStat.h.

◆ rss

long int Gaudi::SysProcStat::rss

Definition at line 28 of file SysProcStat.h.

◆ session

int Gaudi::SysProcStat::session

Definition at line 25 of file SysProcStat.h.

◆ sigcatch

long unsigned Gaudi::SysProcStat::sigcatch

Definition at line 27 of file SysProcStat.h.

◆ sigingore

long unsigned Gaudi::SysProcStat::sigingore

Definition at line 27 of file SysProcStat.h.

◆ signal

long unsigned Gaudi::SysProcStat::signal

Definition at line 27 of file SysProcStat.h.

◆ startcode

long unsigned Gaudi::SysProcStat::startcode

Definition at line 26 of file SysProcStat.h.

◆ startime

long unsigned Gaudi::SysProcStat::startime

Definition at line 26 of file SysProcStat.h.

◆ startstack

long unsigned Gaudi::SysProcStat::startstack

Definition at line 27 of file SysProcStat.h.

◆ state

char Gaudi::SysProcStat::state

Definition at line 29 of file SysProcStat.h.

◆ stime

long unsigned Gaudi::SysProcStat::stime

Definition at line 26 of file SysProcStat.h.

◆ time

long Gaudi::SysProcStat::time

Definition at line 31 of file SysProcStat.h.

◆ tpgid

int Gaudi::SysProcStat::tpgid

Definition at line 25 of file SysProcStat.h.

◆ tty_nr

int Gaudi::SysProcStat::tty_nr

Definition at line 25 of file SysProcStat.h.

◆ utime

long unsigned Gaudi::SysProcStat::utime

Definition at line 26 of file SysProcStat.h.

◆ vsize

long unsigned Gaudi::SysProcStat::vsize

Definition at line 26 of file SysProcStat.h.

◆ wchan

long unsigned Gaudi::SysProcStat::wchan

Definition at line 27 of file SysProcStat.h.


The documentation for this class was generated from the following files:
Gaudi::SysProcStat::cstime
long int cstime
Definition: SysProcStat.h:28
Gaudi::SysProcStat::cmajflt
long unsigned cmajflt
Definition: SysProcStat.h:26
Gaudi::SysProcStat::sigingore
long unsigned sigingore
Definition: SysProcStat.h:27
Gaudi::SysProcStat::pid
int pid
Definition: SysProcStat.h:25
Gaudi::SysProcStat::state
char state
Definition: SysProcStat.h:29
Gaudi::SysProcStat::utime
long unsigned utime
Definition: SysProcStat.h:26
Gaudi::SysProcStat::processor
int processor
Definition: SysProcStat.h:25
Gaudi::SysProcStat::rlim
long unsigned rlim
Definition: SysProcStat.h:26
Gaudi::SysProcStat::startcode
long unsigned startcode
Definition: SysProcStat.h:26
Gaudi::SysProcStat::signal
long unsigned signal
Definition: SysProcStat.h:27
Gaudi::SysProcStat::time
long time
Definition: SysProcStat.h:31
std::fscanf
T fscanf(T... args)
Gaudi::SysProcStat::minflt
long unsigned minflt
Definition: SysProcStat.h:26
Gaudi::SysProcStat::cnswap
long unsigned cnswap
Definition: SysProcStat.h:27
Gaudi::SysProcStat::rss
long int rss
Definition: SysProcStat.h:28
Gaudi::SysProcStat::tpgid
int tpgid
Definition: SysProcStat.h:25
Gaudi::SysProcStat::kstkeip
long unsigned kstkeip
Definition: SysProcStat.h:27
Gaudi::SysProcStat::stime
long unsigned stime
Definition: SysProcStat.h:26
compareOutputFiles.par
par
Definition: compareOutputFiles.py:477
Gaudi::SysProcStat::session
int session
Definition: SysProcStat.h:25
Gaudi::SysProcStat::cminflt
long unsigned cminflt
Definition: SysProcStat.h:26
std::fclose
T fclose(T... args)
Gaudi::SysProcStat::exit_signal
int exit_signal
Definition: SysProcStat.h:25
Gaudi::SysProcStat::vsize
long unsigned vsize
Definition: SysProcStat.h:26
Gaudi::SysProcStat::kstkesp
long unsigned kstkesp
Definition: SysProcStat.h:27
Gaudi::SysProcStat::cutime
long int cutime
Definition: SysProcStat.h:28
std::fopen
T fopen(T... args)
Gaudi::SysProcStat::flags
long unsigned flags
Definition: SysProcStat.h:26
Gaudi::SysProcStat::comm
char comm[128]
Definition: SysProcStat.h:29
Gaudi::SysProcStat::blocked
long unsigned blocked
Definition: SysProcStat.h:27
Gaudi::SysProcStat::num_threads
long int num_threads
Definition: SysProcStat.h:28
Gaudi::SysProcStat::priority
long int priority
Definition: SysProcStat.h:28
Gaudi::SysProcStat::sigcatch
long unsigned sigcatch
Definition: SysProcStat.h:27
Gaudi::SysProcStat::majflt
long unsigned majflt
Definition: SysProcStat.h:26
Gaudi::SysProcStat::nswap
long unsigned nswap
Definition: SysProcStat.h:27
Gaudi::SysProcStat::wchan
long unsigned wchan
Definition: SysProcStat.h:27
Gaudi::SysProcStat::pgrp
int pgrp
Definition: SysProcStat.h:25
Gaudi::SysProcStat::tty_nr
int tty_nr
Definition: SysProcStat.h:25
Gaudi::SysProcStat::startstack
long unsigned startstack
Definition: SysProcStat.h:27
Gaudi::SysProcStat::endcode
long unsigned endcode
Definition: SysProcStat.h:26
Gaudi::SysProcStat::itrealvalue
long int itrealvalue
Definition: SysProcStat.h:28
Gaudi::SysProcStat::ppid
int ppid
Definition: SysProcStat.h:25
Gaudi::SysProcStat::update
virtual int update()
Definition: SysProcStat.cpp:29
Gaudi::SysProcStat::startime
long unsigned startime
Definition: SysProcStat.h:26
Gaudi::SysProcStat::nice
long int nice
Definition: SysProcStat.h:28