diff --git a/src/common/slurm_acct_gather_profile.c b/src/common/slurm_acct_gather_profile.c index 2932a3852999a4b435aff9d1ee2de730c9967bae..2d3e5a1b1d301f5694956762b74bc6e71023afde 100644 --- a/src/common/slurm_acct_gather_profile.c +++ b/src/common/slurm_acct_gather_profile.c @@ -120,7 +120,8 @@ static void *_timer_thread(void *args) if (!acct_gather_profile_timer[i].freq || (diff < acct_gather_profile_timer[i].freq)) continue; - debug2("profile signalling type %d", i); + debug2("profile signalling type %s", + acct_gather_profile_type_t_name(i)); /* signal poller to start */ slurm_mutex_lock(&acct_gather_profile_timer[i]. @@ -281,6 +282,33 @@ extern uint32_t acct_gather_profile_type_from_string(char *series_str) return ACCT_GATHER_PROFILE_NOT_SET; } +extern char *acct_gather_profile_type_t_name(acct_gather_profile_type_t type) +{ + switch (type) { + case PROFILE_ENERGY: + return "Energy"; + break; + case PROFILE_TASK: + return "Task"; + break; + case PROFILE_FILESYSTEM: + return "Lustre"; + break; + case PROFILE_NETWORK: + return "Network"; + break; + case PROFILE_CNT: + return "CNT?"; + break; + default: + fatal("Unhandled profile option %d please update " + "slurm_acct_gather_profile.c " + "(acct_gather_profile_type_t_name)", type); + } + + return "Unknown"; +} + extern int acct_gather_profile_startpoll(char *freq, char *freq_def) { int retval = SLURM_SUCCESS; diff --git a/src/common/slurm_acct_gather_profile.h b/src/common/slurm_acct_gather_profile.h index c83531cca1b851458001c3d2fafc934d56203258..3864894bb45bd39fa18b736e1e52dc3827fd628e 100644 --- a/src/common/slurm_acct_gather_profile.h +++ b/src/common/slurm_acct_gather_profile.h @@ -103,6 +103,8 @@ extern uint32_t acct_gather_profile_from_string(char *profile_str); extern char *acct_gather_profile_type_to_string(uint32_t series); extern uint32_t acct_gather_profile_type_from_string(char *series_str); +extern char *acct_gather_profile_type_t_name(acct_gather_profile_type_t type); + extern int acct_gather_profile_startpoll(char *freq, char *freq_def); /*