system_profiler command details

Hello all,


I am trying to get hw statistics about hard disk on mac machines.

Via the following shell command:


system_profiler -detailLevel mini SPSerialATADataType


I got the needed info on my macbook pro (ssd hard disk and dimension)


How to get all hard disk information on a Desktop mac?

Is it necessary to use the folloing command?


system_profiler -detailLevel mini SPParallelSCSIDataType


On my macbook pro the previous command did not return anything.


Thanks for any suggestion.

MacBook Pro, Mac OS X (10.7.5)

Posted on Mar 12, 2014 9:55 AM

Reply
10 replies

Mar 12, 2014 2:29 PM in response to EspiR

I don't think I've so much as seen a scsi connector since early in the 1990s. Modern macs use IDE and SATA for internal connections and USB, Firewire or Thunderbolt for externals. If you have an old, old machine (a PowerPC model or earlier) you may have scsi cables somewhere in there, but I think the data type is primarily included for backwards compatibility.

Mar 13, 2014 9:23 AM in response to EspiR

then use both keywords:


system_profiler -detailLevel mini SPSerialATADataType SPParallelATADataType


It would really help to know the model/year of the machine(s) you are working on. if you're running 10.7 the machine must have in intel processor (or xeon from the specs), and your internal disks will be SATA. You may have a PATA internal drive if you've converted the optical bay to a hard drive.


Honestly, you should open the System Profiler application (renamed System Information in later OSes), find the section in the list at left that contains the information you want, and then look through the list of available keywords in terminal to find one that matches. The Bluetooth tab translates to the SPBluetoothDataType, the Ethernet Cards tab translates to the SPEthernetDataType... It's straight-forward.

Mar 14, 2014 5:04 AM in response to twtwtw

I am running 10.7.5 on macbook pro, and SPSerialATADataType is just fine for me.

To be honest what I'm trying to do is creating a little app that displays simple HD information on a tabview, without opening system profiler.

So I'm trying to figure out how to get such kind of information from all notebok mac and all desktop mac like iMac, macpro.

Maybe a generall procedure is not so easy.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

system_profiler command details

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.