Commit 70565a8c authored by Paul Rich's avatar Paul Rich
Browse files

Additional accounting logging for boot script.

parent 49c7581a
......@@ -263,14 +263,17 @@ def main():
'from_mode': ','.join(initial_mode_list),
'to_mode': '%s:%s:%s' % (mcdram_mode, numa_mode, node_list),
'successful': False,
'start': None,
'end': None,
if len(nodes_to_modify) != 0: #if we don't have to reboot, don't go through this.
accounting_start_msg = ACCOUNTING_MSG_FMT % (time.strftime(ACCOUNTING_DATE_FMT, time.gmtime()), 'BS', jobid,
"bootid=%s" % bootid)
"bootid=%s blocked=%s" % (bootid, blocked))
with open(os.path.join(ACCOUNTING_LOG_PATH, accounting_log_filename), "a+") as acc_file:
acc_file.write(accounting_start_msg + '\n')"%s", accounting_start_msg)
start = time.time()
reboot_info['start'] = start
compact_nodes_to_modify = compact_num_list(nodes_to_modify)
if not reset_modes(compact_nodes_to_modify, mcdram_mode, numa_mode,
......@@ -294,7 +297,9 @@ def main():
reboot_info['successful'] = success
reboot_info['boot_time'] = int(time.time() - start)
end = time.time()
reboot_info['end'] = end
reboot_info['boot_time'] = int(end - start)
accounting_end_msg = ACCOUNTING_MSG_FMT % (time.strftime(ACCOUNTING_DATE_FMT, time.gmtime()), 'BE', jobid,
with open(os.path.join(ACCOUNTING_LOG_PATH, accounting_log_filename), "a+") as acc_file:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment