Browse Source

Adding lspci string for AMD GPUs

Signed-off-by: Luke Wilson <luke.wilson@dell.com>
Luke Wilson 4 years ago
parent
commit
615eb04652
1 changed files with 3 additions and 1 deletions
  1. 3 1
      roles/common/files/inventory.fact

+ 3 - 1
roles/common/files/inventory.fact

@@ -6,13 +6,15 @@ lspci > $INVENTORY
 NVIDIA_GPU=$(cat $INVENTORY | grep -i nvidia | wc -l)
 NVIDIA_GPU=$(cat $INVENTORY | grep -i nvidia | wc -l)
 XILINX_FPGA=$(cat $INVENTORY | grep "Processing accelerators: Xilinx Corporation Device" | wc -l)
 XILINX_FPGA=$(cat $INVENTORY | grep "Processing accelerators: Xilinx Corporation Device" | wc -l)
 INTEL_A10_FPGA=$(cat $INVENTORY | grep "Processing accelerators: Intel Corporation Device" | wc -l)
 INTEL_A10_FPGA=$(cat $INVENTORY | grep "Processing accelerators: Intel Corporation Device" | wc -l)
+AMD_GPU=$(cat $INVENTORY | grep "Display controller: Advanced Micro Devices, Inc. [AMD/ATI]" | wc -l)
 
 
 cat << EOF
 cat << EOF
 {
 {
 	"xilinx_fpga" : $XILINX_FPGA,
 	"xilinx_fpga" : $XILINX_FPGA,
 	"nvidia_gpu" : $NVIDIA_GPU,
 	"nvidia_gpu" : $NVIDIA_GPU,
+	"amd_gpu" : $AMD_GPU,
 	"intel_a10_fpga" : $INTEL_A10_FPGA
 	"intel_a10_fpga" : $INTEL_A10_FPGA
 }
 }
 EOF
 EOF
 
 
-rm -f $INVENTORY
+rm -f $INVENTORY