Comments (2)
I don't think that depending on an all-zeros node_guid is a reliable method, since the VF node_guid can be set by the user, e.g. echo 00:11:22:33:44:55:1:0 > /sys/class/infiniband/mlx5_0/device/sriov/0/node
.
How about using the existence of the sriov
directory as an indicator of whether the device is a VF or a PF?
(cf. https://docs.nvidia.com/networking/display/ofedv521040/single+root+io+virtualization+(sr-iov))
from node-exporter-textfile-collector-scripts.
I don't think that depending on an all-zeros node_guid is a reliable method, since the VF node_guid can be set by the user, e.g.
echo 00:11:22:33:44:55:1:0 > /sys/class/infiniband/mlx5_0/device/sriov/0/node
.
You are indeed right, this is not a reliable method. And it also seem to depend on which driver one is using.
How about using the existence of the
sriov
directory as an indicator of whether the device is a VF or a PF?
I'm with just mlx5 from within the kernel (didn't install and compile OFED), and there's no sriov directory. There are some
sriov_* files there, though:
root@penny:/sys/class/infiniband/mlx5_0/device # ls sriov*
sriov_drivers_autoprobe sriov_numvfs sriov_offset sriov_stride sriov_totalvfs sriov_vf_device sriov_vf_total_msix
root@penny:/sys/class/infiniband/mlx5_0/device # cat sriov_*
1
4
2
1
32
1018
0
The VF driver directory instead only has one file, writable:
root@penny:/sys/class/infiniband/mlx5_2/device # ls -als sriov_vf_msix_count
0 --w------- 1 root root 4096 Dec 24 11:30 sriov_vf_msix_count
So, I guess we could use driver/sriov_numvfs as a check, but I'm not sure this is valid across different driver combinations, and also I'm not sure what happens if one boots with sriov disabled in bios. I can't test this now.
from node-exporter-textfile-collector-scripts.
Related Issues (20)
- nvme_metrics.sh does not write in given file HOT 2
- nvme_metrics.sh does not work at crontab HOT 2
- smartmon scripts: quote in value HOT 21
- smartmon collector missing node info HOT 2
- monitor LVM cache usage
- Issue with smartmon.sh and type cciss
- freeipmi collector? HOT 2
- Is it possible to run apt_info.py inside a container? HOT 1
- apt_info.py can hang for hours HOT 1
- apt info should report cache age HOT 4
- apt cache age computed incorrectly
- storcli: "BBU Status" field not available in HPE MegaRID controller
- apt_info.py - pending_upgrades always empty
- apt_info.py - wrong cache timestamps
- storcli could not extract drive temperature HOT 1
- Add HP RAID Smart Array support for smartmon.sh
- Cant open smartmon.prom HOT 1
- `smartmon.sh` vs. `smartmon.py` HOT 6
- export more information from apt_info.py: package count, obsolete, broken packages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-exporter-textfile-collector-scripts.