Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the Equivalent of Windows WMI for MacOS C++ Development?

I have a C++ application that gets detailed system information (processor type, available disk space, other hardware profile info) on Windows using WMI. I want to perform the same type of operations on OSX 10.5+. What is the equivalent API or interface for MacOS?

Links to API documentation or tutorials are very welcome.

like image 962
Jason Champion Avatar asked Aug 31 '10 21:08

Jason Champion


1 Answers

You can query most of that information through the system_profiler executable. Apple's example for querying such informations involves a popen call to it, so I guess it's the way to go.

like image 147
zneak Avatar answered Nov 09 '22 17:11

zneak