Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
olcf-acceptance-team
olcf4-acceptance-tests
Commits
77ba4736
Commit
77ba4736
authored
Jul 22, 2016
by
Joubert, Wayne
Browse files
Minor adjustments.
parent
8fcb13c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Crest/uptime_monitor/test_1node/Scripts/report_executable.x
View file @
77ba4736
...
...
@@ -71,9 +71,11 @@ def main():
# W - job is waiting for its execution time (-a option) to be reached.
# S - (Unicos only) job is suspend.
#
running_jobs_tag
=
'R'
running_job_tag
=
'R'
waiting_job_tag
=
'Q'
job_counts
=
{}
job_counts
.
setdefault
(
running_jobs_tag
,
0
)
job_counts
.
setdefault
(
running_job_tag
,
0
)
job_counts
.
setdefault
(
waiting_job_tag
,
0
)
total_job_count
=
0
process
=
Popen
([
'qstat'
],
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
PIPE
)
output
,
err
=
process
.
communicate
()
...
...
@@ -86,9 +88,24 @@ def main():
total_job_count
+=
1
if
scheduler
==
'lsf'
:
running_jobs_tag
=
'RUN'
#
# PEND - The job is pending. That is, it has not yet been started.
# PROV
# PSUSP
# RUN - The job is currently running.
# USUSP
# SSUSP
# DONE - The job has terminated with status of 0.
# EXIT - The job has terminated with a non-zero status
# UNKWN
# WAIT
# ZOMBI
#
running_job_tag
=
'RUN'
waiting_job_tag
=
'PEND'
job_counts
=
{}
job_counts
.
setdefault
(
running_jobs_tag
,
0
)
job_counts
.
setdefault
(
running_job_tag
,
0
)
job_counts
.
setdefault
(
waiting_job_tag
,
0
)
total_job_count
=
0
process
=
Popen
([
'bjobs'
,
'-a'
],
stdin
=
PIPE
,
stdout
=
PIPE
,
stderr
=
PIPE
)
output
,
err
=
process
.
communicate
()
...
...
@@ -105,12 +122,17 @@ def main():
status_file_obj
=
StatusFile
(
test_id
,
StatusFile
.
MODE_OLD
)
running_job_count
=
job_counts
[
running_jobs_tag
]
running_job_count
=
job_counts
[
running_job_tag
]
waiting_job_count
=
job_counts
[
waiting_job_tag
]
status_file_obj
.
log_custom_event
(
event_type
=
'system'
,
event_subtype
=
'running_job_count'
,
event_value
=
str
(
running_job_count
))
status_file_obj
.
log_custom_event
(
event_type
=
'system'
,
event_subtype
=
'waiting_job_count'
,
event_value
=
str
(
waiting_job_count
))
status_file_obj
.
log_custom_event
(
event_type
=
'system'
,
event_subtype
=
'total_job_count'
,
event_value
=
str
(
total_job_count
))
...
...
@@ -119,8 +141,10 @@ def main():
file_path
=
os
.
path
.
join
(
path_to_results
,
'out_system_job_counts.csv'
)
file_
=
open
(
file_path
,
'w'
)
file_
.
write
(
'running_job_count'
+
'
\t
'
+
'total_job_count'
+
'
\n
'
)
file_
.
write
(
str
(
job_counts
[
running_jobs_tag
])
+
'
\t
'
+
file_
.
write
(
'running_job_count'
+
'
\t
'
+
'waiting_job_count'
+
'
\t
'
+
'total_job_count'
+
'
\n
'
)
file_
.
write
(
str
(
running_job_count
)
+
'
\t
'
+
str
(
waiting_job_count
)
+
'
\t
'
+
str
(
total_job_count
)
+
'
\n
'
)
file_
.
close
()
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment