libutil++  1.9.3
 All Classes Functions Variables
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sella::util::Process Class Reference

Public Member Functions

void update (void) throw (ProcessException)
 
uint64_t getUpdateIntervalUsec (void) const throw ()
 
uint64_t getUpdateIntervalSec (void) const throw ()
 
uint64_t getStartTime (void) const throw ()
 
uint64_t getUptime (void) const throw ()
 
int getCPU (bool scale=false) const throw ()
 
int getUserCPU (bool scale=false) const throw ()
 
int getSystemCPU (bool scale=false) const throw ()
 
int getMemory (void) const throw ()
 
char getState (void) const throw ()
 
uint64_t getFDs (void) const throw ()
 
uint64_t getFDSize (void) const throw ()
 
uint64_t getVMPeak (void) const throw ()
 
uint64_t getVMSize (void) const throw ()
 
uint64_t getLocked (void) const throw ()
 
uint64_t getRSSHighWaterMark (void) const throw ()
 
uint64_t getRSS (void) const throw ()
 
uint64_t getData (void) const throw ()
 
uint64_t getStack (void) const throw ()
 
uint64_t getEXE (void) const throw ()
 
uint64_t getLib (void) const throw ()
 
uint64_t getPTE (void) const throw ()
 
uint64_t getSwap (void) const throw ()
 
uint64_t getThreads (void) const throw ()
 
uint64_t getVoluntaryContextSwitch (void) const throw ()
 
uint64_t getNonVoluntaryContextSwitch (void) const throw ()
 
uint64_t getBytesRead (void) const throw ()
 
uint64_t getBytesWrite (void) const throw ()
 
uint64_t getReadSyscall (void) const throw ()
 
uint64_t getWriteSyscall (void) const throw ()
 
uint64_t getBytesReadStorage (void) const throw ()
 
uint64_t getBytesWriteStorage (void) const throw ()
 
int64_t getCancelledBytesWrite (void) const throw ()
 
uint64_t getBlockIOWait (void) const throw ()
 
int getClockTicks (void) const throw ()
 
int getProcessorCount (void) const throw ()
 
uint64_t getSystemUptime (void) const throw ()
 
uint64_t getSystemLoadAverage (int min=1) const throw ()
 
uint64_t getSystemMemory (void) const throw ()
 
uint64_t getSystemFree (void) const throw ()
 
uint64_t getSystemShared (void) const throw ()
 
uint64_t getSystemBuffer (void) const throw ()
 
uint64_t getSystemSwap (void) const throw ()
 
uint64_t getSystemProcesses (void) const throw ()
 
uint64_t getSystemTotalHigh (void) const throw ()
 
uint64_t getSystemFreeHigh (void) const throw ()
 
uint64_t getSystemMemUnitSize (void) const throw ()
 

Static Public Member Functions

static std::string getBaseName (void) throw ()
 
static std::string getDirName (void) throw ()
 
static std::string getPath (void) throw ()
 
static void setName (const std::string &name) throw (ProcessException)
 
static std::string getName (void) throw (ProcessException)
 
static void setThreadName (pthread_t tid, const std::string &name) throw (ProcessException)
 
static std::string getThreadName (pthread_t tid) throw (ProcessException)
 
static void setTitle (const std::string &title) throw (ProcessException)
 
static pid_t getPID (void) throw ()
 
static pid_t getParentPID (void) throw ()
 
static bool isRunning (pid_t pid) throw ()
 
static uint64_t getStartTime (pid_t pid) throw (ProcessException)
 
static uint64_t getBlockIOWait (pid_t pid) throw (ProcessException)
 
static std::string runCommand (const std::string &command) throw (ProcessException)
 
static std::string stackTrace (const std::string &executableFilename) throw ()
 
static void setNice (int niceness, int which=IOPRIO_WHO_PGRP, int who=0) throw (ProcessException)
 
static int getNice (int which=IOPRIO_WHO_PGRP, int who=0) throw (ProcessException)
 
static void setIONice (int ioclass=IOPRIO_CLASS_BE, int level=7, int which=IOPRIO_WHO_PGRP, int who=0) throw (ProcessException)
 
static int getIONice (int &ioclass, int &level, int which=IOPRIO_WHO_PROCESS, int who=0) throw (ProcessException)
 

Protected Member Functions

void updateCPU (void) throw ()
 
void updateFDs (void) throw (ProcessException)
 
void updateStats (void) throw (ProcessException)
 
void updateIOStats (void) throw (ProcessException)
 

Protected Attributes

std::vector< uint64_t > stats
 
std::vector< uint64_t > iostats
 
int cpu
 
int userCPU
 
int sysCPU
 
int ncpu
 
int jiffies
 
int fds
 
struct timespec prev last
 
clock_t lastCPU
 
clock_t lastUserCPU
 
clock_t lastSysCPU
 
struct sysinfo info
 

Detailed Description

Definition at line 54 of file Process.h.


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