Created
July 18, 2019 22:51
-
-
Save mpurzynski/014885c77d6f38003284d0dd4607b6db to your computer and use it in GitHub Desktop.
deleteme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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