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?
Programmatically get hard drive info on macOS
Asked Answered
This thread might help you: stackoverflow.com/questions/3545102 –
Localize
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
Look into IOKit. There's also this question on Stack Overflow: How to get serial number from Mac hard disks?
© 2022 - 2024 — McMap. All rights reserved.