From 2a3a75210c3cc2b9e30ec13ccf588e19f8c4de3e Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Fri, 21 Aug 2009 21:14:17 +0000
Subject: [PATCH] svn merge -r18459:18487
 https://eris.llnl.gov/svn/slurm/branches/slurm-2.0

---
 NEWS                                          |   8 +-
 doc/man/man1/srun.1                           |   6 +-
 src/api/config_info.c                         |   2 +-
 src/plugins/sched/wiki2/get_jobs.c            |   4 +-
 src/plugins/sched/wiki2/get_nodes.c           |   4 +-
 src/plugins/topology/3d_torus/hilbert_slurm.c |   2 +-
 src/scancel/scancel.c                         | 146 ++++----
 src/sview/common.c                            |  64 +++-
 src/sview/popups.c                            | 312 +++++++++++++++++-
 src/sview/sview.h                             |  10 +-
 10 files changed, 460 insertions(+), 98 deletions(-)

diff --git a/NEWS b/NEWS
index 7fe692999f0..8cfd2de5af9 100644
--- a/NEWS
+++ b/NEWS
@@ -186,6 +186,12 @@ documents those changes that are of interest to users and admins.
     SLURM_TASKS_PER_NODE
  -- env var SLURM_CPUS_ON_NODE is now set correctly depending on the 
     fastschedule parameter.
+ -- Correction to topology/3d_torus plugin calculation when coordinate value 
+    exceeds "9" (i.e. a hex value).
+ -- In sched/wiki2 - Strip single and double quotes out of a node's reason 
+    string to avoid confusing Moab's parser.
+ -- Modified scancel to cancel any pending jobs before cancelling any other
+ -- updated sview config info
 
 * Changes in SLURM 2.0.4
 ========================
@@ -215,8 +221,6 @@ documents those changes that are of interest to users and admins.
     association.
  -- Do not set a job's virtual memory limit based upon the job's specified
     memory limit (which should be a real memory limit, not virtual).
- -- In sched/wiki2 - Strip single and double quotes out of a node's reason 
-    string to avoid confusing Moab's parser.
  -- BLUEGENE - fix for sinfo/sview for displaying proper node count for nodes 
     in draining state.
  -- Fix for sview when viewing a certain part of a group (like 1 job) so it 
diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1
index 96fd06ab7d4..3576988e685 100644
--- a/doc/man/man1/srun.1
+++ b/doc/man/man1/srun.1
@@ -1015,9 +1015,9 @@ slurm.conf this value is ignored.
 \fB\-X\fR, \fB\-\-disable\-status\fR
 Disable the display of task status when srun receives a single SIGINT
 (Ctrl\-C). Instead immediately forward the SIGINT to the running job.
-A second Ctrl\-C in one second will forcibly terminate the job and
-\fBsrun\fR will immediately exit. May also be set via the environment
-variable SLURM_DISABLE_STATUS.
+Without this option a second Ctrl\-C in one second is required to forcibly
+terminate the job and \fBsrun\fR will immediately exit. May also be
+set via the environment variable SLURM_DISABLE_STATUS.
 
 .TP
 \fB\-x\fR, \fB\-\-exclude\fR=<\fIhost1,host2,...\fR or \fIfilename\fR>
diff --git a/src/api/config_info.c b/src/api/config_info.c
index b34a7065945..5bb2fb70357 100644
--- a/src/api/config_info.c
+++ b/src/api/config_info.c
@@ -197,7 +197,7 @@ void slurm_print_ctl_conf ( FILE* out,
 		slurm_ctl_conf_ptr->backup_addr);
 	fprintf(out, "BackupController        = %s\n", 
 		slurm_ctl_conf_ptr->backup_controller);
-	fprintf(out, "BatchStartTime          = %u sec\n", 
+	fprintf(out, "BatchStartTimeout       = %u sec\n", 
 		slurm_ctl_conf_ptr->batch_start_timeout);
 	slurm_make_time_str ((time_t *)&slurm_ctl_conf_ptr->boot_time,
 			     time_str, sizeof(time_str));
diff --git a/src/plugins/sched/wiki2/get_jobs.c b/src/plugins/sched/wiki2/get_jobs.c
index c05cc26bc3d..cc7d4a3e575 100644
--- a/src/plugins/sched/wiki2/get_jobs.c
+++ b/src/plugins/sched/wiki2/get_jobs.c
@@ -16,7 +16,7 @@
  *  any later version.
  *
  *  In addition, as a special exception, the copyright holders give permission 
- *  to link the code of portions of this program with the OpenSSL library under 
+ *  to link the code of portions of this program with the OpenSSL library under
  *  certain conditions as described in each individual source file, and 
  *  distribute linked combinations including the two. You must obey the GNU 
  *  General Public License in all respects for all of the code used other than 
@@ -414,7 +414,7 @@ static void	_get_job_comment(struct job_record *job_ptr,
 	/* SHARED NODES */
 	if (cr_enabled)	{			/* consumable resources */
 		if (job_ptr->part_ptr &&
-		    (job_ptr->part_ptr->max_share == 0))	/* Exclusive use */
+		    (job_ptr->part_ptr->max_share == 0))  /* Exclusive use */
 			sharing = 0;
 		else if (job_ptr->details && job_ptr->details->shared)
 			sharing = 1;
diff --git a/src/plugins/sched/wiki2/get_nodes.c b/src/plugins/sched/wiki2/get_nodes.c
index 54eb6ce227c..9cededcc055 100644
--- a/src/plugins/sched/wiki2/get_nodes.c
+++ b/src/plugins/sched/wiki2/get_nodes.c
@@ -293,9 +293,9 @@ static char *	_dump_node(struct node_record *node_ptr, hostlist_t hl,
 		/* Strip out any quotes, they confuse Moab */
 		char *reason, *bad_char;
 		reason = xstrdup(node_ptr->reason);
-		while ((bad_char = strchr(node_ptr->reason, '\'')))
+		while ((bad_char = strchr(reason, '\'')))
 			bad_char[0] = ' ';
-		while ((bad_char = strchr(node_ptr->reason, '\"')))
+		while ((bad_char = strchr(reason, '\"')))
 			bad_char[0] = ' ';
 		snprintf(tmp, sizeof(tmp), "CAT=\"%s\";", reason);
 		xstrcat(buf, tmp);
diff --git a/src/plugins/topology/3d_torus/hilbert_slurm.c b/src/plugins/topology/3d_torus/hilbert_slurm.c
index c995266d47e..8966caf8a3f 100644
--- a/src/plugins/topology/3d_torus/hilbert_slurm.c
+++ b/src/plugins/topology/3d_torus/hilbert_slurm.c
@@ -52,7 +52,7 @@ static int _coord(char coord)
 	if ((coord >= '0') && (coord <= '9'))
 		return (coord - '0');
 	if ((coord >= 'A') && (coord <= 'Z'))
-		return (coord - 'A');
+		return (coord - 'A' + 10);
 	return -1;
 }
 
diff --git a/src/scancel/scancel.c b/src/scancel/scancel.c
index 6a77cd8780a..405668762ad 100644
--- a/src/scancel/scancel.c
+++ b/src/scancel/scancel.c
@@ -254,7 +254,7 @@ _filter_job_records (void)
 static void
 _cancel_jobs (void)
 {
-	int i, j, err;
+	int i, j, k, err;
 	job_info_t *job_ptr = NULL;
 	pthread_attr_t  attr;
 	job_cancel_info_t *cancel_info;
@@ -274,33 +274,86 @@ _cancel_jobs (void)
 
 	job_ptr = job_buffer_ptr->job_array ;
 
-	/* Spawn a thread to cancel each job or job step marked for
-	 * cancellation */
-	for (i = 0; i < job_buffer_ptr->record_count; i++) {
-		if (job_ptr[i].job_id == 0) 
-			continue;
+	for(k = 0; k < 2; k++) {
+		/* Spawn a thread to cancel each job or job step marked for
+		 * cancellation */
+		for (i = 0; i < job_buffer_ptr->record_count; i++) {
+			if (job_ptr[i].job_id == 0)
+				continue;
 
-		/* If cancelling a list of jobs, see if the current job 
-		 * included a step id */
-		if (opt.job_cnt) {
-			for (j = 0; j < opt.job_cnt; j++ ) {
-				if (job_ptr[i].job_id != opt.job_id[j])
-					continue;
+			/* Cancel the pending jobs the first time through */
+			if ((k == 0) && (job_ptr[i].job_state != JOB_PENDING))
+				continue;
 
-				if (opt.interactive && 
-				    (_confirmation(i, opt.step_id[j]) == 0))
+			/* If cancelling a list of jobs, see if the current job
+			 * included a step id */
+			if (opt.job_cnt) {
+				for (j = 0; j < opt.job_cnt; j++ ) {
+					if (job_ptr[i].job_id != opt.job_id[j])
+						continue;
+
+					if (opt.interactive &&
+					    (_confirmation(i, opt.step_id[j]) == 0))
+						continue;
+
+					cancel_info =
+						(job_cancel_info_t *)
+						xmalloc(sizeof(job_cancel_info_t));
+					cancel_info->job_id  = job_ptr[i].job_id;
+					cancel_info->sig     = opt.signal;
+					cancel_info->num_active_threads =
+						&num_active_threads;
+					cancel_info->num_active_threads_lock =
+						&num_active_threads_lock;
+					cancel_info->num_active_threads_cond =
+						&num_active_threads_cond;
+
+					pthread_mutex_lock(
+						&num_active_threads_lock);
+					num_active_threads++;
+					while (num_active_threads > MAX_THREADS) {
+						pthread_cond_wait(
+							&num_active_threads_cond,
+							&num_active_threads_lock);
+					}
+					pthread_mutex_unlock(
+						&num_active_threads_lock);
+
+					if (opt.step_id[j] == SLURM_BATCH_SCRIPT) {
+						err = pthread_create(&dummy, &attr,
+								     _cancel_job_id,
+								     cancel_info);
+						if (err)
+							_cancel_job_id(cancel_info);
+						break;
+					} else {
+						cancel_info->step_id =
+							opt.step_id[j];
+						err = pthread_create(&dummy, &attr,
+								     _cancel_step_id,
+								     cancel_info);
+						if (err)
+							_cancel_step_id(cancel_info);
+						/* Don't break here.  Keep looping in
+						 * case other steps from the same job
+						 * are cancelled. */
+					}
+				}
+			} else {
+				if (opt.interactive &&
+				    (_confirmation(i, SLURM_BATCH_SCRIPT) == 0))
 					continue;
 
-				cancel_info = 
-					(job_cancel_info_t *) 
+				cancel_info =
+					(job_cancel_info_t *)
 					xmalloc(sizeof(job_cancel_info_t));
 				cancel_info->job_id  = job_ptr[i].job_id;
 				cancel_info->sig     = opt.signal;
-				cancel_info->num_active_threads = 
+				cancel_info->num_active_threads =
 					&num_active_threads;
-				cancel_info->num_active_threads_lock = 
+				cancel_info->num_active_threads_lock =
 					&num_active_threads_lock;
-				cancel_info->num_active_threads_cond = 
+				cancel_info->num_active_threads_cond =
 					&num_active_threads_cond;
 
 				pthread_mutex_lock( &num_active_threads_lock );
@@ -309,56 +362,15 @@ _cancel_jobs (void)
 					pthread_cond_wait(&num_active_threads_cond,
 							  &num_active_threads_lock);
 				}
-				pthread_mutex_unlock( &num_active_threads_lock );
-
-				if (opt.step_id[j] == SLURM_BATCH_SCRIPT) {
-					err = pthread_create(&dummy, &attr, 
-							     _cancel_job_id,
-							     cancel_info);
-					if (err)
-						_cancel_job_id(cancel_info);
-					break;
-				} else {
-					cancel_info->step_id = opt.step_id[j];
-					err = pthread_create(&dummy, &attr, 
-							     _cancel_step_id,
-							     cancel_info);
-					if (err)
-						_cancel_step_id(cancel_info);
-					/* Don't break here.  Keep looping in 
-					 * case other steps from the same job 
-					 * are cancelled. */
-				}
-			}
-		} else {
-			if (opt.interactive && 
-			    (_confirmation(i, SLURM_BATCH_SCRIPT) == 0))
-				continue;
+				pthread_mutex_unlock(&num_active_threads_lock);
 
-			cancel_info = 
-				(job_cancel_info_t *)
-				xmalloc(sizeof(job_cancel_info_t));
-			cancel_info->job_id  = job_ptr[i].job_id;
-			cancel_info->sig     = opt.signal;
-			cancel_info->num_active_threads = &num_active_threads;
-			cancel_info->num_active_threads_lock = 
-				&num_active_threads_lock;
-			cancel_info->num_active_threads_cond = 
-				&num_active_threads_cond;
-
-			pthread_mutex_lock( &num_active_threads_lock );
-			num_active_threads++;
-			while (num_active_threads > MAX_THREADS) {
-				pthread_cond_wait( &num_active_threads_cond,
-						   &num_active_threads_lock );
+				err = pthread_create(&dummy, &attr,
+						     _cancel_job_id,
+						     cancel_info);
+				if (err)
+					_cancel_job_id(cancel_info);
 			}
-			pthread_mutex_unlock( &num_active_threads_lock );
-
-			err = pthread_create(&dummy, &attr, 
-					     _cancel_job_id,
-					     cancel_info);
-			if (err)
-				_cancel_job_id(cancel_info);
+			job_ptr[i].job_id = 0;
 		}
 	}
 
diff --git a/src/sview/common.c b/src/sview/common.c
index c1f5af21e1f..62efb3bf4af 100644
--- a/src/sview/common.c
+++ b/src/sview/common.c
@@ -610,7 +610,8 @@ extern GtkTreeView *create_treeview_2cols_attach_to_table(GtkTable *table)
 {
 	GtkTreeView *tree_view = GTK_TREE_VIEW(gtk_tree_view_new());
 	GtkTreeStore *treestore = 
-		gtk_tree_store_new(2, GTK_TYPE_STRING, GTK_TYPE_STRING);
+		gtk_tree_store_new(3, GTK_TYPE_STRING, 
+				   GTK_TYPE_STRING, GTK_TYPE_STRING);
 	GtkTreeViewColumn *col = gtk_tree_view_column_new();
 	GtkCellRenderer *renderer = gtk_cell_renderer_text_new();
 
@@ -623,6 +624,8 @@ extern GtkTreeView *create_treeview_2cols_attach_to_table(GtkTable *table)
 	gtk_tree_view_column_pack_start(col, renderer, TRUE);
 	gtk_tree_view_column_add_attribute(col, renderer, 
 					   "text", DISPLAY_NAME);
+	gtk_tree_view_column_add_attribute(col, renderer, 
+					   "font", DISPLAY_FONT);
 	gtk_tree_view_column_set_title(col, "Name");
 	gtk_tree_view_column_set_resizable(col, true);
 	gtk_tree_view_column_set_expand(col, true);
@@ -633,11 +636,21 @@ extern GtkTreeView *create_treeview_2cols_attach_to_table(GtkTable *table)
 	gtk_tree_view_column_pack_start(col, renderer, TRUE);
 	gtk_tree_view_column_add_attribute(col, renderer, 
 					   "text", DISPLAY_VALUE);
+	gtk_tree_view_column_add_attribute(col, renderer, 
+					   "font", DISPLAY_FONT);
 	gtk_tree_view_column_set_title(col, "Value");
 	gtk_tree_view_column_set_resizable(col, true);
 	gtk_tree_view_column_set_expand(col, true);
 	gtk_tree_view_append_column(tree_view, col);
 
+	col = gtk_tree_view_column_new();
+	renderer = gtk_cell_renderer_text_new();
+	gtk_tree_view_column_pack_start(col, renderer, TRUE);
+	gtk_tree_view_column_set_visible(col, false);
+	gtk_tree_view_column_add_attribute(col, renderer, 
+					   "text", DISPLAY_FONT);
+	gtk_tree_view_append_column(tree_view, col);
+
        	g_object_unref(treestore);
 	return tree_view;
 }
@@ -1225,7 +1238,56 @@ found:
 			   DISPLAY_NAME, name, 
 			   DISPLAY_VALUE, value,
 			   -1);
+
+	return;
+}
+
+extern void add_display_treestore_line_with_font(
+	int update,
+	GtkTreeStore *treestore,
+	GtkTreeIter *iter,
+	const char *name, char *value,
+	char *font)
+{
+	if(!name) {
+		g_print("error, name = %s and value = %s\n",
+			name, value);
+		return;
+	}
+	if(update) {
+		char *display_name = NULL;
+		GtkTreePath *path = gtk_tree_path_new_first();
+		gtk_tree_model_get_iter(GTK_TREE_MODEL(treestore), iter, path);
 	
+		while(1) {
+			/* search for the jobid and check to see if 
+			   it is in the list */
+			gtk_tree_model_get(GTK_TREE_MODEL(treestore), iter,
+					   DISPLAY_NAME, 
+					   &display_name, -1);
+			if(!strcmp(display_name, name)) {
+				/* update with new info */
+				g_free(display_name);
+				goto found;
+			}
+			g_free(display_name);
+				
+			if(!gtk_tree_model_iter_next(GTK_TREE_MODEL(treestore),
+						     iter)) {
+				return;
+			}
+		}
+		
+	} else {
+		gtk_tree_store_append(treestore, iter, NULL);
+	}
+found:
+	gtk_tree_store_set(treestore, iter,
+			   DISPLAY_NAME, name, 
+			   DISPLAY_VALUE, value,
+			   DISPLAY_FONT, font,
+			   -1);
+
 	return;
 }
 
diff --git a/src/sview/popups.c b/src/sview/popups.c
index cdb6f20e3ac..8a876e86c5c 100644
--- a/src/sview/popups.c
+++ b/src/sview/popups.c
@@ -40,6 +40,53 @@
 #include "sview.h"
 #include "src/common/parse_time.h"
 
+static char *_select_info(uint16_t select_type_param)
+{
+	switch (select_type_param) {
+		case SELECT_TYPE_INFO_NONE:
+			return "NONE";
+		case CR_CPU:
+			return "CR_CPU";
+		case CR_SOCKET:
+			return "CR_SOCKET";
+		case CR_CORE:
+			return "CR_CORE";
+		case CR_MEMORY:
+			return "CR_MEMORY";
+		case CR_SOCKET_MEMORY:
+			return "CR_SOCKET_MEMORY";
+		case CR_CORE_MEMORY:
+			return "CR_CORE_MEMORY";
+		case CR_CPU_MEMORY:
+			return "CR_CPU_MEMORY";
+		default:
+			return "unknown";
+	}
+}
+
+static char *_reset_period_str(uint16_t reset_period)
+{
+	switch (reset_period) {
+		case PRIORITY_RESET_NONE:
+			return "NONE";
+		case PRIORITY_RESET_NOW:
+			return "NOW";
+		case PRIORITY_RESET_DAILY:
+			return "DAILY";
+		case PRIORITY_RESET_WEEKLY:
+			return "WEEKLY";
+		case PRIORITY_RESET_MONTHLY:
+			return "MONTHLY";
+		case PRIORITY_RESET_QUARTERLY:
+			return "QUARTERLY";
+		case PRIORITY_RESET_YEARLY:
+			return "YEARLY";
+		default:
+			return "UNKNOWN";
+	}
+}
+
+
 void *_refresh_thr(gpointer arg)
 {
 	int msg_id = GPOINTER_TO_INT(arg);
@@ -220,28 +267,57 @@ static GtkTreeStore *_local_create_treestore_2cols(GtkWidget *popup,
 static void _layout_ctl_conf(GtkTreeStore *treestore,
 			     slurm_ctl_conf_info_msg_t *slurm_ctl_conf_ptr)
 {
-	char temp_str[32], temp_str2[128];
+	char temp_str[128];
 	int update = 0;
 	GtkTreeIter iter;
-	
+	char *xbuf = NULL;
+	ListIterator itr = NULL;
+	config_key_pair_t *key_pair;
+	char *select_title = "";
+#ifdef HAVE_BGL
+	select_title = "Bluegene/L configuration";
+#endif
+#ifdef HAVE_BGP
+	select_title = "Bluegene/P configuration";
+#endif
+#ifdef HAVE_BGQ
+	select_title = "Bluegene/Q configuration";
+#endif
+
 	if(!slurm_ctl_conf_ptr)
 		return;
 
 	slurm_make_time_str((time_t *)&slurm_ctl_conf_ptr->last_update, 
 			    temp_str, sizeof(temp_str));
+	add_display_treestore_line_with_font(
+		update, treestore, &iter, 
+		"Configuration data as of", temp_str, "bold");
+	snprintf(temp_str, sizeof(temp_str), "%u", 
+		 slurm_ctl_conf_ptr->accounting_storage_enforce);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "AccountingStorageEnforce", 
+				   temp_str);
 	add_display_treestore_line(update, treestore, &iter, 
-				   "Configuration data as of", temp_str);
+				   "AccountingStorageBackupHost", 
+				   slurm_ctl_conf_ptr->
+				   accounting_storage_backup_host);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "AccountingStorageHost", 
 				   slurm_ctl_conf_ptr->accounting_storage_host);
 	add_display_treestore_line(update, treestore, &iter, 
-				   "AccountingStorageType", 
-				   slurm_ctl_conf_ptr->accounting_storage_type);
+				   "AccountingStorageLoc", 
+				   slurm_ctl_conf_ptr->accounting_storage_loc);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "AccountingStoragePass", 
+				   slurm_ctl_conf_ptr->accounting_storage_pass);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->accounting_storage_port);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "AccountingStoragePort", 
 				   temp_str);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "AccountingStorageType", 
+				   slurm_ctl_conf_ptr->accounting_storage_type);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "AccountingStorageUser", 
 				   slurm_ctl_conf_ptr->accounting_storage_user);
@@ -253,6 +329,11 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "BackupController", 
 				   slurm_ctl_conf_ptr->backup_controller);
+	snprintf(temp_str, sizeof(temp_str), "%u sec", 
+		 slurm_ctl_conf_ptr->batch_start_timeout);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "BatchStartTimeout", 
+				   temp_str);
 	slurm_make_time_str ((time_t *)&slurm_ctl_conf_ptr->boot_time,
 			     temp_str, sizeof(temp_str));
 	add_display_treestore_line(update, treestore, &iter, 
@@ -264,6 +345,9 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "CheckpointType",
 				   slurm_ctl_conf_ptr->checkpoint_type);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "ClusterName",
+				   slurm_ctl_conf_ptr->cluster_name);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->complete_wait);
 	add_display_treestore_line(update, treestore, &iter, 
@@ -278,21 +362,55 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "CryptoType", 
 				   slurm_ctl_conf_ptr->crypto_type);
+	
+	xbuf = debug_flags2str(slurm_ctl_conf_ptr->debug_flags);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "DebugFlags", 
+				   xbuf);
+	xfree(xbuf);
 	if (slurm_ctl_conf_ptr->def_mem_per_task & MEM_PER_CPU) {
 		snprintf(temp_str, sizeof(temp_str), "%u", 
 			 slurm_ctl_conf_ptr->def_mem_per_task & 
 			 (~MEM_PER_CPU));
 		add_display_treestore_line(update, treestore, &iter, 
 					   "DefMemPerCPU", temp_str);
-	} else {
+	} else if (slurm_ctl_conf_ptr->def_mem_per_task) {
 		snprintf(temp_str, sizeof(temp_str), "%u", 
 			 slurm_ctl_conf_ptr->def_mem_per_task);
 		add_display_treestore_line(update, treestore, &iter, 
 					   "DefMemPerNode", temp_str);
+	} else {
+		add_display_treestore_line(update, treestore, &iter, 
+					   "DefMemPerCPU", "UNLIMITED");
 	}
+
+	if(slurm_ctl_conf_ptr->disable_root_jobs)
+		xbuf = "YES";
+	else
+		xbuf = "NO";
+	add_display_treestore_line(update, treestore, &iter, 
+				   "DisableRootJobs", 
+				   xbuf);
+
+	if(slurm_ctl_conf_ptr->enforce_part_limits)
+		xbuf = "YES";
+	else
+		xbuf = "NO";
+	add_display_treestore_line(update, treestore, &iter, 
+				   "EnforcePartLimits", 
+				   xbuf);
+
 	add_display_treestore_line(update, treestore, &iter, 
 				   "Epilog", 
 				   slurm_ctl_conf_ptr->epilog);
+	snprintf(temp_str, sizeof(temp_str), "%u usec", 
+		 slurm_ctl_conf_ptr->epilog_msg_time);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "EpilogMsgTime", 
+				   temp_str);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "EpilogSlurmctld", 
+				   slurm_ctl_conf_ptr->epilog_slurmctld);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->fast_schedule);
 	add_display_treestore_line(update, treestore, &iter, 
@@ -303,6 +421,19 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "FirstJobId", 
 				   temp_str);
+	snprintf(temp_str, sizeof(temp_str), "%u sec", 
+		 slurm_ctl_conf_ptr->get_env_timeout);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "GetEnvTimeout", 
+				   temp_str);
+	snprintf(temp_str, sizeof(temp_str), "%u sec", 
+		 slurm_ctl_conf_ptr->health_check_interval);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "HealthCheckInterval", 
+				   temp_str);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "HealthCheckProgram", 
+				   slurm_ctl_conf_ptr->health_check_program);
 #ifdef HAVE_XCPU
 	add_display_treestore_line(update, treestore, &iter, 
 				   "HAVE_XCPU", "1");
@@ -313,14 +444,18 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 				   "InactiveLimit", 
 				   temp_str);
 
-	add_display_treestore_line(update, treestore, &iter, 
-				   "JobAcctGatherType", 
-				   slurm_ctl_conf_ptr->job_acct_gather_type);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->job_acct_gather_freq);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "JobAcctGatherFrequency",
 				   temp_str);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "JobAcctGatherType", 
+				   slurm_ctl_conf_ptr->job_acct_gather_type);
+
+	add_display_treestore_line(update, treestore, &iter, 
+				   "JobCheckpointDir", 
+				   slurm_ctl_conf_ptr->job_ckpt_dir);
 
 	add_display_treestore_line(update, treestore, &iter, 
 				   "JobCompHost", 
@@ -328,6 +463,9 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "JobCompLoc", 
 				   slurm_ctl_conf_ptr->job_comp_loc);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "JobCompPass", 
+				   slurm_ctl_conf_ptr->job_comp_pass);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->job_comp_port);
 	add_display_treestore_line(update, treestore, &iter, 
@@ -352,11 +490,23 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 		 slurm_ctl_conf_ptr->job_file_append);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "JobFileAppend", temp_str);
+	snprintf(temp_str, sizeof(temp_str), "%u",
+		 slurm_ctl_conf_ptr->job_requeue);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "JobRequeue", temp_str);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
+		 slurm_ctl_conf_ptr->kill_on_bad_exit);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "KillOnBadExit", 
+				   temp_str);
+	snprintf(temp_str, sizeof(temp_str), "%u sec", 
 		 slurm_ctl_conf_ptr->kill_wait);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "KillWait", 
 				   temp_str);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "Licenses",
+				   slurm_ctl_conf_ptr->licenses);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "MailProg",
 				   slurm_ctl_conf_ptr->mail_prog);
@@ -370,11 +520,14 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 			 slurm_ctl_conf_ptr->max_mem_per_task & (~MEM_PER_CPU));
 		add_display_treestore_line(update, treestore, &iter, 
 					   "MaxMemPerCPU", temp_str);
-	} else {
+	} else if (slurm_ctl_conf_ptr->max_mem_per_task) {
 		snprintf(temp_str, sizeof(temp_str), "%u", 
 			 slurm_ctl_conf_ptr->max_mem_per_task);
 		add_display_treestore_line(update, treestore, &iter, 
 					   "MaxMemPerNode", temp_str);
+	} else {
+		add_display_treestore_line(update, treestore, &iter, 
+					   "MaxMemPerCPU", "UNLIMITED"); 
 	}
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->msg_timeout);
@@ -401,15 +554,79 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "NEXT_JOB_ID",
 				   temp_str);
+	if (slurm_ctl_conf_ptr->over_time_limit == (uint16_t) INFINITE)
+		snprintf(temp_str, sizeof(temp_str), "UNLIMITED");
+	else
+		snprintf(temp_str, sizeof(temp_str), "%u min", 
+			 slurm_ctl_conf_ptr->over_time_limit);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "OverTimeLimit", 
+				   temp_str);
+		
 	add_display_treestore_line(update, treestore, &iter, 
 				   "PluginDir", 
 				   slurm_ctl_conf_ptr->plugindir);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "PlugStackConfig",
 				   slurm_ctl_conf_ptr->plugstack);
+
+	if (strcmp(slurm_ctl_conf_ptr->priority_type, "priority/basic") == 0) {
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityType",
+					   slurm_ctl_conf_ptr->priority_type);
+	} else {
+		secs2time_str((time_t) slurm_ctl_conf_ptr->priority_decay_hl,
+			      temp_str, sizeof(temp_str));
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityDecayHalfLife", temp_str);
+
+		snprintf(temp_str, sizeof(temp_str), "%u", 
+			 slurm_ctl_conf_ptr->priority_favor_small);
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityFavorSmall",
+					   temp_str);
+		secs2time_str((time_t) slurm_ctl_conf_ptr->priority_max_age,
+			      temp_str, sizeof(temp_str));
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityMaxAge", temp_str);
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityUsageResetPeriod", 
+					   _reset_period_str(
+						   slurm_ctl_conf_ptr->
+						   priority_reset_period));
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityType",
+					   slurm_ctl_conf_ptr->priority_type);
+		snprintf(temp_str, sizeof(temp_str), "%u", 
+			 slurm_ctl_conf_ptr->priority_weight_age);
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityWeightAge",
+					   temp_str);
+		snprintf(temp_str, sizeof(temp_str), "%u", 
+			 slurm_ctl_conf_ptr->priority_weight_fs);
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityWeightFairShare",
+					   temp_str);
+		snprintf(temp_str, sizeof(temp_str), "%u", 
+			 slurm_ctl_conf_ptr->priority_weight_js);
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityWeightJobSize",
+					   temp_str);
+		snprintf(temp_str, sizeof(temp_str), "%u", 
+			 slurm_ctl_conf_ptr->priority_weight_part);
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityWeightPartition",
+					   temp_str);
+		snprintf(temp_str, sizeof(temp_str), "%u", 
+			 slurm_ctl_conf_ptr->priority_weight_qos);
+		add_display_treestore_line(update, treestore, &iter, 
+					   "PriorityWeightQOS",
+					   temp_str);
+	}
+
+
 	private_data_string(slurm_ctl_conf_ptr->private_data, 
-			    temp_str2, sizeof(temp_str2));
-	snprintf(temp_str, sizeof(temp_str), "%s", temp_str2);
+			    temp_str, sizeof(temp_str));
 	add_display_treestore_line(update, treestore, &iter, 
 				   "PrivateData",
 				   temp_str);
@@ -419,6 +636,9 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "Prolog", 
 				   slurm_ctl_conf_ptr->prolog);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "PrologSlurmctld", 
+				   slurm_ctl_conf_ptr->prolog_slurmctld);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->propagate_prio_process);
 	add_display_treestore_line(update, treestore, &iter, 
@@ -432,14 +652,31 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 				   propagate_rlimits_except);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "ResumeProgram", temp_str);
-	snprintf(temp_str, sizeof(temp_str), "%u", 
+	snprintf(temp_str, sizeof(temp_str), "%u nodes/min", 
 		 slurm_ctl_conf_ptr->resume_rate);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "ResumeRate", temp_str);
+	snprintf(temp_str, sizeof(temp_str), "%u sec", 
+		 slurm_ctl_conf_ptr->resume_timeout);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "ResumeTimeout", temp_str);
+	if (slurm_ctl_conf_ptr->resv_over_run == (uint16_t) INFINITE)
+		snprintf(temp_str, sizeof(temp_str), "UNLIMITED");
+	else
+		snprintf(temp_str, sizeof(temp_str), "%u min",
+			slurm_ctl_conf_ptr->resv_over_run);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "ResvOverRun", temp_str);		
+
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->ret2service);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "ReturnToService", temp_str);
+	
+	add_display_treestore_line(update, treestore, &iter, 
+				   "SallocDefaultCommand",
+				   slurm_ctl_conf_ptr->salloc_default_command);
+
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->schedport);
 	add_display_treestore_line(update, treestore, &iter, 
@@ -458,6 +695,13 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "SelectType",
 				   slurm_ctl_conf_ptr->select_type);
+	if (slurm_ctl_conf_ptr->select_type_param) {
+		add_display_treestore_line(update, treestore, &iter, 
+					   "SelectTypeParameters",
+					   _select_info(slurm_ctl_conf_ptr->
+							select_type_param));
+	}
+
 	snprintf(temp_str, sizeof(temp_str), "%s(%u)", 
 		 slurm_ctl_conf_ptr->slurm_user_name,
 		 slurm_ctl_conf_ptr->slurm_user_id);
@@ -504,8 +748,14 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 		 slurm_ctl_conf_ptr->slurmd_timeout);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "SlurmdTimeout", temp_str);
+	snprintf(temp_str, sizeof(temp_str), "%s(%u)", 
+		 slurm_ctl_conf_ptr->slurmd_user_name, 
+		 slurm_ctl_conf_ptr->slurmd_user_id);
 	add_display_treestore_line(update, treestore, &iter, 
-				   "SLURM_CONFIG_FILE", 
+				   "SlurmdUser", 
+				   temp_str);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "SLURM_CONF", 
 				   slurm_ctl_conf_ptr->slurm_conf);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "SLURM_VERSION", SLURM_VERSION);
@@ -527,14 +777,22 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "SuspendProgram", 
 				   slurm_ctl_conf_ptr->suspend_program);
-	snprintf(temp_str, sizeof(temp_str), "%u", 
+	snprintf(temp_str, sizeof(temp_str), "%u nodes/min", 
 		 slurm_ctl_conf_ptr->suspend_rate);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "SuspendRate", temp_str);
-	snprintf(temp_str, sizeof(temp_str), "%d", 
-		 ((int)slurm_ctl_conf_ptr->suspend_time - 1));
+	if (!slurm_ctl_conf_ptr->suspend_time) 
+		snprintf(temp_str, sizeof(temp_str), "NONE");
+	else
+		snprintf(temp_str, sizeof(temp_str), "%d sec", 
+			 ((int)slurm_ctl_conf_ptr->suspend_time - 1));
 	add_display_treestore_line(update, treestore, &iter, 
 				   "SuspendTime", temp_str);
+
+	snprintf(temp_str, sizeof(temp_str), "%u sec", 
+		 slurm_ctl_conf_ptr->suspend_timeout);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "SuspendTimeOut", temp_str);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "SwitchType",
 				   slurm_ctl_conf_ptr->switch_type);
@@ -554,6 +812,13 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 	add_display_treestore_line(update, treestore, &iter, 
 				   "TmpFS", 
 				   slurm_ctl_conf_ptr->tmp_fs);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "TopologyPlugin", 
+				   slurm_ctl_conf_ptr->topology_plugin);
+	snprintf(temp_str, sizeof(temp_str), "%u", 
+		 slurm_ctl_conf_ptr->track_wckey);
+	add_display_treestore_line(update, treestore, &iter, 
+				   "TrackWCKey", temp_str);
 	snprintf(temp_str, sizeof(temp_str), "%u", 
 		 slurm_ctl_conf_ptr->tree_width);
 	add_display_treestore_line(update, treestore, &iter, 
@@ -573,6 +838,19 @@ static void _layout_ctl_conf(GtkTreeStore *treestore,
 		 slurm_ctl_conf_ptr->wait_time);
 	add_display_treestore_line(update, treestore, &iter, 
 				   "WaitTime", temp_str);
+
+	if (!slurm_ctl_conf_ptr->select_conf_key_pairs)
+		return;
+
+	add_display_treestore_line_with_font(update, treestore, &iter, 
+				   select_title, NULL, "bold");
+	itr = list_iterator_create(
+		(List)slurm_ctl_conf_ptr->select_conf_key_pairs);
+	while((key_pair = list_next(itr))) {
+		add_display_treestore_line(update, treestore, &iter, 
+					   key_pair->name, key_pair->value);
+	}
+	list_iterator_destroy(itr);
 }
 
 extern void create_config_popup(GtkAction *action, gpointer user_data)
diff --git a/src/sview/sview.h b/src/sview/sview.h
index d1ad5f285ef..4d6cd25bee6 100644
--- a/src/sview/sview.h
+++ b/src/sview/sview.h
@@ -118,7 +118,8 @@ enum { STATUS_ADMIN_MODE,
 };
 
 enum { DISPLAY_NAME,
-       DISPLAY_VALUE 
+       DISPLAY_VALUE, 
+       DISPLAY_FONT 
 };
 
 enum { EDIT_NONE,
@@ -450,7 +451,12 @@ extern void add_display_treestore_line(int update,
 				       GtkTreeStore *treestore,
 				       GtkTreeIter *iter,
 				       const char *name, char *value);
+extern void add_display_treestore_line_with_font(
+	int update,
+	GtkTreeStore *treestore,
+	GtkTreeIter *iter,
+	const char *name, char *value,
+	char *font);
 extern void sview_widget_modify_bg(GtkWidget *widget, GtkStateType state,
 				   const GdkColor color);
-
 #endif
-- 
GitLab