* Finding processor frequency @ 2001-01-24 23:31 Bharadwaj Yadavalli 2001-01-24 23:33 ` Ross A Knepper 0 siblings, 1 reply; 6+ messages in thread From: Bharadwaj Yadavalli @ 2001-01-24 23:31 UTC (permalink / raw) To: axp-list Is there a system call that fills a variable of type struct hwrpb_struct (asm/hwrpb.h) so that I can find the processor frequency from the user-land? 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. Bharadwaj ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Finding processor frequency 2001-01-24 23:31 Finding processor frequency Bharadwaj Yadavalli @ 2001-01-24 23:33 ` Ross A Knepper 2001-01-25 2:54 ` Jeff Sturm 0 siblings, 1 reply; 6+ messages in thread From: Ross A Knepper @ 2001-01-24 23:33 UTC (permalink / raw) To: axp-list 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Finding processor frequency 2001-01-24 23:33 ` Ross A Knepper @ 2001-01-25 2:54 ` Jeff Sturm 2001-01-25 16:36 ` Bharadwaj Yadavalli 2001-01-26 3:53 ` DP264 Sale Maurice Hilarius 0 siblings, 2 replies; 6+ messages in thread From: Jeff Sturm @ 2001-01-25 2:54 UTC (permalink / raw) To: axp-list Ross A Knepper wrote: > so while there might be a more preferred way of getting the clock speed > than parsing /proc/cpuinfo, i dont know what it is :) The lmbench suite <uri:http://www.bitmover.com/lmbench/> contains a utility to guess processor cycle frequency called mhz.c. It runs completely in userspace, is written in portable C and is accurate within a MHz or two on every machine I've tried. Probably not the answer you wanted, but interesting nonetheless. Jeff ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Finding processor frequency 2001-01-25 2:54 ` Jeff Sturm @ 2001-01-25 16:36 ` Bharadwaj Yadavalli 2001-01-25 22:39 ` W Bauske 2001-01-26 3:53 ` DP264 Sale Maurice Hilarius 1 sibling, 1 reply; 6+ messages in thread From: Bharadwaj Yadavalli @ 2001-01-25 16:36 UTC (permalink / raw) To: axp-list Ross A Knepper wrote: > 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. I fully agree with you. > 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. AFAIK, this is the only place that the processor frequency is recorded in the kernel. Not knowing how else to get the value (other than parsing /proc/cpuinfo and hence relying on the string "cycle frequency [Hz]" not changing in the sprintf() in get_cpuinfo()), I enquired. As you say, since processor frequency is an architecture independent characteristic, may be it should be part of information returned in struct sysinfo structure by or sysconf(). getsysinfo() on Tru64 lets you pick that information with GSI_CPU_INFO operation. Jeff Sturm suggested: > The lmbench suite <uri:http://www.bitmover.com/lmbench/> Thanks. I'll check it out. Bharadwaj (resigned to parsing /proc/cpuinfo :-(( ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Finding processor frequency 2001-01-25 16:36 ` Bharadwaj Yadavalli @ 2001-01-25 22:39 ` W Bauske 0 siblings, 0 replies; 6+ messages in thread From: W Bauske @ 2001-01-25 22:39 UTC (permalink / raw) To: axp-list Bharadwaj Yadavalli wrote: > > (resigned to parsing /proc/cpuinfo :-(( Maybe I missed it but why do you actually care what the Mhz of the processor is? Also, keep in mind the lmbench routine is often wrong so you would be better off looking at how the kernel determines the Mhz. I haven't seen that go wrong on any of my systems as yet. Including PII/PIII/P4/G4/Alphas. You might be able to lift that piece of code and use it which would give you exactly what you're looking for. Note that is not the same thing as Bogomips. I suspect it will be assembly language though. Check the "arch/*/kernel/time.c" routines to see how the kernel does it. Wes ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: DP264 Sale 2001-01-25 2:54 ` Jeff Sturm 2001-01-25 16:36 ` Bharadwaj Yadavalli @ 2001-01-26 3:53 ` Maurice Hilarius 1 sibling, 0 replies; 6+ messages in thread From: Maurice Hilarius @ 2001-01-26 3:53 UTC (permalink / raw) To: axp-list Short bit of spam I thought the list members might find useful: We are doing a great New Years Special on our DP264 and UP2000 machines. HD-DP264 Alpha Linux Rackserver SPECIAL : 19" DP/UP2 Rack Enclosure, 8+1 bay, 6U, 7 fan, 650W hot-swap redundant PS for DP264 4 redundant power modules 256MB Memory kit Samsung -DP264 SODIMM (4) Onboard DUAL U2/LVD-SCSI Controller Quantum 9.1GB UltraWide SCSI 7200rpm HDD 4MB cache Toshiba XM-6702B 48X ATAPI CDROM Panasonic 1.44MB, 3.5" floppy drive Northern Linux - Pre-installed. With 1 x 500MHz, 4MB cache CPU: $6,495 With 2 x 500MHz, 4MB cache CPU: $7,745 With 2 x 667MHz, 4MB cache CPU: $9,795 UP2000 - dual 600MHz, same as above but with SM760A tower case or 3U rack case. Single PS: $5295 Full 2 year warranty, brand new. Other options available on request. Other promotions available, call/email for details. With our best regards, Maurice W. Hilarius Telephone: 01-780-456-9771 Hard Data Ltd. FAX: 01-780-456-9772 11060 - 166 Avenue mailto:maurice@harddata.com Edmonton, AB, Canada http://www.harddata.com/ T5X 1Y3 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2001-01-26 3:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2001-01-24 23:31 Finding processor frequency Bharadwaj Yadavalli 2001-01-24 23:33 ` Ross A Knepper 2001-01-25 2:54 ` Jeff Sturm 2001-01-25 16:36 ` Bharadwaj Yadavalli 2001-01-25 22:39 ` W Bauske 2001-01-26 3:53 ` DP264 Sale Maurice Hilarius
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox