Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does System Profiler retrieve the full Mac hardware identifier?

Tags:

There are several terminal commands to retrieve the numerical / abbreviated Model Identifier for Mac hardware.

  • sysctl hw.model
  • system_profiler SPHardwareDataType

These dump a string with the hardware name and x,y versioning. Currently we have to maintain a table to convert these identifiers into the full english machine description.

Is there an API, or better a command line tool that can produce the more human friendly names that match Apple's documentation MacBook Pro 15-inch, Mid 2009 or MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports) instead of the more abbreviated MacBookPro5,3 or MacBookPro13,2 Model Identifier?

MacBookPro5,3MacBookPro13,2

To summarize, how does System Profiler get the full localized names of Macintosh hardware in a way I can generate to consume that information systematically via script or program?

like image 334
bmike Avatar asked Nov 08 '11 22:11

bmike


People also ask

How do I find my Mac hardware details?

View system information in About This Mac You can view information about your Mac, including the model name, the macOS version you're using and more. To open About This Mac, choose Apple menu > About This Mac. Click any of the following: Overview: View the specification information about your Mac.

How do I get Mac information from terminal?

To get your computer's Wired or Wireless MAC address from the Terminal Screen: Locate and open Terminal from Applications->Utilities->Terminal. At the Terminal Prompt, type ifconfig and press Enter. This will list all of your network settings, including the physical addresses of your wired and wireless hardware.

How do I use System Profiler on Mac?

View a system report To open a system report, choose Apple menu > About This Mac, then click System Report. Tip: You can also press and hold the Option key, then choose Apple menu > System Information. To change your view of the report, do one of the following: See a longer report: Choose File > Show More Information.

How do I find my Mac specs without logging in?

First boot to the welcome screen, then open the apple menu at the top left (it is hidden until you move the mouse there). Once it is open hold down the option key and "About This Mac" will change to "System Information" which will open the normal system profiler.


1 Answers

Did check the network traffic. System Information is connecting to

http://support-sp.apple.com

A full query looks like:

http://support-sp.apple.com/sp/product?cc=DJWR&lang=de_DE

Where 'DJWR' are the last four characters of the serial number

More info here: http://blog.coriolis.ch/get-your-apple-device-model-name-in-a-readable-format/

like image 168
Monobono Avatar answered Nov 14 '22 01:11

Monobono