search for: load_averag

Displaying 7 results from an estimated 7 matches for "load_averag".

Did you mean: load_average
2010 Apr 21
1
[PATCH matahari] Created a new platform-abstraction layer named Platform.
...started = true; + } + } + else + { + if(name == "model name") set_processor_model(value); + } + } + } + input.close(); + } +} + +double +LinuxPlatform::get_load_average() const +{ + double load_average; + ifstream input; + + input.open("/proc/loadavg", ios::in); + input >> load_average; + input.close(); + + return load_average; +} diff --git a/src/linux_platform.h b/src/linux_platform.h new file mode 100644 index 0000000..13116df --- /dev/nu...
2010 Mar 22
1
Resend with loadavg as a statistic...
After some feedback from Slow, mainly about the load_average API being a method rather than an ongoing statistic. So I've converted the code over to instead update the load average statistic on a regular basis.
2010 May 24
0
[PATCH matahari] Moves the CPU properties into the Host API space.
...{ - if(name == "model name") set_processor_model(value); + if(name == "model name") setCPUModel(value); } } } @@ -109,7 +109,7 @@ LinuxPlatform::LinuxPlatform() } double -LinuxPlatform::get_load_average() const +LinuxPlatform::getLoadAverage() const { double load_average; ifstream input; diff --git a/src/linux_platform.h b/src/linux_platform.h index 095bc08..a66cbe4 100644 --- a/src/linux_platform.h +++ b/src/linux_platform.h @@ -32,7 +32,7 @@ class LinuxPlatform : public Platform Linux...
2010 Apr 26
0
[PATCH matahari] Created the NetworkDevice agent.
...t;iostream> +#include <dirent.h> +#include <net/if.h> #include <pcre.h> #include <stdexcept> +#include <string.h> +#include <sys/ioctl.h> // TODO remove this wrapper once rhbz#583747 is fixed extern "C" { @@ -115,3 +120,68 @@ LinuxPlatform::get_load_average() const return load_average; } + +vector<NetworkDeviceAgent> +LinuxPlatform::get_network_devices() const +{ + vector<NetworkDeviceAgent> result; + + DIR* entries = opendir("/sys/class/net"); + + if(entries) + { + struct udev* udev = udev_new(); + struct...
2010 Apr 15
1
[PATCH matahari] Refactored the Host agent.
...tWrapper::doLoop(void) -{ - // Someday we might update statistics too! - while(1) + // setup the nic objects + for(vector<NICWrapper*>::iterator iter = nics.begin(); + iter != nics.end(); + iter++) { - // update all statistics - processors.update_load_averages(); - sleep(5); - } -} - -void HostWrapper::setupQMFObjects(ManagementAgent *agent) -{ - // Set up Host object - mgmt_object = new _qmf::Host(agent, this); - agent->addObject(mgmt_object); - syncQMFHostObject(); - - processors.setup(agent, this); - - // Iterate ove...
2010 Apr 26
2
Patch supercedes previous patch...
In looking at the code I realized that the last of the HAL depenencies were removed with this patch. So, I'm pushing an updated patch that contains none of the HAL code in it.
2010 Apr 19
1
[PATCH matahari] Removes all code for the previous CPUWrapper class.
...amp;getCPUList(void) { return cpus; } const vector<NICWrapper*> &getNICList(void) { return nics; } // Main Loop diff --git a/src/schema.xml b/src/schema.xml index f9c6f6b..e6b54db 100644 --- a/src/schema.xml +++ b/src/schema.xml @@ -23,22 +23,6 @@ <statistic name="load_average" type="float" desc="The processing load average." /> </class> - <class name="CPU"> - - <property name="host" type="objId" access="RO" desc="Host that this cpu belongs to" index="y"...