gopsutil icon indicating copy to clipboard operation
gopsutil copied to clipboard

Support for getting disk serial number on darwin

Open tigerwill90 opened this issue 6 years ago • 1 comments

Is your feature request related to a problem? Please describe. There seems to be no implementation of disk.GetDiskSerialNumber for darwin/windows.

Additional context Is there any other cross platform method in gopsutil to get disk serial number information ?

tigerwill90 avatar Dec 15 '19 13:12 tigerwill90

Indeed this function is only implemented for linux. Implementing this is platform-dependent.

For darwin, we could shell out to system_profiler -detailLevel basic SPSerialATADataType (parse its xml with -xml flag).

For windows, see #435.

Lomanic avatar Dec 15 '19 20:12 Lomanic