NodeMonitorBase Class Reference
[Fountain master and slave nodesNode Monitoring]

Abstract base class for all node monitoring objects to derive from. More...

#include <NodeMonitor.h>

Inheritance diagram for NodeMonitorBase:

DarwinMonitor LinuxMonitor List of all members.

Public Types

typedef Loki::SmartPtr< NodeMonitorBaseNodeMonitorPtr
 Shorthand for a NodeMonitorBase pointer wrapped inside a SmartPtr object.

Public Member Functions

virtual ~NodeMonitorBase ()=0
 Pure virtual destructor.
virtual int collectDynamicInfo ()=0
 Collect dynamic node information.
int getNumProcs () const
 Get the number of configured processors.
double getTotalRAM (BambooLib::RMAP_UnitType s=BambooLib::MegaByte) const
 Get the amount of configured physical memory.
double getTotalSWAP (BambooLib::RMAP_UnitType s=BambooLib::MegaByte) const
 Get the amount of configured swap space.
double getFreeRAM (BambooLib::RMAP_UnitType s=BambooLib::MegaByte) const
 Get the amount of available physical memory.
double getFreeSWAP (BambooLib::RMAP_UnitType s=BambooLib::MegaByte) const
 Get the amount of available swap space.
double getCPUusage () const
 Get the CPU usage.
const char * getArch () const
 Get the CPU architecture.
const char * getOpSys () const
 Get the operating system.

Static Public Member Functions

static NodeMonitorBasecreate ()
 Static factory creation method.

Protected Member Functions

 NodeMonitorBase ()
 Protected default constructor so NodeMonitorBase objects cannot be created.

Protected Attributes

int numProcs
 Number of processors present.
std::string arch
 CPU architecture.
std::string opsys
 Operating system.
double totalRAM
 Amount of configured physical memory.
double totalSWAP
 Amount of configured virtual memory.
double freeRAM
 Amount of free physical memory.
double freeSWAP
 Amount of free virtual memory.
double cpuUsage
 Represents cpu usage, between 0.0 and 1.0 inclusive.

Private Member Functions

virtual int collectStaticInfo ()=0
 Collect their static node information.
virtual int collectCPUusage ()=0
 Collect their CPU usage information.
 NodeMonitorBase (const NodeMonitorBase &rhs)
 Private copy constructor so we can't slice NodeMonitorBase objects.
NodeMonitorBaseoperator= (const NodeMonitorBase &rhs)
 Private assignment operator so we can't slice NodeMonitorBase objects.

Detailed Description

Abstract base class for all node monitoring objects to derive from.


Member Function Documentation

virtual int NodeMonitorBase::collectDynamicInfo  )  [pure virtual]
 

Collect dynamic node information.

Return values:
int SUCCESS if the dynamic information was successfully collected, FAILURE otherwise

Implemented in DarwinMonitor, and LinuxMonitor.

const char* NodeMonitorBase::getArch  )  const [inline]
 

Get the CPU architecture.

Returns:
the architecture of this node

double NodeMonitorBase::getCPUusage  )  const [inline]
 

Get the CPU usage.

Returns:
the node's CPU usage

double NodeMonitorBase::getFreeRAM BambooLib::RMAP_UnitType  s = BambooLib::MegaByte  )  const
 

Get the amount of available physical memory.

Returns:
the amount of available physical memory
Parameters:
[in] s Units

double NodeMonitorBase::getFreeSWAP BambooLib::RMAP_UnitType  s = BambooLib::MegaByte  )  const
 

Get the amount of available swap space.

Returns:
the amount of available swap space
Parameters:
[in] s Units

int NodeMonitorBase::getNumProcs  )  const [inline]
 

Get the number of configured processors.

Returns:
the number of configured processors

const char* NodeMonitorBase::getOpSys  )  const [inline]
 

Get the operating system.

Returns:
the operating system of this node

double NodeMonitorBase::getTotalRAM BambooLib::RMAP_UnitType  s = BambooLib::MegaByte  )  const
 

Get the amount of configured physical memory.

Returns:
the amount of configured physical memory
Parameters:
[in] s Units

double NodeMonitorBase::getTotalSWAP BambooLib::RMAP_UnitType  s = BambooLib::MegaByte  )  const
 

Get the amount of configured swap space.

Returns:
the amount of configured swap space
Parameters:
[in] s Units


The documentation for this class was generated from the following files:
Generated on Wed Mar 8 14:43:33 2006 for Fountain by  doxygen 1.4.6