diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 843361049e4c692f47394042762b1bcc2f5b72a3..0a83195940f5e92dfdbb18325af157bf921ed8b3 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -26,6 +26,7 @@ man3_MANS = man3/hostlist_create.3 \
 	man3/slurm_free_resource_allocation_and_run_response_msg.3 \
 	man3/slurm_free_resource_allocation_response_msg.3 \
 	man3/slurm_free_submit_response_response_msg.3 \
+	man3/slurm_get_end_time.3 \
 	man3/slurm_get_errno.3 \
 	man3/slurm_get_job_steps.3 \
 	man3/slurm_init_job_desc_msg.3 \
diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1
index a6ea4564aeb19c953370fd063622508231118114..8d0ccd7394b25099c4a12ee1be3fcbc89c604b7b 100644
--- a/doc/man/man1/scontrol.1
+++ b/doc/man/man1/scontrol.1
@@ -61,9 +61,9 @@ Display a description of scontrol options and commands.
 \fIoneliner\fP
 Print information one line per record.
 .TP
-\fIpid2jid\fP \fIPROC_ID\fP
-Print the Slurm job id corresponding to the supplied process id, \fIPROC_ID\fP,
-on the current node.
+\fIpidinfo\fP \fIPROC_ID\fP
+Print the Slurm job id and scheduled termination time corresponding to the 
+supplied process id, \fIPROC_ID\fP, on the current node.
 .TP
 \fIping\fP
 Ping the primary and secondary slurmctld daemon and report if 
diff --git a/doc/man/man3/slurm_free_job_info_msg.3 b/doc/man/man3/slurm_free_job_info_msg.3
index b3fad502213898292b5e3d31509a103466735bdf..cbf254dde34cb677439deb0a83fb9de0d627faba 100644
--- a/doc/man/man3/slurm_free_job_info_msg.3
+++ b/doc/man/man3/slurm_free_job_info_msg.3
@@ -1,6 +1,7 @@
-.TH "Slurm API" "3" "September 2003" "Morris Jette" "Slurm job information reporting functions"
+.TH "Slurm API" "3" "October 2003" "Morris Jette" "Slurm job information reporting functions"
 .SH "NAME"
-slurm_free_job_info_msg, slurm_load_jobs, 
+slurm_free_job_info_msg, slurm_get_end_time,
+slurm_load_jobs, slurm_pid2jobid, 
 slurm_print_job_info, slurm_print_job_info_msg
 \- Slurm job information reporting functions
 .SH "SYNTAX"
@@ -32,6 +33,14 @@ int \fBslurm_pid2jobid\fR (
 	uint32_t *\fIjob_id_ptr\fP
 .br 
 );
+.LP
+int \fBslurm_get_end_time\fR (
+.br
+	uint32_t \fIjobid\fP, 
+.br
+	time_t *\fIend_time_ptr\fP
+.br
+);
 .LP 
 void \fBslurm_print_job_info\fR (
 .br
@@ -53,20 +62,27 @@ void \fBslurm_print_job_info_msg\fR (
 .br 
 );
 .SH "ARGUMENTS"
-.LP 
+.TP 
+\fIend_time_ptr\fP
+Specified a pointer to a storage location into which the expected termination 
+time of a job is placed.
 .TP 
 \fIjob_info_msg_pptr\fP
-Specifies the double pointer to the structure to be created and filled with the 
-time of the last job update, a record count, and detailed information about each 
-job. Detailed job information is written to fixed sized records and includes: 
-ID number, name, user ID, state, assigned or requested node names, indexes into 
-the node table, etc. In the case of indexes into the node table, this is an array 
-of integers with pairs of start and end index number into the node information 
-records and the data is terminated with a value of -1. See slurm.h for full details 
-on the data structure's contents. 
+Specifies the double pointer to the structure to be created and filled with 
+the time of the last job update, a record count, and detailed information 
+about each job. Detailed job information is written to fixed sized records 
+and includes: ID number, name, user ID, state, assigned or requested node 
+names, indexes into the node table, etc. In the case of indexes into the 
+node table, this is an array of integers with pairs of start and end index 
+number into the node information records and the data is terminated with a 
+value of -1. See slurm.h for full details on the data structure's contents. 
+.TP 
+\fIjob_id\fP
+Specifies a slurm job id.
 .TP 
 \fIjob_id_ptr\fP
-Specifies a pointer to a storage location into which a Slurm job id may be placed.
+Specifies a pointer to a storage location into which a Slurm job id may be 
+placed.
 .TP 
 \fIjob_info_msg_ptr\fP
 Specifies the pointer to the structure created by \fBslurm_load_jobs\fR. 
@@ -75,8 +91,8 @@ Specifies the pointer to the structure created by \fBslurm_load_jobs\fR.
 Specifies a process id of some process on the current node.
 .TP
 \fIjob_ptr\fP
-Specifies a pointer to a single job records from the \fIjob_info_msg_ptr\fP data 
-structure.
+Specifies a pointer to a single job records from the \fIjob_info_msg_ptr\fP 
+data structure.
 .TP 
 \fIone_liner\fP
 Print one record per line if non-zero.
@@ -85,29 +101,41 @@ Print one record per line if non-zero.
 Specifies the file to print data to.
 .TP 
 \fIupdate_time\fP
-For all of the following informational calls, if update_time is equal to or greater than the last time changes where made to that information, new information is not returned.  Otherwise all the configuration. job, node, or partition records are returned.
+For all of the following informational calls, if update_time is equal to or 
+greater than the last time changes where made to that information, new 
+information is not returned.  Otherwise all the configuration. job, node, 
+or partition records are returned.
 .SH "DESCRIPTION"
 .LP 
-\fBslurm_free_job_info_msg\fR Release the storage generated by the \fBslurm_load_jobs\fR 
-function.
+\fBslurm_free_job_info_msg\fR Release the storage generated by the 
+\fBslurm_load_jobs\fR function.
+.LP 
+\fBslurm_get_end_time\fR Returns the expected termination time of a specified 
+Slurm job id. The time corresponds to the exhaustion of the job's or partition's 
+time limit.
 .LP 
-\fBslurm_load_jobs\fR Returns a job_info_msg_t that contains an update time, record count, and array of job_table records for all jobs.
+\fBslurm_load_jobs\fR Returns a job_info_msg_t that contains an update time, 
+record count, and array of job_table records for all jobs.
 .LP 
-\fBslurm_pid2jobid\fR Returns a Slurm job id corresponding to the supplied local process id.
+\fBslurm_pid2jobid\fR Returns a Slurm job id corresponding to the supplied 
+local process id.
 .LP 
-\fBslurm_print_job_info\fR Prints the contents of the data structure describing a 
-single job records from the data loaded by the \fBslurm_load_node\fR function.
+\fBslurm_print_job_info\fR Prints the contents of the data structure 
+describing a single job records from the data loaded by the 
+\fBslurm_load_node\fR function.
 .LP 
-\fBslurm_print_job_info_msg\fR Prints the contents of the data structure describing 
-all job records loaded by the \fBslurm_load_node\fR function.
+\fBslurm_print_job_info_msg\fR Prints the contents of the data structure 
+describing all job records loaded by the \fBslurm_load_node\fR function.
 .SH "RETURN VALUE"
 .LP
-On success, zero is returned. On error, -1 is returned, and Slurm error code is set appropriately.
+On success, zero is returned. On error, -1 is returned, and Slurm error code 
+is set appropriately.
 .SH "ERRORS"
 .LP
 \fBSLURM_NO_CHANGE_IN_DATA\fR Data has not changed since \fBupdate_time\fR.
 .LP
-\fBSLURM_PROTOCOL_VERSION_ERROR\fR Protocol version has changed, re-link your code.
+\fBSLURM_PROTOCOL_VERSION_ERROR\fR Protocol version has changed, re-link 
+your code.
 .LP
 \fBESLURM_INVALID_JOB_ID\fR Request for information about a non-existent job.
 .LP
diff --git a/doc/man/man3/slurm_get_end_time.3 b/doc/man/man3/slurm_get_end_time.3
new file mode 100644
index 0000000000000000000000000000000000000000..836ffa79b478c25f79af77cc002dc816f26891c0
--- /dev/null
+++ b/doc/man/man3/slurm_get_end_time.3
@@ -0,0 +1 @@
+.so man3/slurm_free_job_info_msg.3
diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in
index a8aa659f146f47eb259363bbbf4e1d0debc89bab..43a3a28ba5f89456b58a5ef4c26c2c0415f3eea4 100644
--- a/slurm/slurm.h.in
+++ b/slurm/slurm.h.in
@@ -648,7 +648,7 @@ extern void slurm_print_ctl_conf PARAMS((
  *	information if changed since update_time 
  * IN update_time - time of current configuration data
  * IN job_info_msg_pptr - place to store a job configuration pointer
- * RET 0 or a slurm error code
+ * RET 0 or -1 on error
  * NOTE: free the response using slurm_free_job_info_msg
  */
 extern int slurm_load_jobs PARAMS((
@@ -681,12 +681,20 @@ extern void slurm_print_job_info_msg PARAMS((
 extern void slurm_print_job_info PARAMS(( FILE*, job_info_t * job_ptr, 
 					  int one_liner ));
 
+/*
+ * slurm_get_end_time - get the expected end time for a given slurm job
+ * IN jobid     - slurm job id
+ * end_time_ptr - location in which to store scheduled end time for job 
+ * RET 0 or -1 on error
+ */
+extern int slurm_get_end_time PARAMS((uint32_t jobid, time_t *end_time_ptr));
+
 /*
  * slurm_pid2jobid - issue RPC to get the slurm job_id given a process_id 
  *	on this machine
  * IN job_pid - process_id of interest on this machine
  * OUT job_id_ptr - place to store a slurm job_id
- * RET 0 or a slurm error code
+ * RET 0 or -1 on error
  */
 extern int slurm_pid2jobid PARAMS(( pid_t job_pid, uint32_t * job_id_ptr )) ;
 
@@ -694,7 +702,7 @@ extern int slurm_pid2jobid PARAMS(( pid_t job_pid, uint32_t * job_id_ptr )) ;
  * slurm_update_job - issue RPC to a job's configuration per request, 
  *	only usable by user root or (for some parameters) the job's owner
  * IN job_msg - description of job updates
- * RET 0 on success or slurm error code
+ * RET 0 or -1 on error
  */
 extern int slurm_update_job PARAMS(( job_desc_msg_t * job_msg )) ;
 
diff --git a/src/api/job_info.c b/src/api/job_info.c
index cb3acb4afe23fd59c20a13bf6b6d9b59e344c694..853a2a2fb6f854a88df9c21e686d6fba2353bc57 100644
--- a/src/api/job_info.c
+++ b/src/api/job_info.c
@@ -38,6 +38,7 @@
 #include <time.h>
 
 #include <slurm/slurm.h>
+#include <slurm/slurm_errno.h>
 
 #include "src/common/slurm_protocol_api.h"
 
@@ -48,7 +49,7 @@
  * IN job_info_msg_ptr - job information message pointer
  * IN one_liner - print as a single line if true
  */
-void 
+extern void 
 slurm_print_job_info_msg ( FILE* out, job_info_msg_t *jinfo, int one_liner )
 {
 	int i;
@@ -70,7 +71,7 @@ slurm_print_job_info_msg ( FILE* out, job_info_msg_t *jinfo, int one_liner )
  * IN job_ptr - an individual job information record pointer
  * IN one_liner - print as a single line if true
  */
-void
+extern void
 slurm_print_job_info ( FILE* out, job_info_t * job_ptr, int one_liner )
 {
 	int j;
@@ -208,7 +209,7 @@ slurm_print_job_info ( FILE* out, job_info_t * job_ptr, int one_liner )
  * IN time - a time stamp
  * OUT string - pointer user defined buffer
  */
-void
+extern void
 make_time_str (time_t *time, char *string)
 {
 	struct tm time_tm;
@@ -225,10 +226,10 @@ make_time_str (time_t *time, char *string)
  *	information if changed since update_time 
  * IN update_time - time of current configuration data
  * IN job_info_msg_pptr - place to store a job configuration pointer
- * RET 0 or a slurm error code
+ * RET 0 or -1 on error
  * NOTE: free the response using slurm_free_job_info_msg
  */
-int
+extern int
 slurm_load_jobs (time_t update_time, job_info_msg_t **resp)
 {
 	int rc;
@@ -266,11 +267,11 @@ slurm_load_jobs (time_t update_time, job_info_msg_t **resp)
 /*
  * slurm_pid2jobid - issue RPC to get the slurm job_id given a process_id 
  *	on this machine
- * IN job_pid - process_id of interest on this machine
+ * IN job_pid     - process_id of interest on this machine
  * OUT job_id_ptr - place to store a slurm job_id
- * RET 0 or a slurm error code
+ * RET 0 or -1 on error
  */
-int
+extern int
 slurm_pid2jobid (pid_t job_pid, uint32_t *jobid)
 {
 	int rc;
@@ -310,3 +311,34 @@ slurm_pid2jobid (pid_t job_pid, uint32_t *jobid)
 	return SLURM_PROTOCOL_SUCCESS;
 }
 
+/*
+ * slurm_get_end_time - get the expected end time for a given slurm job
+ * IN jobid     - slurm job id
+ * end_time_ptr - location in which to store scheduled end time for job 
+ * RET 0 or -1 on error
+ */
+extern int
+slurm_get_end_time(uint32_t jobid, time_t *end_time_ptr)
+{
+	int error_code, i;
+	job_info_msg_t *jinfo;
+	job_info_t *job_ptr;
+
+	if ((error_code = slurm_load_jobs ((time_t) NULL, &jinfo)))
+		return error_code;
+
+	error_code = SLURM_ERROR;	/* error until job found */
+	job_ptr = jinfo->job_array;
+	for (i = 0; i < jinfo->record_count; i++) {
+		if (job_ptr[i].job_id != jobid)
+			continue;
+		*end_time_ptr = job_ptr[i].end_time;
+		error_code = SLURM_SUCCESS;
+		break;
+	}
+	slurm_free_job_info_msg(jinfo);
+
+	if (error_code)
+		slurm_seterrno(ESLURM_INVALID_JOB_ID);
+	return error_code; 
+}
diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c
index 74820c059cea968c1d0cfa71ed833629ffa0a7e3..22263ea5c566d7963425b1d4952260b7f3976644 100644
--- a/src/scontrol/scontrol.c
+++ b/src/scontrol/scontrol.c
@@ -79,7 +79,7 @@ static int 	_load_nodes (node_info_msg_t ** node_buffer_pptr);
 static int 	_load_partitions (partition_info_msg_t **part_info_pptr);
 static void	_parse_conf_line (char *in_line, bool *any_slurmctld,
 				bool *have_slurmctld, bool *have_slurmd);
-static void	_pid2jid(pid_t job_pid);
+static void	_pid_info(pid_t job_pid);
 static void	_ping_slurmctld(slurm_ctl_conf_info_msg_t *slurm_ctl_conf_ptr);
 static void	_print_completing (void);
 static void	_print_completing_job(job_info_t *job_ptr, 
@@ -370,24 +370,35 @@ _load_partitions (partition_info_msg_t **part_buffer_pptr)
 }
 
 /* 
- * _pid2jid - given a local process id, print the corresponding slurm job id
+ * _pid_info - given a local process id, print the corresponding slurm job id
+ *	and its expected end time
  * IN job_pid - the local process id of interest
  */
 static void
-_pid2jid(pid_t job_pid)
+_pid_info(pid_t job_pid)
 {
 	int error_code;
 	uint32_t job_id;
+	time_t end_time;
 
 	error_code = slurm_pid2jobid (job_pid, &job_id);
-	if (error_code == SLURM_SUCCESS)
-		printf("Slurm job id: %u\n", job_id);
-	else {
+	if (error_code) {
 		exit_code = 1;
 		if (quiet_flag != 1)
 			slurm_perror ("slurm_pid2jobid error");
+		return;
+	}
+
+	error_code = slurm_get_end_time(job_id, &end_time);
+	if (error_code) {
+		exit_code = 1;
+		if (quiet_flag != 1)
+			slurm_perror ("slurm_get_end_time error");
+		return;
 	}
 
+	/* printf("Slurm job id: %u\n", job_id);   old format */
+	printf("Slurm job id: %u ends at %s", job_id, ctime(&end_time));
 	return;
 }
 
@@ -1032,7 +1043,7 @@ _process_command (int argc, char *argv[])
 		}
 		one_liner = 1;
 	}
-	else if (strncasecmp (argv[0], "pid2jid", 3) == 0) {
+	else if (strncasecmp (argv[0], "pidinfo", 3) == 0) {
 		if (argc > 2) {
 			exit_code = 1;
 			fprintf (stderr, 
@@ -1044,7 +1055,7 @@ _process_command (int argc, char *argv[])
 				 "missing argument for keyword:%s\n", 
 				 argv[0]);
 		} else
-			_pid2jid ((pid_t) atol (argv[1]) );
+			_pid_info ((pid_t) atol (argv[1]) );
 
 	}
 	else if (strncasecmp (argv[0], "ping", 3) == 0) {
@@ -1595,7 +1606,7 @@ scontrol [<OPTION>] [<COMMAND>]                                            \n\
      exit                     terminate scontrol                           \n\
      help                     print this description of use.               \n\
      oneliner                 report output one record per line.           \n\
-     pid2jid <pid>            return slurm job id for given pid.           \n\
+     pidinfo <pid>            return slurm job information for given pid.  \n\
      ping                     print status of slurmctld daemons.           \n\
      quiet                    print no messages other than error messages. \n\
      quit                     terminate this command.                      \n\