ghw icon indicating copy to clipboard operation
ghw copied to clipboard

Can't get MAC address in macOS Monterey, netFillInfo not implemented on darwin

Open sonvirgo opened this issue 1 year ago • 2 comments

Can't get MAC address in macOS Monterey. Also Disks not return any Serial number.

Error getting network info: netFillInfo not implemented on darwin

Screen Shot 2024-07-09 at 7 44 42 AM

sonvirgo avatar Jul 09 '24 00:07 sonvirgo

Hi @sonvirgo thank you for the issue. As noted in the README, we only have partial support for MacOS, unfortunately. We do not support network discovery for MacOS currently.

As for the Disk missing serial number information, can you please run the following and let us know what you get?

package main

import (
	"fmt"

	"github.com/jaypipes/ghw"
)

func main() {
	block, err := ghw.Block()
	if err != nil {
		fmt.Printf("Error getting block storage info: %v", err)
	}

	fmt.Printf("%v\n", block)

	for _, disk := range block.Disks {
		fmt.Printf(" %v\n", disk)
		if disk.SerialNumber != "" {
			fmt.Print("No serial number")
		} else {
			fmt.Printf("Serial number: %s\n", disk.SerialNumber)
		}
		for _, part := range disk.Partitions {
			fmt.Printf("  %v\n", part)
		}
	}
}

jaypipes avatar Jul 09 '24 22:07 jaypipes