Hardware Serial Numbers under FreeBSD
Dan Nelson
dnelson at allantgroup.com
Fri Nov 5 07:56:48 PST 2004
In the last episode (Nov 04), Dan Mahoney, System Admin said:
> Hey all, I'm trying to create an inventory script for systems that
> will be loaded via net-boot. I was wondering if there was any useful
> way to obtain the serial number of devices like the hard drives,
> processor, and/or motherboard. (as far as I can guess, those are the
> only things likely to store a serial number in a machine-readable
> format).
You can get the serial number of scsi disks with "camcontrol inq da0
-S", once for each drive. I don't have any cpus with serial numbers,
but if you have a P4 with it enabled, I think the cpuid command in
ports can print it. As for the motherboard serial number, you'll
probably need to open the case to get that, but try the "dmidecode"
port. My Asus board prints a serial number of "xxxxxxxxxxx", but other
boards might actually put a real value in there.
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-hackers
mailing list