Greetings list,
I'm running a Power7 Linux cluster where we allow users to change the
number of active threads on each core on a per-job basis. I would like
to track these changes by allowing cpu_num to be a variable metric
rather than a check-once metric. I've found an if statement in the
cpu_num_func function in libmetrics/linux/metrics.c that seems to
redundantly prevent the function from working more than once.
cpu_num_func ( void )
{
static int cpu_num = 0;
g_val_t val;
/* Only need to do this once */
if (! cpu_num) {
/* We'll use _SC_NPROCESSORS_ONLN to get operating cpus */
cpu_num = get_nprocs();
}
val.uint16 = cpu_num;
return val;
}
I've got a working setup monitoring cpu count changes on the fly
simply by commenting out the if statement above. I just wanted to put
a question to the list and developers whether there's a reason for the
if statement when the default configuration sets this metric as a
check_once. If not, I'd like to request a patch be accepted to remove
the if statement.
Thank you,
--
Chandler Wilkerson
Rice University
------------------------------------------------------------------------------
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general