From owner-freebsd-hackers Wed Oct 25 5:55: 5 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.alacritech.com (smtp.alacritech.com [209.10.208.82]) by hub.freebsd.org (Postfix) with ESMTP id AD43737B4C5 for ; Wed, 25 Oct 2000 05:55:02 -0700 (PDT) Received: from [10.1.10.18] by smtp.alacritech.com (NTMail 4.30.0012/NY3553.00.2884f51f) with ESMTP id kzojaaaa for ; Wed, 25 Oct 2000 05:52:46 -0700 From: "Christopher Harrer" To: "Greg Lehey" Cc: "Freebsd-Hackers" Subject: RE: Determining CPU on SMP box Date: Wed, 25 Oct 2000 08:53:03 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20001025132903.B87564@wantadilla.lemis.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I'm using version 4.1. Thanks, Chris -----Original Message----- From: owner-freebsd-hackers@FreeBSD.ORG [mailto:owner-freebsd-hackers@FreeBSD.ORG]On Behalf Of Greg Lehey Sent: Tuesday, October 24, 2000 11:59 PM To: Christopher Harrer Cc: Freebsd-Hackers Subject: Re: Determining CPU on SMP box On Tuesday, 24 October 2000 at 7:37:12 -0400, Christopher Harrer wrote: > Hello All, > > Is there a way to determine which CPU I'm currently executing on in a SMP > box? I've found references to proc->p_oncpu, but I'm not sure if this is > the best way to determine where I'm executing. I'd like to be able to > "trace" various actions within my driver and one of the fields I want to > keep track of is what CPU I'm executing on. Which version of FreeBSD? 5-CURRENT has the ktr functions, which you could use for your tracing. They include CPU information. Unfortunately we don't have a man page yet. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message