* Minor fix to strip domain name (can be truncated).

master
Wirawan Purwanto 8 years ago
parent f06803ba6c
commit e382a5eb35
  1. 4
      sge/show-node-status.py

@ -149,11 +149,11 @@ def collect_host_stats(qstat_f, show_disabled_nodes=None):
# Extract more useful info
m = re.search(r'^([^@]+)@([^-]+)-(.*)$', queue_node)
m = re.search(r'^([^@]+)@([^-]+)-([^.]*)((?:\..*)?)$', queue_node)
if not m:
raise ParseError, \
"Invalid queue/host combo on line %D: %s" % (FNR, queue_node)
queue, hostkind, hostnum = m.groups()
queue, hostkind, hostnum, hostdomain = m.groups()
hostname = hostkind + "-" + hostnum
slots_resv, slots_used, slots_tot = map(int, core_usage_combo.split("/"))

Loading…
Cancel
Save