LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-27-2010, 08:36 AM   #1
dayvidvictor
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Rep: Reputation: 1
Information About Processor


Hello Everybody, I'm writting an app and I need to get all te informations about a processor. I know I can use

dmidecode -t 7
cat /proc/cpuinfo
hwinfo --cpu
lscpu
(...)

None of these have all the informations I need, and I need to get informations from different places. The problem is that sometimes I can't mix those information.

ex:
dmidecode tells me that there is 2 processors
cat /proc/cpuinfo tells me that there is only
one core, and even when it tells me there is 4,
how can I know if a core is from Processor A or Processor B?.
at other pc I can't know how many cores there is
because of the version of the kernel, cpuinfo doesn't give enought information about it.

I need to run that app for 2.4.X kernel versions and 2.6.X kernel versions.

can anyone help me?
 
Old 11-27-2010, 08:53 AM   #2
udaman
Member
 
Registered: Oct 2010
Location: New England, USA
Distribution: OpenSUSE/Slackware64/RHEL/Mythbuntu
Posts: 189

Rep: Reputation: 39
From cat /proc/cpuinfo, You can tell which processor the core if from by the physical address. processor 0 on physical id 0, and processor 1 on physical id 0, are two cores from the same cpu socket.
Code:
processor       : 0
.
.
.
physical id     : 0

and

processor       : 1
.
.
.
physical id     : 0
 
Old 11-27-2010, 02:03 PM   #3
dayvidvictor
LQ Newbie
 
Registered: Nov 2010
Posts: 8

Original Poster
Rep: Reputation: 1
tks udaman,

but the problem is that for older versions of the kernel (like 2.4.XX)
the /proc/cpuinfo isn't complete, doesn't have that much informations.

Right now I can't post the output of a 2.4 version, but it is kind of simple.

do you know if there is some other way to make a match about /proc/cpuinfo and
dmidecode?

how to know the number of cores?
I'm thinking about use lscpu, it gives the number of cores and number of threads
(for hyperthreads cpu), but there would be another binding and another depedence
for my application.

anybody has any idea?
 
  


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
[SOLVED] Processor temperature information. ////// Linux - Hardware 5 08-14-2009 05:38 AM
Z/OS: find the processor information form z/os sachink General 8 03-27-2009 08:18 AM
Processor information in FREE BSD anujgupta_241082 *BSD 3 08-07-2008 01:25 AM
Processor Information on HP-UX afrose_fathima Other *NIX 1 05-15-2006 05:50 AM
How to get processor information? anuradha06 AIX 3 05-11-2006 04:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:56 AM.

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