From 4c692b4faa45296466dffbbb6f3c23ea0179eb9f Mon Sep 17 00:00:00 2001 From: Olaf Faaland Date: Tue, 20 Dec 2022 16:10:52 -0800 Subject: [PATCH] flux: add debug statements Add some debug statements at critical points in flux plugin. --- src/flux/internal.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/flux/internal.c b/src/flux/internal.c index 0eedabf..e962c00 100644 --- a/src/flux/internal.c +++ b/src/flux/internal.c @@ -62,6 +62,9 @@ int internal_init(int verb) " Remaining time will be a bogus value.\n"); goto out; } + debug("flux_attr_get returned jobid_str=%s\n", jobid_str); + } else { + debug("Environment contains FLUX_JOB_ID=%s\n", jobid_str); } if (flux_job_id_parse(jobid_str, &jobid) < 0) { @@ -70,6 +73,7 @@ int internal_init(int verb) goto out; } + debug("flux parsed jobid_str successfully.\n"); jobid_valid = 1; out: @@ -104,6 +108,8 @@ int internal_get_rem_time(time_t now, time_t last_update, int cached) if ((flux_job_timeleft (h, &error, &timeleft)) == -1) { error("ERROR: flux_job_timeleft() failed with error %s\n", error.text); goto out; + } else { + debug("flux_job_timeleft returned %f.\n", timeleft); } if (timeleft > INT_MAX)