LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 01-18-2005, 06:19 AM   #1
sagarparadkar
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Question Determining Number of Physical CPU


Dear All,

I wanted to find out how many physical CPUs are present in my Linux and Sun Solaris Server.

I believe there must be some OS commands to accomplish this, but could not remember any. Can someone inform me these commands...

Thanks in advance.

Regards,
Sagar Paradkar
 
Old 01-18-2005, 08:04 AM   #2
kojak
LQ Newbie
 
Registered: Jan 2005
Posts: 5

Rep: Reputation: 0
cat /proc/cpuinfo

or dmesg
 
Old 01-18-2005, 03:10 PM   #3
twantrd
Senior Member
 
Registered: Nov 2002
Location: CA
Distribution: redhat 7.3
Posts: 1,440

Rep: Reputation: 52
/proc/cpuinfo works for linux, not solaris. To find out for solaris, there's a couple ways:

1. psrinfo -v
2. /usr/platform/sun4u/sbin/prtdiag -v

-twantrd
 
Old 01-18-2005, 10:25 PM   #4
sagarparadkar
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Hi all,

Thanks to kojak and twantrd...

Actually cat /proc/cpuinfo works nice for Linux. But 'dmesg' may not give you the number of CPUs if you are getting several messages fired to the console by any other applications, as the concerned file gets overwritten...

For Solaris I checked with 'psrinfo -v' and it worked nice.

Thanks again...

Regards,
Sagar
 
Old 01-12-2009, 10:08 PM   #5
vwvr9
Member
 
Registered: Feb 2005
Distribution: OpenSuse 10.1 / Centos 4.4
Posts: 60

Rep: Reputation: 15
cat /proc/cpuinfo | egrep "processor|physical\ id|core\ id|cpu\ cores"

Look at the "physical\ id" for physical CPU count and "cpu\ cores" for the core count

Code:
[root@abibi ~]# cat /proc/cpuinfo | egrep "processor|physical\ id|core\ id|cpu\ cores"
processor       : 0
physical id     : 0
core id         : 0
cpu cores       : 4
processor       : 1
physical id     : 0
core id         : 1
cpu cores       : 4
processor       : 2
physical id     : 0
core id         : 2
cpu cores       : 4
processor       : 3
physical id     : 0
core id         : 3
cpu cores       : 4
processor       : 4
physical id     : 1
core id         : 0
cpu cores       : 4
processor       : 5
physical id     : 1
core id         : 1
cpu cores       : 4
processor       : 6
physical id     : 1
core id         : 2
cpu cores       : 4
processor       : 7
physical id     : 1
core id         : 3
cpu cores       : 4
[root@abibi ~]#
 
  


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
Determining CPU FSB blimbo Linux - Hardware 1 11-07-2005 08:18 AM
Determining IBM Model Number co_bofh Linux - Software 4 04-26-2005 08:57 AM
Determining last login from a physical console DiscoGranny Linux - Security 2 02-03-2005 12:17 PM
why there is a need for minor number and major number for monitor/keyboard in pc? tripathi Solaris / OpenSolaris 1 11-07-2003 09:36 AM
LVM Problem - vgimport - wrong number of physical volumes to import volume group Anything1 Linux - Software 0 09-06-2003 07:18 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

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