Skip to content
Snippets Groups Projects
Commit 6949098d authored by Kerri Wait's avatar Kerri Wait
Browse files

Merge branch 'fix-telegraf-disk' into telegraf-1.15

parents 2cc92c5b 994eac76
No related branches found
No related tags found
Loading
#!/usr/bin/python3
import json
import os
def render_data(data):
return json.dumps(data)
device_name = 'mlx5_0'
hw_counters = {}
path = '/sys/class/infiniband/{}/ports/1/hw_counters/'.format(device_name)
hw_counters[device_name] = os.listdir(path)
print(render_data(hw_counters))
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment