TEJASWI k, on ven. 13 oct. 2017 14:44:53 +0530, wrote:
> Thanks I could get the linkspeed when i tried with root user.
> But is there no other way?
See Brice's answer :)
> And what is the reason behind this limitation?
Ask Linux people, not us :)
I can only guess that they are afraid
Thanks I could get the linkspeed when i tried with root user.
But is there no other way? And what is the reason behind this limitation?
Thanks & Regards,
On 13-Oct-2017 2:30 PM, "Samuel Thibault" wrote:
TEJASWI k, on ven. 13 oct. 2017 14:23:00 +0530,
TEJASWI k, on ven. 13 oct. 2017 14:23:00 +0530, wrote:
> All the other details I am able to query but linkspeed (pciObj->attr->
> bridge.upstream.pci.linkspeed) is always 0.
> Do I need to enable any other flag to get linkspeed or am I going wrong
You need to run as root for
On Linux, the PCI linkspeed requires root privileges unfortunately
(except for the uplink above NVIDIA GPUs where we have another way to
The only way to workaround this is to dump the topology as XML as root
and then reload it at runtime (e.g. with HWLOC_XMLFILE) :/
I am trying to traverse the topology using hwloc APIs starting from a PCI
device till Host Bridge
My code snippet:
unsigned long flags = HWLOC_TOPOLOGY_FLAG_IO_DEVICES |
retval = hwloc_topology_init();
retval = hwloc_topology_set_flags(topology,