Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update infiniband.py #208

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions network/infiniband/python_modules/infiniband.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,12 @@ def metric_init(params):
with open(lid_file) as f:
# Linux sysfs lists the port_lid in hex
port_lid = int(f.readline().split(' ')[0], 0)
if port_lid == 0:
continue
IB_PORTS[port_lid] = ib_device
except IOError:
print("Unable to read IB port LID # from file: %s" % lid_file)
IB_PORTS[port_lid] = ib_device


# Create definitions for the known perfquery InfiniBand metrics
for metric_name, metric_settings in KNOWN_PERFQUERY_METRICS.iteritems():
name_prefix = metric_settings['name_prefix']
Expand Down