• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: System Information
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: System Information


  • Subject: Re: System Information
  • From: Quinn <email@hidden>
  • Date: Tue, 6 May 2008 17:36:48 +0100

At 10:41 -0500 6/5/08, Michael Chroman wrote:
Operating system version, OS Build, List of all connected USB devices(USB Class,Device String, Speed, VID, PID, Revision, Version), Driver Information, Memory(Total Physical, Available Physical), Processor Information(Model Name, Type, Speed, Stepping)

It sounds like you're trying to get information as it's reported by System Profiler. If so, I recommend that you run <x-man-page://8/system_profiler> in XML mode and parse the results. It's possible to get most of this info via other APIs, however, whenever you do this yourself, it's challenging to ensure that your results /exactly/ match System Profiler. System Profiler handles a lot of wacky special cases that are not documented (and unlikely to ever be documented).


As a example, consider the user-visible CPU name. System Profiler might display it as "Intel Core 2 Duo", but that's a marketing name that covers a lot of different CPUs. If you use lower level APIs, you have to maintain a table that maps the specific CPU types to their marketing names. As you can imagine, that gets very ugly very fast.

At 10:42 -0500 6/5/08, Michael Chroman wrote:
I am able to parse the system_profiler if I send it to xml format. This is somewhat tedious.

Hmmm, it might be tedious, but I'd argue that that's a good thing (-: In contrast, doing all of things work yourself would definitely be "exciting".


Seriously though, once you've captured the data from the tool, it's easy to convert it to an in-memory property list (CFPropertyListCreateFromXMLData) and extract values from there.

S+E
--
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • XML
      • From: Michael Chroman <email@hidden>
References: 
 >System Information (From: Michael Chroman <email@hidden>)
 >Re: System Information (From: Jens Alfke <email@hidden>)
 >Re: System Information (From: Michael Chroman <email@hidden>)

  • Prev by Date: Re: System Information
  • Next by Date: getdirentriesattr usage in the FInder
  • Previous by thread: Re: System Information
  • Next by thread: XML
  • Index(es):
    • Date
    • Thread