LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2003, 11:05 PM   #1
rieta
LQ Newbie
 
Registered: Aug 2002
Posts: 4

Rep: Reputation: 0
No of CPUs on a machine


I need to detect the number of CPUs in a linux machine(Red Hat linux 6.1/6.2/7.1/7.2 ). Is there a programmatic way to do so ?
Please help..

Thanks and Regards,

Rieta
 
Old 01-30-2003, 02:22 AM   #2
moeminhtun
Member
 
Registered: Dec 2002
Location: Singapore
Distribution: Fedora Core 6
Posts: 647

Rep: Reputation: 30
One way is that u can just read the "/proc/cpuinfo" file and filter the informations you need.

Last edited by moeminhtun; 01-30-2003 at 03:37 AM.
 
Old 01-30-2003, 09:15 PM   #3
linuxlah
Member
 
Registered: Jun 2002
Location: Batu Puteh, Malaysia
Distribution: (Mandrake 8.2) (Redhat 7.2,8.0,9.0) (Slackware 9.0,9.1)
Posts: 154

Rep: Reputation: 30
or you can do this "uname -p". This will tell your processor archs.
 
  


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
CPUs totallynewguy Linux - Hardware 3 08-29-2005 10:06 PM
Via CPUs 3dmike Linux - Hardware 2 03-22-2004 12:39 PM
2 CPUs jhirshon Linux - Newbie 2 01-31-2004 05:59 PM
What CPUs does everyone use? Guru3 Linux - Hardware 43 01-22-2004 10:15 AM
how do i find number of cpus in one machine? doublefailure Linux - General 3 03-26-2002 02:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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