You wrote: > > On Mon, Jun 28, 2021 at 04:27:33PM +0000, Steve Blinkhorn wrote: > > FWIW this is what I put in my (Tcl) script: > > > > set vendorprod [split [exec /sbin/sysctl -n machdep.dmi.system-vendor \ > > machdep.dmi.system-product machdep.dmi.system-version] "\n"] > > > > It turns out that different machines may have either of the last two > > blank but not empty, with the product's name arbitrarily in one position or > > the other. > > If you are not restricted to x86, another popular sysctl for this kind > of information is hw.model. > > Martin >
All my NetBSD systems (8 machines, 3 manufacturers) are currently amd64 and all report identically: %/sbin/sysctl hw.model hw.model = Intel 686-class whereas, for instance: %/sbin/sysctl machdep.dmi. machdep.dmi.system-vendor = FUJITSU machdep.dmi.system-product = ESPRIMO Q520 machdep.dmi.system-version = machdep.dmi.system-serial = YLRX022851 machdep.dmi.system-uuid = 8f38d6c8-9d4b-bd4f-af96-1c5477d1d160 machdep.dmi.bios-vendor = FUJITSU // American Megatrends Inc. machdep.dmi.bios-version = V4.6.5.4 R1.17.0 for D3223-A1x machdep.dmi.bios-date = 20140306 machdep.dmi.board-vendor = FUJITSU machdep.dmi.board-product = D3223-A1 machdep.dmi.board-version = S26361-D3223-A1 machdep.dmi.board-serial = 44524519 machdep.dmi.board-asset-tag = This information is not avaiable in a Xen-virtualised environment, where, for instance: %/sbin/sysctl machdep. machdep.fpu_present = 1 machdep.osfxsr = 1 machdep.sse = 1 machdep.sse2 = 1 machdep.cpu_brand = AMD EPYC 7402P 24-Core Processor machdep.sparse_dump = 1 machdep.tsc_freq = 0 machdep.pae = 1 machdep.fpu_save = 3 machdep.fpu_save_size = 832 machdep.xsave_features = 0 machdep.idle-mechanism = xen machdep.xen.suspend = 0 machdep.xen.balloon.current = 1278984 machdep.xen.balloon.target = 1278984 machdep.xen.balloon.min = 1024 machdep.xen.balloon.max = 1278984 -- Steve Blinkhorn <[email protected]>
