Skip to content

Commit

Permalink
Fixed incorrect counting of free cores in host --details
Browse files Browse the repository at this point in the history
Free cores were being incorrectly counted, by ignoring the
number of disabled cores. This figure has been updated to
reflect any number of disabled cores. Accessed through
node_search -[hostname] --details
  • Loading branch information
CodyKank committed Jul 5, 2018
1 parent 5459c11 commit 9b74286
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,4 @@
Add jobs to Host groups --details output
Make --stats option for total core usage. Possible a --report also, for total number
of jobs, users, utilization, % nodes down, etc.
Add -j option to search for a specific job-id.
3 changes: 2 additions & 1 deletion node_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,8 @@ def print_detailed_host(total_cores, used_cores, total_nodes, empty_nodes, desir
print('\nDetailed info pertaining to: ' + desired_host)
print('Total Nodes: {0}'.format(str(len(node_list))))
print('Total Cores : {0}'.format(total_cores) + PRINT_INDENT + 'Used Cores: {0}'.format(used_cores)
+ PRINT_INDENT + 'Free Cores: {0}'.format(str(total_cores - used_cores)) )
+ PRINT_INDENT + 'Free Cores: {0}'.format(str(total_cores - used_cores - disabled_cores))
+ PRINT_INDENT + 'Disabled Cores: {0}'.format(disabled_cores))
print('\nThe following is a list of each node within {0}:\n'.format(desired_host))
print('Node name'.ljust(int(TERMWIDTH/2)) + 'Used Cores/Total Cores')
for node in node_list:
Expand Down

0 comments on commit 9b74286

Please sign in to comment.