diff --git a/src/common/slurm_acct_gather.c b/src/common/slurm_acct_gather.c index 72491ef4472de0cad46e1ddbd7f6c1b8f8cd8153..612d880f8f57e118cc2eadde9e59a629f91803e4 100644 --- a/src/common/slurm_acct_gather.c +++ b/src/common/slurm_acct_gather.c @@ -134,6 +134,23 @@ extern int acct_gather_conf_destroy(void) return SLURM_SUCCESS; } +extern List acct_gather_conf_values(void) +{ + List acct_list = list_create(destroy_config_key_pair); + + /* get acct_gather.conf in each plugin */ + acct_gather_profile_g_conf_values(&acct_list); + acct_gather_infiniband_g_conf_values(&acct_list); + acct_gather_energy_g_conf_values(&acct_list); + acct_gather_filesystem_g_conf_values(&acct_list); + /* ADD MORE HERE */ + /******************************************/ + + list_sort(acct_list, (ListCmpF) sort_key_pairs); + + return acct_list; +} + extern int acct_gather_parse_freq(int type, char *freq) { int freq_int = -1; diff --git a/src/common/slurm_acct_gather.h b/src/common/slurm_acct_gather.h index b4774d0b7728b066a88ae48b01c8b26d6a9f6c96..e17d84cb2a3091af5f1bc2e2a96bfbdd334182fb 100644 --- a/src/common/slurm_acct_gather.h +++ b/src/common/slurm_acct_gather.h @@ -61,6 +61,9 @@ extern bool acct_gather_suspended; extern int acct_gather_conf_init(void); extern int acct_gather_conf_destroy(void); + +/* don't forget to free this */ +extern List acct_gather_conf_values(void); extern int acct_gather_parse_freq(int type, char *freq); extern void acct_gather_suspend_poll(void); extern void acct_gather_resume_poll(void); diff --git a/src/common/slurm_acct_gather_energy.c b/src/common/slurm_acct_gather_energy.c index 15f9cac38cb375f2289d5ad9bf21376467c51c16..cf39704e355086e72491f7c8065d9f211a77c547 100644 --- a/src/common/slurm_acct_gather_energy.c +++ b/src/common/slurm_acct_gather_energy.c @@ -61,7 +61,7 @@ typedef struct slurm_acct_gather_energy_ops { void (*conf_options) (s_p_options_t **full_options, int *full_options_cnt); void (*conf_set) (s_p_hashtbl_t *tbl); - List (*get_config) (void); + void (*conf_values) (List *data); } slurm_acct_gather_energy_ops_t; /* * These strings must be kept in the same order as the fields @@ -73,7 +73,7 @@ static const char *syms[] = { "acct_gather_energy_p_set_data", "acct_gather_energy_p_conf_options", "acct_gather_energy_p_conf_set", - "acct_gather_energy_p_get_config", + "acct_gather_energy_p_conf_values", }; static slurm_acct_gather_energy_ops_t ops; @@ -320,15 +320,11 @@ extern void acct_gather_energy_g_conf_set(s_p_hashtbl_t *tbl) (*(ops.conf_set))(tbl); } -extern int acct_gather_energy_g_get_config(void *data) -{ - List *tmp_list = (List *) data; +extern void acct_gather_energy_g_conf_values(void *data) +{ if (slurm_acct_gather_energy_init() < 0) - return SLURM_ERROR; - - *tmp_list = (*(ops.get_config))(); - - return SLURM_SUCCESS; + return; + (*(ops.conf_values))(data); } diff --git a/src/common/slurm_acct_gather_energy.h b/src/common/slurm_acct_gather_energy.h index d4bbb010b5c579aac3ddf131c27bb35f51ebb740..9f9b0c2fac32ec1b315acfd428665d0518d7db4b 100644 --- a/src/common/slurm_acct_gather_energy.h +++ b/src/common/slurm_acct_gather_energy.h @@ -91,6 +91,11 @@ extern int acct_gather_energy_startpoll(uint32_t frequency); extern void acct_gather_energy_g_conf_options(s_p_options_t **full_options, int *full_options_cnt); extern void acct_gather_energy_g_conf_set(s_p_hashtbl_t *tbl); -extern int acct_gather_energy_g_get_config(void *data); + +/* Get the values from the plugin that are setup in the .conf + * file. This function should most likely only be called from + * src/common/slurm_acct_gather.c (acct_gather_get_values()) + */ +extern void acct_gather_energy_g_conf_values(void *data); #endif /*__SLURM_ACCT_GATHER_ENERGY_H__*/ diff --git a/src/common/slurm_acct_gather_filesystem.c b/src/common/slurm_acct_gather_filesystem.c index 57ffd98b1193368e5310e80acc682f2a03870c2a..3926b79ea8df512057dfca83a6a6983da3431d4a 100644 --- a/src/common/slurm_acct_gather_filesystem.c +++ b/src/common/slurm_acct_gather_filesystem.c @@ -53,6 +53,7 @@ typedef struct slurm_acct_gather_filesystem_ops { void (*conf_options) (s_p_options_t **full_options, int *full_options_cnt); void (*conf_set) (s_p_hashtbl_t *tbl); + void (*conf_values) (List *data); } slurm_acct_gather_filesystem_ops_t; /* * These strings must be kept in the same order as the fields @@ -62,6 +63,7 @@ static const char *syms[] = { "acct_gather_filesystem_p_node_update", "acct_gather_filesystem_p_conf_options", "acct_gather_filesystem_p_conf_set", + "acct_gather_filesystem_p_conf_values", }; static slurm_acct_gather_filesystem_ops_t ops; @@ -193,3 +195,12 @@ extern void acct_gather_filesystem_g_conf_set(s_p_hashtbl_t *tbl) (*(ops.conf_set))(tbl); } + + +extern void acct_gather_filesystem_g_conf_values(void *data) +{ + if (acct_gather_filesystem_init() < 0) + return; + + (*(ops.conf_values))(data); +} diff --git a/src/common/slurm_acct_gather_filesystem.h b/src/common/slurm_acct_gather_filesystem.h index d0acd499f50281bb6ff83a62ad5e655976698904..16838f099db7a25bc3b03dbf6e0d693e94dc41a8 100644 --- a/src/common/slurm_acct_gather_filesystem.h +++ b/src/common/slurm_acct_gather_filesystem.h @@ -94,5 +94,11 @@ extern void acct_gather_filesystem_g_conf_options(s_p_options_t **full_options, */ extern void acct_gather_filesystem_g_conf_set(s_p_hashtbl_t *tbl); +/* Get the values from the plugin that are setup in the .conf + * file. This function should most likely only be called from + * src/common/slurm_acct_gather.c (acct_gather_get_values()) + */ +extern void acct_gather_filesystem_g_conf_values(void *data); + #endif /*__SLURM_ACCT_GATHER_FILESYSTEM_H__*/ diff --git a/src/common/slurm_acct_gather_infiniband.c b/src/common/slurm_acct_gather_infiniband.c index 1b21c5b7818536918d4393f7f19ae9f4608ce329..15c7b4f7e0a4f98fe595607d999821111501ebde 100644 --- a/src/common/slurm_acct_gather_infiniband.c +++ b/src/common/slurm_acct_gather_infiniband.c @@ -54,7 +54,7 @@ typedef struct slurm_acct_gather_infiniband_ops { void (*conf_options) (s_p_options_t **full_options, int *full_options_cnt); void (*conf_set) (s_p_hashtbl_t *tbl); - List (*get_config) (void); + void (*conf_values) (List *data); } slurm_acct_gather_infiniband_ops_t; /* * These strings must be kept in the same order as the fields @@ -64,7 +64,7 @@ static const char *syms[] = { "acct_gather_infiniband_p_node_update", "acct_gather_infiniband_p_conf_options", "acct_gather_infiniband_p_conf_set", - "acct_gather_infiniband_p_get_config", + "acct_gather_infiniband_p_conf_values", }; static slurm_acct_gather_infiniband_ops_t ops; @@ -198,15 +198,10 @@ extern void acct_gather_infiniband_g_conf_set(s_p_hashtbl_t *tbl) (*(ops.conf_set))(tbl); } -extern int acct_gather_infiniband_g_get_config(void *data) +extern void acct_gather_infiniband_g_conf_values(void *data) { - List *tmp_list = (List *) data; - if (acct_gather_infiniband_init() < 0) - return SLURM_ERROR; - - *tmp_list = (*(ops.get_config))(); - - return SLURM_SUCCESS; + return; + (*(ops.conf_values))(data); } diff --git a/src/common/slurm_acct_gather_infiniband.h b/src/common/slurm_acct_gather_infiniband.h index 49a1020ad3a263a319e23cfbbbe7fec5c24168b5..ab08e8ec1a43a5139271ca75c97d73bbe890bb29 100644 --- a/src/common/slurm_acct_gather_infiniband.h +++ b/src/common/slurm_acct_gather_infiniband.h @@ -95,7 +95,11 @@ extern void acct_gather_infiniband_g_conf_options(s_p_options_t **full_options, */ extern void acct_gather_infiniband_g_conf_set(s_p_hashtbl_t *tbl); -extern int acct_gather_infiniband_g_get_config(void *data); +/* Get the values from the plugin that are setup in the .conf + * file. This function should most likely only be called from + * src/common/slurm_acct_gather.c (acct_gather_get_values()) + */ +extern void acct_gather_infiniband_g_conf_values(void *data); #endif /*__SLURM_ACCT_GATHER_INFINIBAND_H__*/ diff --git a/src/common/slurm_acct_gather_profile.c b/src/common/slurm_acct_gather_profile.c index ac9ce944a35bc4f541de40a1489b185e4ea5be9f..008e3aa56eb5b08e44ab0e0d2eb285110c1cee62 100644 --- a/src/common/slurm_acct_gather_profile.c +++ b/src/common/slurm_acct_gather_profile.c @@ -70,7 +70,7 @@ typedef struct slurm_acct_gather_profile_ops { int (*task_start) (uint32_t); int (*task_end) (pid_t); int (*add_sample_data) (uint32_t, void*); - List (*get_config) (void); + void (*conf_values) (List *data); } slurm_acct_gather_profile_ops_t; @@ -87,7 +87,7 @@ static const char *syms[] = { "acct_gather_profile_p_task_start", "acct_gather_profile_p_task_end", "acct_gather_profile_p_add_sample_data", - "acct_gather_profile_p_get_config", + "acct_gather_profile_p_conf_values", }; acct_gather_profile_timer_t acct_gather_profile_timer[PROFILE_CNT]; @@ -552,17 +552,10 @@ extern int acct_gather_profile_g_add_sample_data(uint32_t type, void* data) return retval; } -extern int acct_gather_profile_g_get_config(void *data) +extern void acct_gather_profile_g_conf_values(void *data) { - List *tmp_list = (List *) data; - if (acct_gather_profile_init() < 0) - return SLURM_ERROR; - - *tmp_list = (*(ops.get_config))(); - - return SLURM_SUCCESS; - - + return; + (*(ops.conf_values))(data); } diff --git a/src/common/slurm_acct_gather_profile.h b/src/common/slurm_acct_gather_profile.h index 57469317356514bbd3cd1b12f6c066125a561666..ae3852180463f54b57855933646328981a4eabf4 100644 --- a/src/common/slurm_acct_gather_profile.h +++ b/src/common/slurm_acct_gather_profile.h @@ -194,6 +194,10 @@ extern int acct_gather_profile_g_task_end(pid_t taskpid); */ extern int acct_gather_profile_g_add_sample_data(uint32_t type, void *data); -extern int acct_gather_profile_g_get_config(void *data); +/* Get the values from the plugin that are setup in the .conf + * file. This function should most likely only be called from + * src/common/slurm_acct_gather.c (acct_gather_get_values()) + */ +extern void acct_gather_profile_g_conf_values(void *data); #endif /*__SLURM_ACCT_GATHER_PROFILE_H__*/ diff --git a/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c b/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c index 915968935b713ee99f627a0b841bb990a2f7ffb5..d8d38caba7b6e1cea12ab31b90896e9db744af95 100644 --- a/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c +++ b/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi.c @@ -1038,153 +1038,181 @@ extern void acct_gather_energy_p_conf_set(s_p_hashtbl_t *tbl) verbose("%s loaded", plugin_name); } -extern List acct_gather_energy_p_get_config(void) +extern void acct_gather_energy_p_conf_values(List *data) { config_key_pair_t *key_pair; - List acct_list = list_create(destroy_config_key_pair); + + xassert(*data); key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("EnergyIPMIDriverType"); - key_pair->value = xstrdup(&slurm_ipmi_conf.driver_type); - list_append(acct_list, key_pair); + key_pair->value = xstrdup_printf("%u", slurm_ipmi_conf.driver_type); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIDisableAutoProbe"); - key_pair->value = xstrdup(&slurm_ipmi_conf.disbable_auto_probe); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIDisableAutoProbe"); + key_pair->value = xstrdup_printf("%u", + slurm_ipmi_conf.disable_auto_probe); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIDriverAddress"); - key_pair->value = xstrdup(&slurm_ipmi_conf.driver_address); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIDriverAddress"); + key_pair->value = xstrdup_printf("%u", slurm_ipmi_conf.driver_address); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIRegisterSpacing"); - key_pair->value = xstrdup(&slurm_ipmi_conf.register_spacing); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIRegisterSpacing"); + key_pair->value = xstrdup_printf("%u", + slurm_ipmi_conf.register_spacing); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIDriverDevice"); - key_pair->value = xstrdup(&slurm_ipmi_conf.driver_device); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIDriverDevice"); + key_pair->value = xstrdup(slurm_ipmi_conf.driver_device); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIProtocolVersion"); - key_pair->value = xstrdup(&slurm_ipmi_conf.protocool_version); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIProtocolVersion"); + key_pair->value = xstrdup_printf("%u", + slurm_ipmi_conf.protocol_version); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIUsername"); - key_pair->value = xstrdup(&slurm_ipmi_conf.username); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIUsername"); + key_pair->value = xstrdup(slurm_ipmi_conf.username); + list_append(*data, key_pair); /* Don't give out the password */ /* key_pair = xmalloc(sizeof(config_key_pair_t)); */ - /* key_pair->name =xstrdup("EnergyIPMIPassword"); */ - /* key_pair->value = xstrdup(&slurm_ipmi_conf.password); */ - /* list_append(acct_list, key_pair); */ + /* key_pair->name = xstrdup("EnergyIPMIPassword"); */ + /* key_pair->value = xstrdup(slurm_ipmi_conf.password); */ + /* list_append(*data, key_pair); */ key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIPrivilegeLevel"); - key_pair->value = xstrdup(&slurm_ipmi_conf.privilege_level); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIPrivilegeLevel"); + key_pair->value = xstrdup_printf("%u", slurm_ipmi_conf.privilege_level); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIAuthenticationType"); - key_pair->value = xstrdup(&slurm_ipmi_conf.authentication_type); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIAuthenticationType"); + key_pair->value = xstrdup_printf("%u", + slurm_ipmi_conf.authentication_type); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMICipherSuiteId"); - key_pair->value = xstrdup(&slurm_ipmi_conf.cipher_suite_id); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMICipherSuiteId"); + key_pair->value = xstrdup_printf("%u", slurm_ipmi_conf.cipher_suite_id); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMISessionTimeout"); - key_pair->value = xstrdup(&slurm_ipmi_conf.session_timeout); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMISessionTimeout"); + key_pair->value = xstrdup_printf("%u", slurm_ipmi_conf.session_timeout); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIRetransmissionTimeout"); - key_pair->value = xstrdup(&slurm_ipmi_conf.retransmission_timeout); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIRetransmissionTimeout"); + key_pair->value = xstrdup_printf( + "%u", slurm_ipmi_conf.retransmission_timeout); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIWorkaroundFlags"); - key_pair->value = xstrdup(&slurm_ipmi_conf.workaround_flags); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIWorkaroundFlags"); + key_pair->value = xstrdup_printf( + "%u", slurm_ipmi_conf.workaround_flags); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIRereadSdrCache"); - key_pair->value = xstrdup(&slurm_ipmi_conf.reread_sdr_cache); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIRereadSdrCache"); + key_pair->value = xstrdup(slurm_ipmi_conf.reread_sdr_cache + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIIgnoreNonInterpretableSensors"); - key_pair->value = xstrdup(&slurm_ipmi_conf. - ignore_non_interpretable_sensors); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIIgnoreNonInterpretableSensors"); + key_pair->value = xstrdup( + slurm_ipmi_conf.ignore_non_interpretable_sensors + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIBridgeSensors"); - key_pair->value = xstrdup(&slurm_ipmi_conf.bridge_sensors); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIBridgeSensors"); + key_pair->value = xstrdup(slurm_ipmi_conf.bridge_sensors + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIInterpretOemData"); - key_pair->value = xstrdup(&slurm_ipmi_conf.interpret_oem_data); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIInterpretOemData"); + key_pair->value = xstrdup(slurm_ipmi_conf.interpret_oem_data + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMISharedSensors"); - key_pair->value = xstrdup(&slurm_ipmi_conf.shared_sensors); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMISharedSensors"); + key_pair->value = xstrdup(slurm_ipmi_conf.shared_sensors + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIDiscreteReading"); - key_pair->value = xstrdup(&slurm_ipmi_conf.discrete_reading); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIDiscreteReading"); + key_pair->value = xstrdup(slurm_ipmi_conf.discrete_reading + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIIgnoreScanningDisabled"); - key_pair->value = xstrdup(&slurm_ipmi_conf.ignore_scanning_disabled); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIIgnoreScanningDisabled"); + key_pair->value = xstrdup(slurm_ipmi_conf.ignore_scanning_disabled + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIAssumeBmcOwner"); - key_pair->value = xstrdup(&slurm_ipmi_conf.assume_bmc_owner); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIAssumeBmcOwner"); + key_pair->value = xstrdup(slurm_ipmi_conf.assume_bmc_owner + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIEntitySensorNames"); - key_pair->value = xstrdup(&slurm_ipmi_conf.entity_sensor_names); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIEntitySensorNames"); + key_pair->value = xstrdup(slurm_ipmi_conf.entity_sensor_names + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIFrequency"); - key_pair->value = xstrdup(&slurm_ipmi_conf.freq); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIFrequency"); + key_pair->value = xstrdup_printf("%u", slurm_ipmi_conf.freq); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMICalcAdjustment"); - key_pair->value = xstrdup(&slurm_ipmi_conf.adjustment); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMICalcAdjustment"); + key_pair->value = xstrdup(slurm_ipmi_conf.adjustment + ? "Yes" : "No"); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIPowerSensor"); - key_pair->value = xstrdup(&slurm_ipmi_conf.power_sensor_num); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIPowerSensor"); + key_pair->value = xstrdup_printf( + "%u", slurm_ipmi_conf.power_sensor_num); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMITimeout"); - key_pair->value = xstrdup(&slurm_ipmi_conf.timeout); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMITimeout"); + key_pair->value = xstrdup_printf("%u", slurm_ipmi_conf.timeout); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); - key_pair->name =xstrdup("EnergyIPMIVariable"); - key_pair->value = xstrdup(&slurm_ipmi_conf.variable); - list_append(acct_list, key_pair); + key_pair->name = xstrdup("EnergyIPMIVariable"); + switch (slurm_ipmi_conf.variable) { + case IPMI_MONITORING_SENSOR_TYPE_TEMPERATURE: + key_pair->value = xstrdup("Temp"); + break; + case IPMI_MONITORING_SENSOR_UNITS_WATTS: + key_pair->value = xstrdup("Watts"); + break; + default: + key_pair->value = xstrdup("Unknown"); + break; + } + list_append(*data, key_pair); - return acct_list; + return; } diff --git a/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi_config.h b/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi_config.h index 4acd8ec9e97a455171e0fee0a132ae4a5fe4af81..e104f92c16ba59c15c7da31e744ba5bf35c66a74 100644 --- a/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi_config.h +++ b/src/plugins/acct_gather_energy/ipmi/acct_gather_energy_ipmi_config.h @@ -44,62 +44,13 @@ #define DEFAULT_IPMI_VARIABLE IPMI_MONITORING_SENSOR_UNITS_WATTS typedef struct slurm_ipmi_conf { - /* Options for SLURM IPMI plugin*/ - /* sensor num (only for power) */ - uint32_t power_sensor_num; - /* frequency for ipmi call*/ - uint32_t freq; /* Adjust/approach the consumption * in function of time between ipmi update and read call */ bool adjustment; - /*Timeout for the ipmi thread*/ - uint32_t timeout; - /* Options for IPMI configuration*/ - /* Use a specific in-band driver. - * IPMI_MONITORING_DRIVER_TYPE_KCS = 0x00, - * IPMI_MONITORING_DRIVER_TYPE_SSIF = 0x01, - * IPMI_MONITORING_DRIVER_TYPE_OPENIPMI = 0x02, - * IPMI_MONITORING_DRIVER_TYPE_SUNBMC = 0x03, - * Pass < 0 for default of IPMI_MONITORING_DRIVER_TYPE_KCS.*/ - uint32_t driver_type; - /* Flag informs the library if in-band driver information should be - * probed or not.*/ - uint32_t disable_auto_probe; - /* Use this specified driver address instead of a probed one.*/ - uint32_t driver_address; - /* Use this register space instead of the probed one.*/ - uint32_t register_spacing; - /* Use this driver device for the IPMI driver.*/ - char *driver_device; - /* Out-of-band Communication Configuration */ - /* Indicate the IPMI protocol version to use - * IPMI_MONITORING_PROTOCOL_VERSION_1_5 = 0x00, - * IPMI_MONITORING_PROTOCOL_VERSION_2_0 = 0x01, - * Pass < 0 for default of IPMI_MONITORING_VERSION_1_5.*/ - uint32_t protocol_version; - /* BMC username. Pass NULL ptr for default username. Standard - * default is the null (e.g. empty) username. Maximum length of 16 - * bytes.*/ - char *username; - /* BMC password. Pass NULL ptr for default password. Standard - * default is the null (e.g. empty) password. Maximum length of 20 - * bytes.*/ - char *password; - /* BMC Key for 2-key authentication. Pass NULL ptr to use the - * default. Standard default is the null (e.g. empty) k_g, - * which will use the password as the BMC key. The k_g key need not - * be an ascii string.*/ - unsigned char *k_g; - /* Length of k_g. Necessary b/c k_g may contain null values in its - * key. Maximum length of 20 bytes.*/ - uint32_t k_g_len; - /* privilege level to authenticate with. - * Supported privilege levels: - * 0 = IPMICONSOLE_PRIVILEGE_USER - * 1 = IPMICONSOLE_PRIVILEGE_OPERATOR - * 2 = IPMICONSOLE_PRIVILEGE_ADMIN - * Pass < 0 for default of IPMICONSOLE_PRIVILEGE_ADMIN.*/ - uint32_t privilege_level; + /* Assume the BMC is the sensor owner no matter what. This option + * works around motherboards that incorrectly indicate a non-BMC + * sensor owner (e.g. usually bridging is required).*/ + bool assume_bmc_owner; /* authentication type to use * IPMI_MONITORING_AUTHENTICATION_TYPE_NONE = 0x00, * IPMI_MONITORING_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY = 0x01, @@ -107,6 +58,8 @@ typedef struct slurm_ipmi_conf { * IPMI_MONITORING_AUTHENTICATION_TYPE_MD5 = 0x03, * Pass < 0 for default of IPMI_MONITORING_AUTHENTICATION_TYPE_MD5*/ uint32_t authentication_type; + /* Attempt to bridge sensors not owned by the BMC*/ + bool bridge_sensors; /* Cipher suite identifier to determine authentication, integrity, * and confidentiality algorithms to use. * Supported Cipher Suite IDs @@ -127,45 +80,92 @@ typedef struct slurm_ipmi_conf { * 17 - A = HMAC-SHA256; I = HMAC-SHA256-128; C = AES-CBC-128 * Pass < 0 for default.of 3.*/ uint32_t cipher_suite_id; - /* Specifies the session timeout length in milliseconds. Pass <= 0 - * to default 60000 (60 seconds).*/ - uint32_t session_timeout; - /* Specifies the packet retransmission timeout length in - * milliseconds. Pass <= 0 to default 500 (0.5 seconds).*/ - uint32_t retransmission_timeout; - /* Bitwise OR of flags indicating IPMI implementation changes. Some - * BMCs which are non-compliant and may require a workaround flag - * for correct operation. Pass IPMICONSOLE_WORKAROUND_DEFAULT for - * default. Standard default is 0, no modifications to the IPMI - * protocol.*/ - uint32_t workaround_flags; - /* Re-read the SDR cache*/ - bool reread_sdr_cache; - /* Do not read sensors that cannot be interpreted.*/ - bool ignore_non_interpretable_sensors; - /* Attempt to bridge sensors not owned by the BMC*/ - bool bridge_sensors; - /* Attempt to interpret OEM data if read.*/ - bool interpret_oem_data; - /* Iterate through shared sensors if found*/ - bool shared_sensors; /* Allow sensor readings to be read even if the event/reading type * code for the sensor is not valid. This option works around * poorly defined (and arguably illegal) SDR records that list * non-discrete sensor expectations along with discrete state * conditions.*/ bool discrete_reading; + /* Use this driver device for the IPMI driver.*/ + char *driver_device; + /* Options for IPMI configuration*/ + /* Use a specific in-band driver. + * IPMI_MONITORING_DRIVER_TYPE_KCS = 0x00, + * IPMI_MONITORING_DRIVER_TYPE_SSIF = 0x01, + * IPMI_MONITORING_DRIVER_TYPE_OPENIPMI = 0x02, + * IPMI_MONITORING_DRIVER_TYPE_SUNBMC = 0x03, + * Pass < 0 for default of IPMI_MONITORING_DRIVER_TYPE_KCS.*/ + uint32_t driver_type; + /* Flag informs the library if in-band driver information should be + * probed or not.*/ + uint32_t disable_auto_probe; + /* Use this specified driver address instead of a probed one.*/ + uint32_t driver_address; + /* Return sensor names with appropriate entity + * id and instance prefixed when appropriate.*/ + bool entity_sensor_names; + /* frequency for ipmi call*/ + uint32_t freq; + /* Do not read sensors that cannot be interpreted.*/ + bool ignore_non_interpretable_sensors; /* Ignore the scanning bit and read sensors no matter * what. This option works around motherboards * that incorrectly indicate sensors as disabled.*/ bool ignore_scanning_disabled; - /* Assume the BMC is the sensor owner no matter what. This option - * works around motherboards that incorrectly indicate a non-BMC - * sensor owner (e.g. usually bridging is required).*/ - bool assume_bmc_owner; - /* Return sensor names with appropriate entity - * id and instance prefixed when appropriate.*/ - bool entity_sensor_names; + /* Attempt to interpret OEM data if read.*/ + bool interpret_oem_data; + /* BMC Key for 2-key authentication. Pass NULL ptr to use the + * default. Standard default is the null (e.g. empty) k_g, + * which will use the password as the BMC key. The k_g key need not + * be an ascii string.*/ + unsigned char *k_g; + /* Length of k_g. Necessary b/c k_g may contain null values in its + * key. Maximum length of 20 bytes.*/ + uint32_t k_g_len; + /* BMC password. Pass NULL ptr for default password. Standard + * default is the null (e.g. empty) password. Maximum length of 20 + * bytes.*/ + char *password; + /* privilege level to authenticate with. + * Supported privilege levels: + * 0 = IPMICONSOLE_PRIVILEGE_USER + * 1 = IPMICONSOLE_PRIVILEGE_OPERATOR + * 2 = IPMICONSOLE_PRIVILEGE_ADMIN + * Pass < 0 for default of IPMICONSOLE_PRIVILEGE_ADMIN.*/ + uint32_t privilege_level; + /* Options for SLURM IPMI plugin*/ + /* sensor num (only for power) */ + uint32_t power_sensor_num; + /* Out-of-band Communication Configuration */ + /* Indicate the IPMI protocol version to use + * IPMI_MONITORING_PROTOCOL_VERSION_1_5 = 0x00, + * IPMI_MONITORING_PROTOCOL_VERSION_2_0 = 0x01, + * Pass < 0 for default of IPMI_MONITORING_VERSION_1_5.*/ + uint32_t protocol_version; + /* Use this register space instead of the probed one.*/ + uint32_t register_spacing; + /* Re-read the SDR cache*/ + bool reread_sdr_cache; + /* Specifies the packet retransmission timeout length in + * milliseconds. Pass <= 0 to default 500 (0.5 seconds).*/ + uint32_t retransmission_timeout; + /* Specifies the session timeout length in milliseconds. Pass <= 0 + * to default 60000 (60 seconds).*/ + uint32_t session_timeout; + /* Iterate through shared sensors if found*/ + bool shared_sensors; + /* Timeout for the ipmi thread*/ + uint32_t timeout; + /* BMC username. Pass NULL ptr for default username. Standard + * default is the null (e.g. empty) username. Maximum length of 16 + * bytes.*/ + char *username; + /* Bitwise OR of flags indicating IPMI implementation changes. Some + * BMCs which are non-compliant and may require a workaround flag + * for correct operation. Pass IPMICONSOLE_WORKAROUND_DEFAULT for + * default. Standard default is 0, no modifications to the IPMI + * protocol.*/ + uint32_t workaround_flags; uint32_t variable; } slurm_ipmi_conf_t; diff --git a/src/plugins/acct_gather_energy/none/acct_gather_energy_none.c b/src/plugins/acct_gather_energy/none/acct_gather_energy_none.c index e9638d675d2eff9e973b54bf9dc835d304eed691..111756dfa503d3b6db197ad162acab5102be14cf 100644 --- a/src/plugins/acct_gather_energy/none/acct_gather_energy_none.c +++ b/src/plugins/acct_gather_energy/none/acct_gather_energy_none.c @@ -134,7 +134,7 @@ extern void acct_gather_energy_p_conf_set(s_p_hashtbl_t *tbl) return; } -extern List acct_gather_energy_p_get_config(void) +extern void acct_gather_energy_p_conf_values(List *data) { - return SLURM_SUCCESS; + return; } diff --git a/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c b/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c index 1984924c05a9edd0d94d0f91d513b2fa0b58ada7..990ffcb0ec3916a3dd6d43291ed0f190d818499a 100644 --- a/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c +++ b/src/plugins/acct_gather_energy/rapl/acct_gather_energy_rapl.c @@ -548,7 +548,7 @@ extern void acct_gather_energy_p_conf_set(s_p_hashtbl_t *tbl) return; } -extern int acct_gather_energy_p_config(void) +extern void acct_gather_energy_p_conf_values(List *data) { - return SLURM_SUCCESS; + return; } diff --git a/src/plugins/acct_gather_filesystem/lustre/acct_gather_filesystem_lustre.c b/src/plugins/acct_gather_filesystem/lustre/acct_gather_filesystem_lustre.c index 0e942d69d0560a3963f4c77d4df328d9ca7001e2..129ce0a0fd0e90a3d4754cf2451dc299adf0037d 100644 --- a/src/plugins/acct_gather_filesystem/lustre/acct_gather_filesystem_lustre.c +++ b/src/plugins/acct_gather_filesystem/lustre/acct_gather_filesystem_lustre.c @@ -335,3 +335,8 @@ extern void acct_gather_filesystem_p_conf_options(s_p_options_t **full_options, return; } + +extern void acct_gather_filesystem_p_conf_values(List *data) +{ + return; +} diff --git a/src/plugins/acct_gather_filesystem/none/acct_gather_filesystem_none.c b/src/plugins/acct_gather_filesystem/none/acct_gather_filesystem_none.c index 745e50334d2d8378cd85fbac26415e89dab0f821..fd2420504c9fa081787cbff98527997769cd46ea 100644 --- a/src/plugins/acct_gather_filesystem/none/acct_gather_filesystem_none.c +++ b/src/plugins/acct_gather_filesystem/none/acct_gather_filesystem_none.c @@ -119,3 +119,7 @@ extern void acct_gather_filesystem_p_conf_options(s_p_options_t **full_options, return; } +extern void acct_gather_filesystem_p_conf_values(List *data) +{ + return; +} diff --git a/src/plugins/acct_gather_infiniband/none/acct_gather_infiniband_none.c b/src/plugins/acct_gather_infiniband/none/acct_gather_infiniband_none.c index 3e2785ad69c168785cf2c5bac0e7288763acc323..576f1ed4e32f4069ab3b5abe059c6fdbe4342982 100644 --- a/src/plugins/acct_gather_infiniband/none/acct_gather_infiniband_none.c +++ b/src/plugins/acct_gather_infiniband/none/acct_gather_infiniband_none.c @@ -119,7 +119,7 @@ extern void acct_gather_infiniband_p_conf_options(s_p_options_t **full_options, return; } -extern int acct_gather_infiniband_p_get_config(void) +extern void acct_gather_infiniband_p_conf_values(List *data) { - return SLURM_SUCCESS; + return; } diff --git a/src/plugins/acct_gather_infiniband/ofed/acct_gather_infiniband_ofed.c b/src/plugins/acct_gather_infiniband/ofed/acct_gather_infiniband_ofed.c index 7749545f052f28de3d11412187013743435a4635..7fa888c2cea176e5e86947244896e83dccfee9e7 100644 --- a/src/plugins/acct_gather_infiniband/ofed/acct_gather_infiniband_ofed.c +++ b/src/plugins/acct_gather_infiniband/ofed/acct_gather_infiniband_ofed.c @@ -381,15 +381,16 @@ extern void acct_gather_infiniband_p_conf_options(s_p_options_t **full_options, return; } -extern List acct_gather_infiniband_p_get_config(void) +extern void acct_gather_infiniband_p_conf_values(List *data) { config_key_pair_t *key_pair; - List infini_list = list_create(destroy_config_key_pair); + + xassert(*data); key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("InfinibandOFEDPort"); - key_pair->value = xstrdup(&ofed_conf.port); - list_append(infini_list, key_pair); + key_pair->value = xstrdup_printf("%u", ofed_conf.port); + list_append(*data, key_pair); - return infini_list; + return; } diff --git a/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c b/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c index eb7aa54dda8a6b605615eb6e9a2563c10ecb519b..349d808a0a6aa42c3fc0ec929b0b57848f79db9f 100644 --- a/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c +++ b/src/plugins/acct_gather_profile/hdf5/acct_gather_profile_hdf5.c @@ -616,21 +616,22 @@ extern int acct_gather_profile_p_add_sample_data(uint32_t type, void *data) return SLURM_SUCCESS; } -extern List acct_gather_profile_p_get_config(void) +extern void acct_gather_profile_p_conf_values(List *data) { config_key_pair_t *key_pair; - List profile_list = list_create(destroy_config_key_pair); + + xassert(*data); key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("ProfileHDF5Dir"); - key_pair->value = xstrdup(&hdf5_conf.dir); - list_append(profile_list, key_pair); + key_pair->value = xstrdup(hdf5_conf.dir); + list_append(*data, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("ProfileHDF5Default"); - key_pair->value = xstrdup(&hdf5_conf.def); - list_append(profile_list, key_pair); + key_pair->value = xstrdup(acct_gather_profile_to_string(hdf5_conf.def)); + list_append(*data, key_pair); - return profile_list; + return; } diff --git a/src/plugins/acct_gather_profile/none/acct_gather_profile_none.c b/src/plugins/acct_gather_profile/none/acct_gather_profile_none.c index be84206766e747540fe7ff9cd583f10417bfb5db..34ce682cff9943897a6f01ad969a173fcdcfa165 100644 --- a/src/plugins/acct_gather_profile/none/acct_gather_profile_none.c +++ b/src/plugins/acct_gather_profile/none/acct_gather_profile_none.c @@ -155,7 +155,7 @@ extern int acct_gather_profile_p_add_sample_data(uint32_t type, void* data) return SLURM_SUCCESS; } -extern int acct_gather_profile_p_get_config(void) +extern void acct_gather_profile_p_conf_values(List *data) { - return SLURM_SUCCESS; + return; } diff --git a/src/plugins/ext_sensors/rrd/ext_sensors_rrd.c b/src/plugins/ext_sensors/rrd/ext_sensors_rrd.c index 22f0833188d7f2716ee09003f8d9e28c31843237..3c3908c347e6d94ed8f98dc572a894c040268ed1 100644 --- a/src/plugins/ext_sensors/rrd/ext_sensors_rrd.c +++ b/src/plugins/ext_sensors/rrd/ext_sensors_rrd.c @@ -691,8 +691,7 @@ extern List ext_sensors_p_get_config(void) List ext_list = list_create(destroy_config_key_pair); char *sep = ", "; - bool first = 1; - char *tmp_val; + char *tmp_val = NULL; if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_JOB_ENERGY) { key_pair = xmalloc(sizeof(config_key_pair_t)); @@ -701,38 +700,34 @@ extern List ext_sensors_p_get_config(void) list_append(ext_list, key_pair); } - if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_NODE_ENERGY) { + if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_NODE_ENERGY) tmp_val = xstrdup("energy"); - first = 0; - } + if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_NODE_TEMP) { - if (!first) { + if (tmp_val) xstrcat(tmp_val, sep); - } xstrcat(tmp_val, "temp"); } key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("NodeData"); - key_pair->value = xstrdup(tmp_val); + key_pair->value = tmp_val; list_append(ext_list, key_pair); - xfree(tmp_val); + tmp_val = NULL; -/* Reset first value */ - first = 1; - if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_SWITCH_ENERGY) { + if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_SWITCH_ENERGY) tmp_val = xstrdup("energy"); - first = 0; - } + if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_SWITCH_TEMP) { - if (!first) { + if (tmp_val) xstrcat(tmp_val, sep); - } + xstrcat(tmp_val, "temp"); } key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("SwitchData"); - key_pair->value = xstrdup(tmp_val); + key_pair->value = tmp_val; list_append(ext_list, key_pair); + tmp_val = NULL; if (ext_sensors_cnf->dataopts & EXT_SENSORS_OPT_COLDDOOR_TEMP) { key_pair = xmalloc(sizeof(config_key_pair_t)); @@ -743,22 +738,22 @@ extern List ext_sensors_p_get_config(void) key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("MinWatt"); - key_pair->value = xstrdup(ext_sensors_cnf->min_watt); + key_pair->value = xstrdup_printf("%u", ext_sensors_cnf->min_watt); list_append(ext_list, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("MaxWatt"); - key_pair->value = xstrdup(ext_sensors_cnf->max_watt); + key_pair->value = xstrdup_printf("%u", ext_sensors_cnf->max_watt); list_append(ext_list, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("MinTemp"); - key_pair->value = xstrdup(ext_sensors_cnf->min_temp); + key_pair->value = xstrdup_printf("%u", ext_sensors_cnf->min_temp); list_append(ext_list, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("MaxTemp"); - key_pair->value = xstrdup(ext_sensors_cnf->max_temp); + key_pair->value = xstrdup_printf("%u", ext_sensors_cnf->max_temp); list_append(ext_list, key_pair); key_pair = xmalloc(sizeof(config_key_pair_t)); @@ -781,6 +776,8 @@ extern List ext_sensors_p_get_config(void) key_pair->value = xstrdup(ext_sensors_cnf->temp_rrd_file); list_append(ext_list, key_pair); + list_sort(ext_list, (ListCmpF) sort_key_pairs); + return ext_list; } diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 9c4ce71460185f9de697c333f159a6645ffc6729..6bbf3bbfb932a6996bc3c556a5754582ea9bb690 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -442,6 +442,8 @@ int main(int argc, char *argv[]) fatal( "failed to initialize preempt plugin" ); if (checkpoint_init(slurmctld_conf.checkpoint_type) != SLURM_SUCCESS ) fatal( "failed to initialize checkpoint plugin" ); + if (acct_gather_conf_init() != SLURM_SUCCESS ) + fatal( "failed to initialize acct_gather plugins" ); if (slurm_acct_storage_init(NULL) != SLURM_SUCCESS ) fatal( "failed to initialize accounting_storage plugin"); if (jobacct_gather_init() != SLURM_SUCCESS ) @@ -673,6 +675,7 @@ int main(int argc, char *argv[]) slurm_preempt_fini(); g_slurm_jobcomp_fini(); jobacct_gather_fini(); + acct_gather_conf_fini(); slurm_select_fini(); slurm_topo_fini(); checkpoint_fini(); diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index be9e82fcc42f181d62468372829d0b8c3c587797..b678e6adb438e77fd5836f32aa808a7ac78259e4 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -73,9 +73,7 @@ #include "src/common/switch.h" #include "src/common/xstring.h" #include "src/common/slurm_ext_sensors.h" -#include "src/common/slurm_acct_gather_energy.h" -#include "src/common/slurm_acct_gather_profile.h" -#include "src/common/slurm_acct_gather_infiniband.h" +#include "src/common/slurm_acct_gather.h" #include "src/slurmctld/agent.h" #include "src/slurmctld/front_end.h" @@ -521,6 +519,7 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->accounting_storage_port = conf->accounting_storage_port; conf_ptr->acctng_store_job_comment = conf->acctng_store_job_comment; + conf_ptr->acct_gather_conf = acct_gather_conf_values(); conf_ptr->acct_gather_energy_type = xstrdup(conf->acct_gather_energy_type); conf_ptr->acct_gather_filesystem_type = @@ -554,6 +553,7 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->epilog = xstrdup(conf->epilog); conf_ptr->epilog_msg_time = conf->epilog_msg_time; conf_ptr->epilog_slurmctld = xstrdup(conf->epilog_slurmctld); + ext_sensors_g_get_config(&conf_ptr->ext_sensors_conf); conf_ptr->ext_sensors_type = xstrdup(conf->ext_sensors_type); conf_ptr->ext_sensors_freq = conf->ext_sensors_freq; @@ -671,10 +671,6 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->select_type = xstrdup(conf->select_type); select_g_get_info_from_plugin(SELECT_CONFIG_INFO, NULL, &conf_ptr->select_conf_key_pairs); - acct_gather_profile_g_get_config(&conf_ptr->acct_gather_conf); - ext_sensors_g_get_config(&conf_ptr->ext_sensors_conf); - acct_gather_infiniband_g_get_config(&conf_ptr->acct_gather_conf); - acct_gather_energy_g_get_config(&conf_ptr->acct_gather_conf); conf_ptr->select_type_param = conf->select_type_param; conf_ptr->slurm_user_id = conf->slurm_user_id; conf_ptr->slurm_user_name = xstrdup(conf->slurm_user_name);