From owner-freebsd-questions@FreeBSD.ORG Tue Aug 1 07:12:23 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF1EC16A4E0 for ; Tue, 1 Aug 2006 07:12:23 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3337843D45 for ; Tue, 1 Aug 2006 07:12:23 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9]) by mxout5.cac.washington.edu (8.13.6+UW06.06/8.13.6+UW06.03) with ESMTP id k717CM2I013680 for ; Tue, 1 Aug 2006 00:12:22 -0700 X-Auth-Received: from [192.168.0.50] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.03) with ESMTP id k717CMZU003183 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 1 Aug 2006 00:12:22 -0700 Message-ID: <44CEFEDF.4060503@u.washington.edu> Date: Tue, 01 Aug 2006 00:12:31 -0700 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <20060728164526.E27679@ganymede.hub.org><87slklj9hu.fsf@photon.homelinux.org><20060729021007.F27679@ganymede.hub.org><44CD41EC.6030605@freebsd.org> <20060730233839.I27679@ganymede.hub.org><44CDAA98.3030702@freebsd.org> <44CDE02F.4090604@dial.pipex.com><44CE7DD0.9070902@childeric.freeserve.co.uk><871ws1v261.fsf@photon.homelinux.org> <20060731220830.B27679@ganymede.hub.org> <002901c6b531$b4013200$3c01a8c0@coolf89ea26645> In-Reply-To: <002901c6b531$b4013200$3c01a8c0@coolf89ea26645> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.0.264296, Antispam-Engine: 2.4.0.264935, Antispam-Data: 2006.7.31.235433 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __FRAUD_419_REFNUM 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __USER_AGENT 0' Subject: Re: Gotta start somewhere ... how many of us are really out there? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Aug 2006 07:12:23 -0000 Ted Mittelstaedt wrote: > ----- Original Message ----- From: "User Freebsd" > To: "Xiao-Yong Jin" > Cc: > Sent: Monday, July 31, 2006 6:08 PM > Subject: Re: Gotta start somewhere ... how many of us are really out > there? > > > >> On Mon, 31 Jul 2006, Xiao-Yong Jin wrote: >> >> >>> Chris Whitehouse writes: >>> >>> >>>> Alex Zbyslaw wrote: >>>> >>>>> Counting portsnap and cvsup accesses is non-intrusive - i.e. nothing >>>>> sent from local host - will count systems from any version of >>>>> FreeBSD, but will never count everything because sites with multiple >>>>> hosts may easily have local propagation mechanisms. But you will >>>>> get an order of magnitude. However, how do you deal with systems >>>>> with variable IPs? I don't know enough about the internals of >>>>> either portsnap or cvsup to know if there is some kind of unique id >>>>> associated with hosts. If not, then you'd wildly over count for >>>>> many home-based, variable IP systems. >>>>> >>>> Maybe not so many, my non-static ip hasn't changed since I signed up 3 >>>> years ago despite turning off the modem for the odd day or >>>> two. Another network I look after also hasn't changed in a year. >>>> >>>> >>> But one can't rely on that. You'll definitely see more than one ip >>> associated with my laptop, if I move it around. >>> >>> A more reliable way that I can think of is generating a unique ID >>> number when a system finishes installation or upon the first boot. >>> However, it may involve some additional privacy problem. What do you >>> think? >>> >> How does Solaris generate its 'hostid'? Is it a hardware/sparc >> thing, or >> software? >> >> > > All Sparc processors have serial numbers, always had. Sun's compiler and > some other > programs of theirs are serialized and when you buy them you have to > send in > the > cpu serial number to Sun who generates a key that will only allow the > compiler > to run on that system. If you move the compiler you have to get > another key > and > certify to Sun with a legal document that you will not run it on the old > system, etc. > > At least that was how it worked last I dealt with that about 7 years ago. > > I believe modern pentiums are also serialized. There's ways to do a > unique > ID > nowadays. None of them are portable and so these methods are frowned on. > > Ted CPUID's on Intel processors can be found using something similar to the program I made below... /** * * Author: Garrett Cooper * File: cpuid_test.cpp * * Version: 0.1 * Date: 2006.03.24 * * This program is a simple C one that takes a IA32 logical * processor [think real processor, core, or hyperthreading capable processor's * virtual processor(s)] and prints out its ID, via the embedded IA32 cpuid * asm instruction. * * Reference: http://www.intel.com/cd/ids/developer/asmo-na/eng/43851.htm?prn=y * * Note: If you compile using Cygwin, use this command to compile in order * to use a DOS prompt to execute the file: * * gcc -mno-cygwin -o cpuid_test.exe cpuid_test.c * * This code will no work in MSVS I believe, because it follows GCC's * convention for inline ASM code. * * * Version: 0.2 * Date: 2006.03.27 * * Inline C++ function was added so then the program wouldn't just print out the * compiling machine's cpuid when I distributed the binary. * * The proper command for compiling now is: * * gcc -mno-cygwin -o cpuid_test.exe cpuid_test.cpp * */ #include #include inline void print_cpuid() { unsigned int id = 0; asm( "mov $1, %%eax;" "cpuid;" "mov %%ebx, %0;" : "=r" (id) ); printf("cpuid=%4xh\n",id); } int main() { print_cpuid(); system("pause"); return 0; } You should be able to figure out the ID of your processor if it's a P3 or newer IIRC. This was part of the whole snafu with Intel and having people's serial numbers be transmitted online, I think. -Garrett