Displaying 6 results from an estimated 6 matches for "update_load_averag".
Did you mean:
update_load_averages
2010 Apr 15
1
[PATCH matahari] Refactored the Host agent.
...oid HostWrapper::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 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 19
2
Squashed commits...
Refactoring the previous patch ended up creating two deltas. This
patch pushes them both together into a single commit.
2010 Apr 21
1
[PATCH matahari] Created a new platform-abstraction layer named Platform.
...et_model(model);
- management_object->set_cores(core_count);
+ management_object->set_model(platform->get_processor_model());
+ management_object->set_cores(platform->get_number_of_cores());
}
void
@@ -121,12 +45,5 @@ ProcessorsAgent::update(void) const
void
ProcessorsAgent::update_load_averages(void) const
{
- double load_average;
- ifstream input;
-
- input.open("/proc/loadavg", ios::in);
- input >> load_average;
- input.close();
-
- management_object->set_load_average(load_average);
+ management_object->set_load_average(Platform::instance()->get_load_a...
2010 Apr 26
0
[PATCH matahari] Created the NetworkDevice agent.
...ors.h
+++ b/src/processors.h
@@ -1,3 +1,6 @@
+#ifndef __PROCESSORS_H
+#define __PROCESSORS_H
+
/* processor.h - Copyright (C) 2010 Red Hat, Inc.
* Written by Darryl L. Pierce <dpierce at redhat.com>
*
@@ -48,3 +51,5 @@ class ProcessorsAgent : public Manageable
// agent methods
void update_load_averages(void) const;
};
+
+#endif
diff --git a/src/schema.xml b/src/schema.xml
index 890e4ed..206e39b 100644
--- a/src/schema.xml
+++ b/src/schema.xml
@@ -23,21 +23,13 @@
<statistic name="load_average" type="float" desc="The processing load average." />
</c...
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.