I've a need to track CPU speeds...or some semblance of them.
Currently, the cpu_speed metric is hard-coded as a 'zero' slope metric
(see gmond/modules/cpu/mod_cpu.c).  Can anyone think of a problem with
this patch?  Setting aside, for the moment, just how how to handle
multi-core...


Index: gmond/modules/cpu/mod_cpu.c
===================================================================
--- gmond/modules/cpu/mod_cpu.c (revision 2294)
+++ gmond/modules/cpu/mod_cpu.c (working copy)
@@ -66,7 +66,7 @@
 static Ganglia_25metric cpu_metric_info[] =
 {
     {0, "cpu_num",    1200, GANGLIA_VALUE_UNSIGNED_SHORT, "CPUs",
"zero", "%hu",  UDP_HEADER_SIZE+8, "Total number of CPUs"},
-    {0, "cpu_speed",  1200, GANGLIA_VALUE_UNSIGNED_INT,   "MHz",
"zero", "%u",  UDP_HEADER_SIZE+8, "CPU Speed in terms of MHz"},
+    {0, "cpu_speed",  1200, GANGLIA_VALUE_UNSIGNED_INT,   "MHz",
"both", "%u",  UDP_HEADER_SIZE+8, "CPU Speed in terms of MHz"},
     {0, "cpu_user",     90, GANGLIA_VALUE_FLOAT,          "%",
"both", "%.1f", UDP_HEADER_SIZE+8, "Percentage of CPU utilization that
occurred while executing at the user level"},
     {0, "cpu_nice",     90, GANGLIA_VALUE_FLOAT,          "%",
"both", "%.1f", UDP_HEADER_SIZE+8, "Percentage of CPU utilization that
occurred while executing at the user level with nice priority"},
     {0, "cpu_system",   90, GANGLIA_VALUE_FLOAT,          "%",
"both", "%.1f", UDP_HEADER_SIZE+8, "Percentage of CPU utilization that
occurred while executing at the system level"},


-- 
Jesse Becker
Every cloud has a silver lining, except for the mushroom-shaped ones,
which come lined with strontium-90.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general

Reply via email to