开发者

Programmatically get hard drive info on macOS

开发者 https://www.devze.com 2023-01-19 21:43 出处:网络
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开发者_C百科, but it doesn\'t cont

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开发者_C百科, 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?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消