Skip to content

Instantly share code, notes, and snippets.

@mpurzynski
Created July 18, 2019 22:51
Show Gist options
  • Save mpurzynski/014885c77d6f38003284d0dd4607b6db to your computer and use it in GitHub Desktop.
Save mpurzynski/014885c77d6f38003284d0dd4607b6db to your computer and use it in GitHub Desktop.
deleteme
#!/usr/bin/python
interfaces = "enp18s0f0 enp216s0f0"
intmap = {}
for int in interfaces.split():
with open("/sys/class/net/"+int+"/device/numa_node") as nn:
intmap[int] = nn.read()
print(json.dumps(intmap))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment