Programmatically get hard drive info on macOS
Asked Answered
S

1

6

I need a way to get complete hard drive info on OS X, meaning all hard drive model names, SATA/ATA controllers, volumes, disk identifiers, etc. I checked out diskutil, but it doesn't contain SATA controller info, system_profiler has all the information I need but its XML output is not necessarily organized as well as I'd like. Is there any low level Carbon/C API that would let me do this?

Sudarium answered 14/10, 2010 at 23:16 Comment(3)
This thread might help you: stackoverflow.com/questions/3545102Localize
Maybe you should specify what you mean by "but its XML output is not necessarily organized as well as I'd like". If it's got all information you need then just use it: the output is a plist, so it should be perfectly easy to fetch everything you want.Vrablik
possible duplicate of How to get serial number from Mac hard disks?Mathia
A
4

Look into IOKit. There's also this question on Stack Overflow: How to get serial number from Mac hard disks?

Absently answered 15/10, 2010 at 18:10 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.