From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id D4F442F19C for ; Wed, 24 Jan 2001 18:37:45 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id f0ONbWb15959 for axp-list@listman.redhat.com; Wed, 24 Jan 2001 18:37:32 -0500 Received: from ztxmail01.ztx.compaq.com (ztxmail01.ztx.compaq.com [161.114.1.205]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id f0ONbWd15955 for ; Wed, 24 Jan 2001 18:37:32 -0500 Received: by ztxmail01.ztx.compaq.com (Postfix, from userid 12345) id 7F1E244BA; Wed, 24 Jan 2001 17:37:32 -0600 (CST) Received: from anw.zk3.dec.com (and.zk3.dec.com [16.140.64.3]) by ztxmail01.ztx.compaq.com (Postfix) with ESMTP id E91354266 for ; Wed, 24 Jan 2001 17:37:25 -0600 (CST) Received: from imhotep.zk3.dec.com by anw.zk3.dec.com (8.9.3/1.1.22.2/08Sep98-0251PM) id SAA0001592518; Wed, 24 Jan 2001 18:37:25 -0500 (EST) Date: Wed, 24 Jan 2001 18:33:57 -0500 (EST) From: Ross A Knepper To: axp-list@redhat.com Subject: Re: Finding processor frequency In-Reply-To: <200101242331.SAA24181@ives.lkg.dec.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors On Wed, 24 Jan 2001, Bharadwaj Yadavalli wrote: > I do know that cat /proc/cpuinfo prints out, among > other things, the processor frequency. I do not feel > very comfortable grep'ing for the string > "cycle frequency [Hz]" and picking up the value after > the ":" simply because the string "cycle frequency [Hz]" > could change to something else in future. There is a > lesser chance of the structure member change in > hwrpb_struct. personally, i think that exporting a hwrpb_struct to userland is both ugly and unnecessary. the rpb is intended to be hidden to upper levels and certainly to userland. whereas finding the MHz of the cpu is conceptually the same from the user's point of view on any architecture, parsing a hwrpb_struct is clearly alpha-specific. so while there might be a more preferred way of getting the clock speed than parsing /proc/cpuinfo, i dont know what it is :) -ross