Skip to content
Snippets Groups Projects
Commit 66e16c6e authored by Danny Auble's avatar Danny Auble
Browse files

fix formating issue

parent 0c7389f0
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
#include "sacct.h" #include "sacct.h"
#include "src/common/parse_time.h" #include "src/common/parse_time.h"
#include "slurm.h" #include "slurm.h"
#define FORMAT_STRING_SIZE 50 #define FORMAT_STRING_SIZE 34
void _elapsed_time(long secs, long usecs, char *str); void _elapsed_time(long secs, long usecs, char *str);
...@@ -871,17 +871,17 @@ void print_pages(type_t type, void *object) ...@@ -871,17 +871,17 @@ void print_pages(type_t type, void *object)
char outbuf[FORMAT_STRING_SIZE]; char outbuf[FORMAT_STRING_SIZE];
char buf1[FORMAT_STRING_SIZE]; char buf1[FORMAT_STRING_SIZE];
char buf2[FORMAT_STRING_SIZE]; char buf2[FORMAT_STRING_SIZE];
char buf3[50]; char buf3[FORMAT_STRING_SIZE];
sacct_t sacct; sacct_t sacct;
char *nodes = NULL; char *nodes = NULL;
uint32_t pos; uint32_t pos;
switch(type) { switch(type) {
case HEADLINE: case HEADLINE:
printf("%-50s", "MaxPages/Node:Task - Ave"); printf("%-34s", "MaxPages/Node:Task - Ave");
break; break;
case UNDERSCORE: case UNDERSCORE:
printf("%-50s", "----------------------------------"); printf("%-34s", "----------------------------------");
break; break;
case JOB: case JOB:
sacct = job->sacct; sacct = job->sacct;
...@@ -901,7 +901,7 @@ void print_pages(type_t type, void *object) ...@@ -901,7 +901,7 @@ void print_pages(type_t type, void *object)
sacct.max_pages_id.taskid, sacct.max_pages_id.taskid,
buf2); buf2);
} }
printf("%-50s", outbuf); printf("%-34s", outbuf);
break; break;
case JOBSTEP: case JOBSTEP:
sacct = step->sacct; sacct = step->sacct;
...@@ -915,10 +915,10 @@ void print_pages(type_t type, void *object) ...@@ -915,10 +915,10 @@ void print_pages(type_t type, void *object)
buf3, buf3,
sacct.max_pages_id.taskid, sacct.max_pages_id.taskid,
buf2); buf2);
printf("%-50s", outbuf); printf("%-34s", outbuf);
break; break;
default: default:
printf("%-50s", "n/a"); printf("%-34s", "n/a");
break; break;
} }
} }
...@@ -930,17 +930,17 @@ void print_rss(type_t type, void *object) ...@@ -930,17 +930,17 @@ void print_rss(type_t type, void *object)
char outbuf[FORMAT_STRING_SIZE]; char outbuf[FORMAT_STRING_SIZE];
char buf1[FORMAT_STRING_SIZE]; char buf1[FORMAT_STRING_SIZE];
char buf2[FORMAT_STRING_SIZE]; char buf2[FORMAT_STRING_SIZE];
char buf3[50]; char buf3[FORMAT_STRING_SIZE];
sacct_t sacct; sacct_t sacct;
char *nodes = NULL; char *nodes = NULL;
uint32_t pos; uint32_t pos;
switch(type) { switch(type) {
case HEADLINE: case HEADLINE:
printf("%-50s", "MaxRSS/Node:Task - Ave"); printf("%-34s", "MaxRSS/Node:Task - Ave");
break; break;
case UNDERSCORE: case UNDERSCORE:
printf("%-50s", "--------------------------------"); printf("%-34s", "----------------------------------");
break; break;
case JOB: case JOB:
sacct = job->sacct; sacct = job->sacct;
...@@ -960,7 +960,7 @@ void print_rss(type_t type, void *object) ...@@ -960,7 +960,7 @@ void print_rss(type_t type, void *object)
sacct.max_rss_id.taskid, sacct.max_rss_id.taskid,
buf2); buf2);
} }
printf("%-50s", outbuf); printf("%-34s", outbuf);
break; break;
case JOBSTEP: case JOBSTEP:
sacct = step->sacct; sacct = step->sacct;
...@@ -974,10 +974,10 @@ void print_rss(type_t type, void *object) ...@@ -974,10 +974,10 @@ void print_rss(type_t type, void *object)
buf3, buf3,
sacct.max_rss_id.taskid, sacct.max_rss_id.taskid,
buf2); buf2);
printf("%-50s", outbuf); printf("%-34s", outbuf);
break; break;
default: default:
printf("%-50s", "n/a"); printf("%-34s", "n/a");
break; break;
} }
} }
...@@ -1270,17 +1270,17 @@ void print_vsize(type_t type, void *object) ...@@ -1270,17 +1270,17 @@ void print_vsize(type_t type, void *object)
char outbuf[FORMAT_STRING_SIZE]; char outbuf[FORMAT_STRING_SIZE];
char buf1[FORMAT_STRING_SIZE]; char buf1[FORMAT_STRING_SIZE];
char buf2[FORMAT_STRING_SIZE]; char buf2[FORMAT_STRING_SIZE];
char buf3[50]; char buf3[FORMAT_STRING_SIZE];
sacct_t sacct; sacct_t sacct;
char *nodes = NULL; char *nodes = NULL;
uint32_t pos; uint32_t pos;
switch(type) { switch(type) {
case HEADLINE: case HEADLINE:
printf("%-50s", "MaxVSIZE/Node:Task - Ave"); printf("%-34s", "MaxVSIZE/Node:Task - Ave");
break; break;
case UNDERSCORE: case UNDERSCORE:
printf("%-50s", "----------------------------------"); printf("%-34s", "----------------------------------");
break; break;
case JOB: case JOB:
sacct = job->sacct; sacct = job->sacct;
...@@ -1299,7 +1299,7 @@ void print_vsize(type_t type, void *object) ...@@ -1299,7 +1299,7 @@ void print_vsize(type_t type, void *object)
sacct.max_vsize_id.taskid, sacct.max_vsize_id.taskid,
buf2); buf2);
} }
printf("%-50s", outbuf); printf("%-34s", outbuf);
break; break;
case JOBSTEP: case JOBSTEP:
sacct = step->sacct; sacct = step->sacct;
...@@ -1313,10 +1313,10 @@ void print_vsize(type_t type, void *object) ...@@ -1313,10 +1313,10 @@ void print_vsize(type_t type, void *object)
buf3, buf3,
sacct.max_vsize_id.taskid, sacct.max_vsize_id.taskid,
buf2); buf2);
printf("%-50s", outbuf); printf("%-34s", outbuf);
break; break;
default: default:
printf("%-50s", "n/a"); printf("%-34s", "n/a");
break; break;
} }
} }
...@@ -1328,17 +1328,17 @@ void print_cputime(type_t type, void *object) ...@@ -1328,17 +1328,17 @@ void print_cputime(type_t type, void *object)
char outbuf[FORMAT_STRING_SIZE]; char outbuf[FORMAT_STRING_SIZE];
char buf1[FORMAT_STRING_SIZE]; char buf1[FORMAT_STRING_SIZE];
char buf2[FORMAT_STRING_SIZE]; char buf2[FORMAT_STRING_SIZE];
char buf3[50]; char buf3[FORMAT_STRING_SIZE];
sacct_t sacct; sacct_t sacct;
char *nodes = NULL; char *nodes = NULL;
uint32_t pos; uint32_t pos;
switch(type) { switch(type) {
case HEADLINE: case HEADLINE:
printf("%-50s", "MinCPUtime/Node:Task - Ave"); printf("%-37s", "MinCPUtime/Node:Task - Ave");
break; break;
case UNDERSCORE: case UNDERSCORE:
printf("%-50s", "------------------------------------"); printf("%-37s", "-------------------------------------");
break; break;
case JOB: case JOB:
sacct = job->sacct; sacct = job->sacct;
...@@ -1358,7 +1358,7 @@ void print_cputime(type_t type, void *object) ...@@ -1358,7 +1358,7 @@ void print_cputime(type_t type, void *object)
sacct.min_cpu_id.taskid, sacct.min_cpu_id.taskid,
buf2); buf2);
} }
printf("%-50s", outbuf); printf("%-37s", outbuf);
break; break;
case JOBSTEP: case JOBSTEP:
sacct = step->sacct; sacct = step->sacct;
...@@ -1373,10 +1373,10 @@ void print_cputime(type_t type, void *object) ...@@ -1373,10 +1373,10 @@ void print_cputime(type_t type, void *object)
buf3, buf3,
sacct.min_cpu_id.taskid, sacct.min_cpu_id.taskid,
buf2); buf2);
printf("%-50s", outbuf); printf("%-37s", outbuf);
break; break;
default: default:
printf("%-50s", "n/a"); printf("%-37s", "n/a");
break; break;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment