how to get cpu information on Linux machine
Hi,
I want to display cpu information like model number, vender information, and how many cpu's are there in the system (Linux machine) Is there any system call ? or /proc/cpuinfo is the only way And also how get information regarding controllers and adapters installed on system(Linux machine) using any system call Thanks and regards laxmi |
cat /proc/cpuinfo
cat /proc/meminfo dmesg lspci Welcome to LQ :-) |
How to get the same things using some system calls
|
do these not supply you with enough information?
what do you need it for? does this not work? |
Sorry, I want to store model number, vender information, and how many cpu's are there to some variables so that i can display same things on the browser
|
you can open this file /proc/cpuinfo from your C program, and store those vendor_id, model name fields in to variables. this is one way. this will require lots of string processing work.
|
/usr/sbin/./x86info -a
|
x86info is hardly a standard utility.
/proc/cpuinfo is the standard interface to the kernel's information regarding CPUs. It is the best option for getting the information you want. There are several scripts on here and other sites that show how to extract the relevant information. |
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
|
i agree with Nathanael
this is why `cat /proc/cpuinfo` Code:
processor : 0 |
Here i cant see the unique cpuid how to retriew that cpuid?????????
|
Who are you?
CPUID is an cpu instruction .. look here for details http://www.paradicesoftware.com/specs/cpuid/index.htm Although the best reading material are the manuals from intel's site Cheers |
Though I'm not sure why you need the CPUID. /proc/cpuinfo contains all the information from CPUID, already decoded for you.
|
I actually have a similar problem. I'm trying to write a set of scripts for which I need to know the pentium-m cpu model of the current computer. That is, I need to know if it's p-m 753, p-m 725, etc. I can't find that information in /proc/cpuinfo. Is there a way to find that out?
|
Quote:
i wasn't shooting for standard, more so toward another alternative to the already suggested methods, the guy asks for maybe another way beyond /proc/cpuinfo, i just threw one out there ;-p |
All times are GMT -5. The time now is 05:48 AM. |