LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-07-2004, 10:51 PM   #1
r_213
Member
 
Registered: Sep 2004
Posts: 36

Rep: Reputation: 15
Finding number of CPUs.


Is there any way to find the number of CPUs in Linux. The sar command (sar -cuq 5 ) gives the average values of all the CPUs present. Is there any other command or system file from where I can get the individual CPU count and its values. Plz help me.

Thanks and Regards,
Ranganathan
 
Old 10-07-2004, 11:37 PM   #2
darthtux
Senior Member
 
Registered: Dec 2001
Location: 35.7480 N, 95.3690 W
Distribution: Debian, Gentoo, Red Hat, Solaris
Posts: 2,070

Rep: Reputation: 47
I am on a one-processor machine right now but you can look in the proc directory

ls /proc | grep cpu

cat /proc/cpuinfo
 
Old 10-07-2004, 11:48 PM   #3
r_213
Member
 
Registered: Sep 2004
Posts: 36

Original Poster
Rep: Reputation: 15
Thanks for the reply.

I want to know one more thing. the sar command "sar -cuq 5" gives the output for all the CPUs. is there anyother way to get the values for each CPU?
 
  


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
top: number of CPUs naijaguy Linux - Newbie 4 02-11-2005 05:36 PM
finding number of files in a directory pantera Programming 2 08-20-2004 10:17 AM
finding the number of files in each directory ridertech Programming 1 06-02-2004 10:26 PM
how do i find number of cpus in one machine? doublefailure Linux - General 3 03-26-2002 02:52 PM
help me in finding out the hard disk number in Linux OS balki_27 Programming 0 08-04-2001 08:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration