ghw
ghw copied to clipboard
Get topology information on Windows
I'm actually not sure which Win32 subsystem or WMI table holds information about the socket and memory topology for the hardware, so we'll have to figure that out.
Because WMI is based on CIM, which is horrendously awful and created before most modern hardware, after much research, it seems I'll have to rely on the Win32 kernel GetLogicalProcessorInformation API call:
https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlogicalprocessorinformation?redirectedfrom=MSDN
Which we'll probably need to use the unsafe and golang.org/x/sys/windows/registry packages with.