From ef7d42556bab94419c48449d18b490914a63e628 Mon Sep 17 00:00:00 2001 From: Danny Auble <da@llnl.gov> Date: Thu, 5 Jun 2008 18:38:00 +0000 Subject: [PATCH] fixes for job displaying --- src/common/jobacct_common.c | 4 ++-- src/plugins/accounting_storage/mysql/mysql_jobacct_process.c | 2 +- src/plugins/accounting_storage/pgsql/pgsql_jobacct_process.c | 2 +- src/sacct/options.c | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/common/jobacct_common.c b/src/common/jobacct_common.c index 316123bfa18..e3e737c988a 100644 --- a/src/common/jobacct_common.c +++ b/src/common/jobacct_common.c @@ -240,7 +240,7 @@ extern void pack_jobacct_job_rec(void *object, Buf buffer) pack32(job->tot_cpu_usec, buffer); pack16(job->track_steps, buffer); pack32(job->uid, buffer); - //packstr(job->user, buffer); + packstr(job->user, buffer); pack32(job->user_cpu_sec, buffer); pack32(job->user_cpu_usec, buffer); } @@ -294,7 +294,7 @@ extern int unpack_jobacct_job_rec(void **job, Buf buffer) safe_unpack32(&job_ptr->tot_cpu_usec, buffer); safe_unpack16(&job_ptr->track_steps, buffer); safe_unpack32(&job_ptr->uid, buffer); - //safe_unpackstr_xmalloc(&job_ptr->user, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_ptr->user, &uint32_tmp, buffer); safe_unpack32(&job_ptr->user_cpu_sec, buffer); safe_unpack32(&job_ptr->user_cpu_usec, buffer); diff --git a/src/plugins/accounting_storage/mysql/mysql_jobacct_process.c b/src/plugins/accounting_storage/mysql/mysql_jobacct_process.c index 359c1926ff7..ba2781dcdcf 100644 --- a/src/plugins/accounting_storage/mysql/mysql_jobacct_process.c +++ b/src/plugins/accounting_storage/mysql/mysql_jobacct_process.c @@ -382,7 +382,7 @@ extern List mysql_jobacct_process_get_jobs(mysql_conn_t *mysql_conn, step->state = atoi(step_row[STEP_REQ_STATE]); step->exitcode = atoi(step_row[STEP_REQ_COMP_CODE]); step->ncpus = atoi(step_row[STEP_REQ_CPUS]); - step->start = atoi(step_row[JOB_REQ_START]); + step->start = atoi(step_row[STEP_REQ_START]); step->end = atoi(step_row[STEP_REQ_END]); /* figure this out by start stop */ diff --git a/src/plugins/accounting_storage/pgsql/pgsql_jobacct_process.c b/src/plugins/accounting_storage/pgsql/pgsql_jobacct_process.c index c1ff95fb8f8..e62cbdf3d4c 100644 --- a/src/plugins/accounting_storage/pgsql/pgsql_jobacct_process.c +++ b/src/plugins/accounting_storage/pgsql/pgsql_jobacct_process.c @@ -382,7 +382,7 @@ extern List pgsql_jobacct_process_get_jobs(PGconn *acct_pgsql_db, step->ncpus = atoi( PQgetvalue(step_result, j, STEP_REQ_CPUS)); step->start = atoi( - PQgetvalue(step_result, j, JOB_REQ_START)); + PQgetvalue(step_result, j, STEP_REQ_START)); step->end = atoi( PQgetvalue(step_result, j, STEP_REQ_ENDTIME)); /* figure this out by start stop */ diff --git a/src/sacct/options.c b/src/sacct/options.c index 330b6254884..8e179a2bbb7 100644 --- a/src/sacct/options.c +++ b/src/sacct/options.c @@ -1128,6 +1128,7 @@ void do_list(void) /* FIX ME: this should be handled while getting the data, not afterwards. */ + if (params.opt_uid >= 0 && (job->uid != params.opt_uid)) continue; if (params.opt_gid >= 0 && (job->gid != params.opt_gid)) -- GitLab