LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 12-22-2005, 08:54 AM   #1
Dark Carnival
Member
 
Registered: Jun 2003
Posts: 166

Rep: Reputation: 30
How to find CPU Cache ? (apart from dmesg|grep CPU)


Hey. I'm trying to make a little script in which it would be nice to show the cache sizes of the CPU.
If you use /proc/cpuinfo you only get the Level 2 cache shown and I'd like to ALSO show the Level 1 caches and any Level 3 caches that there may be...

I know that the kernel knows of these cache-sizes because if you do a "dmesg| grep CPU" right after boot , you'll see a lot of info about your cpu INCLUDING the sizes of the different L-caches..

So.. If there a place where you can get this info no matter how long your computer has run ?
 
Old 12-22-2005, 10:05 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Odd that that's not in /proc/cpuinfo. It really ought to be.

I can't find anything about it in /sys either.
 
Old 12-22-2005, 03:45 PM   #3
Gsidious
Member
 
Registered: Nov 2005
Location: Oregon
Distribution: Ubuntu
Posts: 64

Rep: Reputation: 17
Depending on the disribution you are using, yes there is a place. SuSE puts boot messages in /var/log/boot.msg & Fedora/RedHat use /var/log/dmesg so your script could check there.
 
Old 12-22-2005, 07:10 PM   #4
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Using a copied dmesg seems a bit of a hack -- not very compatible with all distributions, or very dependable. I would agree that cpuinfo, or something similar, should display a break down of L1/L2/L3 cache.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
kacpid eating cpu 99% cpu time! tjclancy Linux - Software 13 09-19-2011 03:08 PM
Help Configuring the Memory Used by a Process in RedHat? (Cache Memory on CPU) geogecko Linux - General 3 02-23-2005 03:32 PM
please help guys, wrong cpu speed shown with a regular non-mobile cpu !! : ( maku Linux - Hardware 1 01-02-2005 02:03 PM
CPU cache size /proc/cpuinfo is wrong? omg-ffs Linux - Hardware 9 10-13-2004 11:46 AM
Switching off a CPU of a multiple CPU machine kravisudhakar Linux - General 1 12-26-2003 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 09:02 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