From 17cd3af02ae73a0098cd3343f44f5397da9399f6 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Fri, 20 Jun 2008 16:45:30 +0000 Subject: [PATCH] In output for "scontrol show job" change "StartTime" header to "EligibleTime" for pending jobs to accurately describe what is reported. --- NEWS | 4 ++++ src/api/job_info.c | 11 ++++++++--- src/squeue/print.c | 2 ++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index 1236fdd7223..42593d2b41e 100644 --- a/NEWS +++ b/NEWS @@ -34,6 +34,10 @@ documents those changes that are of interest to users and admins. -- Fix to handle suspended jobs that were cancelled in accounting -- BLUEGENE - fix to only include bps given in a name from the bluegene.conf file. + -- For select/cons_res: Fix record-keeping for core allocations when more + than one partition uses a node or there is more than one socket per node. + -- In output for "scontrol show job" change "StartTime" header to "EligibleTime" + for pending jobs to accurately describe what is reported. * Changes in SLURM 1.3.3 ======================== diff --git a/src/api/job_info.c b/src/api/job_info.c index daf0fb208a0..c8fcff618c5 100644 --- a/src/api/job_info.c +++ b/src/api/job_info.c @@ -126,7 +126,7 @@ slurm_sprint_job_info ( job_info_t * job_ptr, int one_liner ) int i, j; char time_str[32], select_buf[122]; struct group *group_info = NULL; - char tmp1[128], tmp2[128]; + char tmp1[128], tmp2[128], *tmp3_ptr; char tmp_line[512]; char *ionodes = NULL; uint16_t exit_status = 0, term_sig = 0; @@ -209,11 +209,16 @@ slurm_sprint_job_info ( job_info_t * job_ptr, int one_liner ) xstrcat(out, "\n "); /****** Line 5 ******/ + if (job_ptr->job_state == JOB_PENDING) + tmp3_ptr = "EligibleTime"; + else + tmp3_ptr = "StartTime"; slurm_make_time_str((time_t *)&job_ptr->start_time, time_str, sizeof(time_str)); snprintf(tmp_line, sizeof(tmp_line), - "JobState=%s StartTime=%s EndTime=", - job_state_string(job_ptr->job_state), time_str); + "JobState=%s %s=%s EndTime=", + job_state_string(job_ptr->job_state), + tmp3_ptr, time_str); xstrcat(out, tmp_line); if ((job_ptr->time_limit == INFINITE) && (job_ptr->end_time > time(NULL))) diff --git a/src/squeue/print.c b/src/squeue/print.c index 0225f2ca316..0985f5ed2d1 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -488,6 +488,8 @@ int _print_job_time_start(job_info_t * job, int width, bool right, { if (job == NULL) /* Print the Header instead */ _print_str("START", width, right, true); + else if (job->job_state == JOB_PENDING) + _print_time((time_t) 0, 0, width, right); else _print_time(job->start_time, 0, width, right); if (suffix) -- GitLab