Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
bcd71345
Commit
bcd71345
authored
11 years ago
by
Martins Innus
Committed by
David Bigagli
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add the submission time to squeue output.
parent
1f0625da
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/squeue/opts.c
+5
-0
5 additions, 0 deletions
src/squeue/opts.c
src/squeue/print.c
+12
-0
12 additions, 0 deletions
src/squeue/print.c
src/squeue/print.h
+4
-0
4 additions, 0 deletions
src/squeue/print.h
with
21 additions
and
0 deletions
src/squeue/opts.c
+
5
−
0
View file @
bcd71345
...
@@ -784,6 +784,11 @@ extern int parse_format( char* format )
...
@@ -784,6 +784,11 @@ extern int parse_format( char* format )
field_size
,
field_size
,
right_justify
,
right_justify
,
suffix
);
suffix
);
else
if
(
field
[
0
]
==
'V'
)
job_format_add_time_submit
(
params
.
format_list
,
field_size
,
right_justify
,
suffix
);
else
if
(
field
[
0
]
==
'w'
)
else
if
(
field
[
0
]
==
'w'
)
job_format_add_wckey
(
params
.
format_list
,
job_format_add_wckey
(
params
.
format_list
,
field_size
,
field_size
,
...
...
This diff is collapsed.
Click to expand it.
src/squeue/print.c
+
12
−
0
View file @
bcd71345
...
@@ -680,6 +680,18 @@ long job_time_used(job_info_t * job_ptr)
...
@@ -680,6 +680,18 @@ long job_time_used(job_info_t * job_ptr)
return
(
long
)
(
difftime
(
end_time
,
job_ptr
->
start_time
));
return
(
long
)
(
difftime
(
end_time
,
job_ptr
->
start_time
));
}
}
int
_print_job_time_submit
(
job_info_t
*
job
,
int
width
,
bool
right
,
char
*
suffix
)
{
if
(
job
==
NULL
)
/* Print the Header instead */
_print_str
(
"SUBMIT_TIME"
,
width
,
right
,
true
);
else
_print_time
(
job
->
submit_time
,
0
,
width
,
right
);
if
(
suffix
)
printf
(
"%s"
,
suffix
);
return
SLURM_SUCCESS
;
}
int
_print_job_time_start
(
job_info_t
*
job
,
int
width
,
bool
right
,
int
_print_job_time_start
(
job_info_t
*
job
,
int
width
,
bool
right
,
char
*
suffix
)
char
*
suffix
)
{
{
...
...
This diff is collapsed.
Click to expand it.
src/squeue/print.h
+
4
−
0
View file @
bcd71345
...
@@ -129,6 +129,8 @@ int job_format_add_function(List list, int width, bool right_justify,
...
@@ -129,6 +129,8 @@ int job_format_add_function(List list, int width, bool right_justify,
_print_job_time_limit)
_print_job_time_limit)
#define job_format_add_time_used(list,wid,right,suffix) \
#define job_format_add_time_used(list,wid,right,suffix) \
job_format_add_function(list,wid,right,suffix,_print_job_time_used)
job_format_add_function(list,wid,right,suffix,_print_job_time_used)
#define job_format_add_time_submit(list,wid,right,suffix) \
job_format_add_function(list,wid,right,suffix,_print_job_time_submit)
#define job_format_add_time_start(list,wid,right,suffix) \
#define job_format_add_time_start(list,wid,right,suffix) \
job_format_add_function(list,wid,right,suffix,_print_job_time_start)
job_format_add_function(list,wid,right,suffix,_print_job_time_start)
#define job_format_add_time_end(list,wid,right,suffix) \
#define job_format_add_time_end(list,wid,right,suffix) \
...
@@ -240,6 +242,8 @@ int _print_job_time_limit(job_info_t * job, int width, bool right_justify,
...
@@ -240,6 +242,8 @@ int _print_job_time_limit(job_info_t * job, int width, bool right_justify,
char
*
suffix
);
char
*
suffix
);
int
_print_job_time_used
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
int
_print_job_time_used
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
char
*
suffix
);
char
*
suffix
);
int
_print_job_time_submit
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
char
*
suffix
);
int
_print_job_time_start
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
int
_print_job_time_start
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
char
*
suffix
);
char
*
suffix
);
int
_print_job_time_end
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
int
_print_job_time_end
(
job_info_t
*
job
,
int
width
,
bool
right_justify
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment