Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AIG-public
Cobalt
Commits
9838ea2e
Commit
9838ea2e
authored
May 19, 2017
by
Paul Rich
Browse files
fixing script crash and logging date/month reversal
parent
2df5a45d
Changes
1
Hide whitespace changes
Inline
Side-by-side
tools/memory_management/reset_memory_mode.py
View file @
9838ea2e
...
...
@@ -50,7 +50,7 @@ logger.addHandler(syslog)
ACCOUNTING_LOG_PATH
=
'/var/log/pbs/boot'
ACCOUNTING_MSG_FMT
=
"%s;%s;%s;%s"
# Date, Type, Jobid, keyvals
ACCOUNTING_DATE_FMT
=
"%
d
/%
m
/%Y %H:%M:%S"
ACCOUNTING_DATE_FMT
=
"%
m
/%
d
/%Y %H:%M:%S"
def
dict_to_keyval_str
(
dct
):
'''put a record keyval dict into a string format for pbs logging'''
...
...
@@ -240,8 +240,8 @@ def main():
initial_modes
[
mode
]
=
[
int
(
nid
)]
nodes_to_modify
.
append
(
int
(
nid
))
initial_mode_list
=
[]
for
mode
,
node_list
in
initial_modes
.
items
():
initial_mode_list
.
append
(
'%s:%s'
%
(
mode
,
compact_num_list
(
node_list
)))
for
mode
,
mod_
node_list
in
initial_modes
.
items
():
initial_mode_list
.
append
(
'%s:%s'
%
(
mode
,
compact_num_list
(
mod_
node_list
)))
# assuming that mode change is immediately followed by reboot. Modify when
# current setting inspection available.
...
...
@@ -250,9 +250,9 @@ def main():
reboot_info
=
{
'bootid'
:
bootid
,
'boot_time'
:
'N/A'
,
'rebooted'
:
compact_num_list
(
nodes_to_modify
),
'blocked'
:
compact_num_list
(
node_list
)
,
'blocked'
:
node_list
,
'from_mode'
:
','
.
join
(
initial_mode_list
),
'to_mode'
:
'%s:%s:%s'
%
(
mcdram_mode
,
numa_mode
,
compact_num_list
(
node_list
)
)
,
'to_mode'
:
'%s:%s:%s'
%
(
mcdram_mode
,
numa_mode
,
node_list
),
'successful'
:
False
,
}
if
len
(
nodes_to_modify
)
!=
0
:
#if we don't have to reboot, don't go through this.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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