Nvidia CUDA Extension Attibute

Niels_Illem
New Contributor II

Hi Guys,

Just created a EA that checks if there is a Nvidia chipset in System Profiler. So we can install the Nvidia CUDA drivers just on the Mac's with a Nvidia chipset.

#!/bin/sh
# Hogeschool Utrecht, Niels Illem
# 24.09.2014
# Find out if there is an Nvidia Chipset, so we can make a Smart Group which we use to install the CUDA drivers.
# Assuming all NVIDIA videocards used by Apple do have CUDA
# Download CUDA drivers from: http://www.nvidia.com/object/mac-driver-archive.html

NVIDIA=`system_profiler | grep -o 'Chipset Model:[^
]*' | cut -f2- -d':'`

if [[ $NVIDIA == *NVIDIA* ]]; then
    echo "<result>Present</result>"
else
    echo "<result>Not Present</result>"
fi

exit 0
3 REPLIES 3

kerouak
Valued Contributor

Just what I was looking for!! :_))

Cheers!

dwandro92
Contributor III

@kerouak you can greatly improve the execution time of system_profiler commands by specifying a data type to query. i.e. instead of using system_profiler | grep, use system_profiler SPDisplaysDataType | grep.

WiseByte
New Contributor II

14bed5f607b74a65bd7fc7e49dd0ba97
This is what I'm using for my environment and works like a charm: https://jamfnation.jamfsoftware.com/viewProductFile.html?fid=840

I then scope with the Criteria GPU like NVIDIA GeForce to figure out if the Mac needs the driver or not. Using this method it's more generic and more future proof. For example, if there is a fix required for AMD FirePro or if we want to know which Machine has the older 5770 card we can do that with this extended attribute.

Another benefit is that it will list all GPUs, so if we want to find machines with 2 GPUs we can also do that with this EA. Check out the screen shot. Cheers!