How to to print motherboard and display card info on Mac
Is there any API on Mac OS X to get the name, ch开发者_运维问答ipset, manufacturer info for motherboard, display card and sound card devices ?
You can use the system_profiler command line tool with the -xml
option to generate XML data for your system configuration and then parse the output of that.
$ system_profiler -xml
Use popen to run this from within your code and capture the XML output. Then use an appropriate XML library, e.g. TinyXML, to parse the output.
精彩评论