From owner-freebsd-hackers@FreeBSD.ORG Fri Nov 5 15:56:48 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF34616A4CE for ; Fri, 5 Nov 2004 15:56:48 +0000 (GMT) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 886B243D41 for ; Fri, 5 Nov 2004 15:56:48 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.1) id iA5FumNp092119; Fri, 5 Nov 2004 09:56:48 -0600 (CST) (envelope-from dan) Date: Fri, 5 Nov 2004 09:56:47 -0600 From: Dan Nelson To: "Dan Mahoney, System Admin" Message-ID: <20041105155647.GG10428@dan.emsphone.com> References: <20041104115425.A95642@prime.gushi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041104115425.A95642@prime.gushi.org> X-OS: FreeBSD 5.3-STABLE X-message-flag: Outlook Error User-Agent: Mutt/1.5.6i cc: hackers@freebsd.org Subject: Re: Hardware Serial Numbers under FreeBSD X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 15:56:48 -0000 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@allantgroup.com