UPDATED: Getting the “Model Identifier” for a Mac via ARD

ARD > Send UNIX CommandWith the recent release of a new firmware update for the latest version of the Mac Pros, I was wondering if there was an easy way to query a bunch of systems for their Model Identifier. This is a unique name for a particular model of Mac, that can be found in the Apple System Profiler app. Some examples are “MacPro3,1″, “PowerMac10,2″ & “Xserve3,1″. Minor revs in a particular model will typically be denoted by incrementing the number after the comma, while major updates are before. Apple Remote Desktop can give you the “Machine Model” (Report>System Overview…>Machine Model), but this is a dumbed down name of the system that isn’t specific enough for this purpose.

Since the Model Identifier can be viewed in the System Profiler app, it seemed there had to be an easy way to grab this from the terminal. After a quick Google search, I found the lead I needed at Wikipedia. As it turns out, there’s a command line version of System Profiler called “system_profiler” (of course). After looking over the man page, I constructed the following command, which can easily be issued via ARD to a batch of systems.

system_profiler -detailLevel mini | grep "Model Identifier:"

This will return just the single line from the System Profile…

Model Identifier: MacPro3,1

Using that same command, you can use ARD’s “Send a UNIX Command…” to pass that command to a bunch of systems at once, and you’ll end up with a result screen showing the Model Identifier for all queried systems. Easy peasy! The system_profile command seems to work as far back as 10.4.11 (8S2167), but failed on 10.4.11 (8S165), so your actual mileage may vary.

Big props go out to Google for knowing everything and getting me on the right path.

UPDATE: Reader Chad had and even better method…

Using the command: system_profiler SPHardwareDataType | grep "Model Identifier:" gets you there much faster. It’s not having to go through as much data.

Similarly, system_profiler SPHardwareDataType | grep "Serial Number (system):" is handy too if you need to check the exact computers.