如何获取连接显示器的GPU卡列表?
我可以获得一个包含以下参数的列表:pciBusID,pciDeviceID,pciDomainID?
答案 0 :(得分:1)
我们可以使用nVidia视频驱动程序中包含的实用程序 nvidia-smi 来指示连接的GPU卡显示器(仅适用于专业GPU卡:Quadro / Tesla):< / p>
nvidia-smi输出的例子:
+------------------------------------------------------+
| NVIDIA-SMI 332.88 Driver Version: 332.88 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 Quadro K4000 WDDM | 0000:01:00.0 Off | N/A |
| 30% 30C P8 9W / 87W | 3027MiB / 3071MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
| 1 GeForce GT 640 WDDM | 0000:02:00.0 N/A | N/A |
| 40% 27C N/A N/A / N/A | 2005MiB / 2047MiB | N/A Default |
+-------------------------------+----------------------+----------------------+
| 2 Quadro K4000 WDDM | 0000:03:00.0 On | N/A |
| 30% 34C P8 11W / 87W | 3028MiB / 3071MiB | 0% Default |
+-------------------------------+----------------------+----------------------+
Disp.A - 显示GPU卡显卡处于活动状态:
然后我们可以说,显示器连接到GPU: 2 Quadro K4000 0000:03:00.0 。