#include <LocDynamicInfo.hpp>
Collaboration diagram for LocDynamicInfo:
Public Member Functions | |
LocDynamicInfo (LocStaticInfo &_lsi, float threshold) | |
bool | hadSignificantChange () |
long | getFreeRAM () const |
long | getFreeSwap () const |
long | getFsFree () const |
long | getFilesFree () const |
long | getFsTotal () const |
long | getFilesTotal () const |
const char * | getCpuUsage () const |
Private Member Functions | |
void | update () |
void | testChange () |
string | strUtilization () const |
Private Attributes | |
long | freeRAM |
long | freeSwap |
long | fsFree |
long | filesFree |
long | fsTotal |
long | filesTotal |
float | currCpuUsage |
long | prevFreeRAM |
long | prevFreeSwap |
long | prevFsFree |
long | prevFilesFree |
long | prevFsTotal |
long | prevFilesTotal |
float | prevCpuUsage |
float | threshold |
LocStaticInfo & | lsi |
CpuUsage & | cpuUsage |
LocDynamicInfo queries the underlying OS for dynamic machine information, such as idle percentage of CPU, disk and memory. Currently, it only works in Linux, mainly due to the fact that there is no standardized way of getting this kind of information across different platforms.
|
Builds a LocDynamicInfo object
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Reports if a significant change in resource availability has ocurred. A significant change is considered to be any variation in resource availability (CPU,Phys Memory, Swap) that exceeds the threshold (the one set at construction time). |
|
get CPU utilization.
|
|
Tests if a significant change happened. |
|
Updates dynamic information. |
|
Reference to a CpuUsage measuring object |
|
holds current averaged CPU utilization |
|
free File nodes in filesystem |
|
total filenodes in filesystem |
|
free RAM space |
|
free swap space |
|
free disk space |
|
total available disk space(for the user executing the LRM) |
|
reference to static info (to calculate percentages) |
|
previously averaged CPU utilization |
|
previously available filenodes |
|
previously available filenodes in the filesystem |
|
RAM availability at previous measurement |
|
swap memory availability at previous measurement |
|
free disk space at previous measurement |
|
previously available disk space |
|
percentage that makes a change significant |