LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 06-29-2005, 05:42 AM   #1
xamdbz01
Member
 
Registered: Jun 2004
Location: Colorado Springs, CO
Distribution: FC2
Posts: 33

Rep: Reputation: 15
System processor speed?


how would i go about getting the processor speed in a console?
 
Old 06-29-2005, 06:26 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Code:
mingdao@james:~$ cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 10
model name      : AMD Athlon(TM) XP
stepping        : 0
cpu MHz         : 2301.180
cache size      : 512 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips        : 4521.98
 
Old 06-29-2005, 06:34 AM   #3
crash748
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Rep: Reputation: 0
sysctl hw.cpuspeed | cut -d "=" -f2

you can see all the info you need with sysctl -a (best to pipe it through more/less)

Last edited by crash748; 06-29-2005 at 06:37 AM.
 
Old 06-29-2005, 06:39 AM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
mingdao@james:~$ /sbin/sysctl hw.cpuspeed | cut -d "=" -f2
error: 'hw.cpuspeed' is an unknown key

I always like to learn neat commands like that. Can you fix it?
 
Old 06-29-2005, 09:08 AM   #5
crash748
LQ Newbie
 
Registered: Aug 2003
Posts: 18

Rep: Reputation: 0
I use this command on a OpenBSD box, I don't know how the correct syntax is for the other BSD's.
but try "sysctl -a | grep speed" and see what that gives.
 
Old 06-29-2005, 09:14 AM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
Sorry, mate. I just noticed this was the *BSD forum.
I'm running Slackware, and sysctl doesn't work the same...
Code:
mingdao@james:~$ su -c "/sbin/sysctl -a | grep speed"
Password: 
error: unknown error 1 reading key 'net.ipv4.route.flush'
dev.cdrom.info = drive speed:           52      40
dev.cdrom.info = Can change speed:      1       1
No worries, though, I'll check it out later.

Thanks.
 
Old 06-29-2005, 09:59 AM   #7
Cron
Member
 
Registered: Jun 2004
Location: Lithuania
Distribution: FreeBSD, Arch, Ubuntu
Posts: 145

Rep: Reputation: 15
@ Chinaman:
Ahh...
I know this is all clumsy, but here you go - a neat command to get CPU speed (at least it works (for Linux) ):
Code:
cat /proc/cpuinfo | grep "cpu MHz" | sed 's/[^0-9\.]//g'
Hope this works for you !

Last edited by Cron; 06-29-2005 at 10:06 AM.
 
Old 07-01-2005, 11:06 PM   #8
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
Remember,

Linux is NOT the same as *BSD. There is no /proc/cpuinfo and /proc/meminfo in BSD. To find out use dmesg like so:

dmesg | grep CPU

-twantrd
 
Old 07-01-2005, 11:26 PM   #9
xamdbz01
Member
 
Registered: Jun 2004
Location: Colorado Springs, CO
Distribution: FC2
Posts: 33

Original Poster
Rep: Reputation: 15
I got it all figured out now.

Thanks for the input
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Processor clock speed vs. CPU speed moxieman99 Linux - General 4 06-24-2005 10:43 AM
4 processor listings in cpuinfo on dual processor system. atticboy1 Linux - Hardware 2 02-08-2004 06:35 PM
xinetd 100% utilization on one processor on a two processor system red hat 9 garnold Linux - General 0 02-02-2004 01:47 PM
What speed is your processor? ezra143 General 34 12-30-2003 02:24 AM
Processor speed problem GodMinusOne Slackware 15 08-31-2003 01:56 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 10:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration