add sriov, power state and numa node info in PciDevice#748
add sriov, power state and numa node info in PciDevice#748SuperQ merged 8 commits intoprometheus:masterfrom asama-ai:master
Conversation
Signed-off-by: Jain Johny <jj@asama.ai>
Signed-off-by: Jain Johny <jj@asama.ai>
Signed-off-by: Jain Johny <jj@asama.ai>
Signed-off-by: Jain Johny <jj@asama.ai>
support for sriov, numa and power management config
Signed-off-by: Jain Johny <jj@asama.ai>
Signed-off-by: root <root@proxmox1.server> Signed-off-by: Jain Johny <jj@asama.ai>
sysfs/pci_device.go
Outdated
|
|
||
| // These files must exist in a device directory. | ||
| for _, f := range [...]string{"class", "vendor", "device", "subsystem_vendor", "subsystem_device", "revision"} { | ||
| for _, f := range [...]string{"class", "vendor", "device", "subsystem_vendor", "subsystem_device", "revision", "numa_node"} { |
There was a problem hiding this comment.
Are we sure numa_node is always going to exist? Even on older kernels? We tend to support some pretty old kernel versions here.
There was a problem hiding this comment.
From 2.6.21 onwards as per
https://kernelnewbies.org/Linux_2_6_21
and
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=81bb0e198b4638ac65233b316f4588639dfe1fcd
But I think I made a mixup here. I used *int32 to make it optional. But added to this list of mandatory files. Will move it out.
There was a problem hiding this comment.
Thanks for double checking the versions. We used to support 2.6.32, but recently Go changed to >= 3.2.0.
So that works.
SuperQ
left a comment
There was a problem hiding this comment.
Thanks, this mostly looks good. Question about the new required file.
Signed-off-by: Jain Johny <jj@asama.ai>
|
I found these important for the observability tool I am building. Once this is merged, I will be adding these to the p8s collector as well.
Test case added from a Intel E810 NIC.
I am not really interested in Offset, Stride VfDevice and MSI-X. Just added for completeness. Please let me know if I should rather remove them.
@discordianfish for your kind review.
ref: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-bus-pci