search for: get_load_average

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

2010 Mar 22
1
Small change and resend...
This patch includes one small change: the Processors::get_load_average() method is now const since it does not change the object's state.
2010 Mar 16
0
[PATCH] Added the new Processors agent.
...lt;fstream> +#include <sstream> +#include <string> +#include <vector> +#include <stdexcept> + +#include <hal/libhal.h> + +#include <pcre.h> + +#include "hal.h" +#include "processors.h" + +#include "qmf/com/redhat/matahari/ArgsProcessorsGet_load_average.h" + +using namespace std; +namespace _qmf = qmf::com::redhat::matahari; + +extern DBusError dbus_error; + +void +ProcessorsAgent::setup(ManagementAgent* agent) +{ + // setup the management object + management_object = new _qmf::Processors(agent, this); + agent->addObject(management_obje...
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/nul...
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 LinuxP...
2010 Apr 26
0
[PATCH matahari] Created the NetworkDevice agent.
...e <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 d...
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 May 19
2
Squashed commits...
Refactoring the previous patch ended up creating two deltas. This patch pushes them both together into a single commit.