tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sysinfo crate



On Tue, Nov 18, 2025 at 01:54:27PM +0000, pin wrote:
> For 1, I'm aware of:
> ~> sysctl hw.machine_arch hw.model hw.ncpu hw.usermem64
> hw.machine_arch = x86_64
> hw.model = Intel 686-class
> hw.ncpu = 4
> hw.usermem64 = 9703772160
> 
> But that doesn't give product/motherboard.
> 
> Any other suggestions/ideas?

This is totally architecture dependent, e.g.:

hw.machine = macppc
hw.model = 970FX (Revision 3.0)
hw.ncpu = 2
[..]
hw.ofw.model = OpenFirmware 4

You can have good luck on x86 with machdep.dmi, but often values are
not filled in:

machdep.dmi.system-vendor = System manufacturer
machdep.dmi.system-product = System Product Name
machdep.dmi.system-version = System Version
machdep.dmi.bios-vendor = American Megatrends Inc.
machdep.dmi.bios-version = 3806
machdep.dmi.bios-date = 20180518
machdep.dmi.board-vendor = ASUSTeK COMPUTER INC.
machdep.dmi.board-product = B150M-A/M.2
machdep.dmi.board-version = Rev X.0x
machdep.dmi.board-asset-tag = Default string

on evbarm64/aarch64:

hw.machine = evbarm
hw.model = netbsd,generic-acpi
hw.ncpu = 4

and:

machdep.firmware_revision = 0
machdep.board_model = 0
machdep.board_revision = 0
machdep.dmi.system-vendor = Pine64
machdep.dmi.system-product = PINE64 Quartz64 Model A
machdep.dmi.system-version = 0
machdep.dmi.bios-vendor = EDK2
machdep.dmi.bios-version = v1.0
machdep.dmi.bios-date = 20230429
machdep.dmi.board-vendor = Pine64
machdep.dmi.board-product = PINE64 Quartz64 Model A
machdep.dmi.board-version = 0
machdep.dmi.board-asset-tag =  
machdep.dmi.chassis-vendor = Pine64
machdep.dmi.chassis-version = PINE64 Quartz64 Model A
machdep.dmi.chassis-asset-tag =  
machdep.dmi.processor-vendor = Rockchip
machdep.dmi.processor-version = Rockchip RK3566 (Cortex-A55)


or sh3:

hw.machine = landisk
hw.model = Model: I-O DATA LANDISK
hw.ncpu = 1

(and it has no machdep at all)


Martin


Home | Main Index | Thread Index | Old Index