From e382a5eb3542fc3344e0c84ead769ae3f26485db Mon Sep 17 00:00:00 2001 From: Wirawan Purwanto Date: Wed, 14 Sep 2016 10:27:45 -0400 Subject: [PATCH] * Minor fix to strip domain name (can be truncated). --- sge/show-node-status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sge/show-node-status.py b/sge/show-node-status.py index 775d616..409f969 100755 --- a/sge/show-node-status.py +++ b/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("/"))