LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2019, 09:54 AM   #1
nanscuvel
LQ Newbie
 
Registered: Jun 2017
Posts: 2

Rep: Reputation: Disabled
How many processors?


How do I find the number and type of processors on the server
 
Old 07-18-2019, 09:57 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 21,964

Rep: Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830Reputation: 5830
Quote:
Originally Posted by nanscuvel View Post
How do I find the number and type of processors on the server
Again, as with your other thread, you need to do basic research first. The /proc/cpu_info file has this.
 
1 members found this post helpful.
Old 07-18-2019, 09:58 AM   #3
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,406
Blog Entries: 9

Rep: Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897
How many penguins appear on the screen when you boot? That'll give you the number.

But for more detailed info about type, look at /proc/cpuinfo.
 
1 members found this post helpful.
Old 07-18-2019, 10:39 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 3,473

Rep: Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917Reputation: 917
procinfo can't distinguish between cores and processors, as far as I know. A tool like dmidecode might be a better solution.

Red Hat has this to say about the subject: https://access.redhat.com/discussions/480953.
 
Old 07-18-2019, 10:47 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ArcoLinux
Posts: 9,153

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
Quote:
Originally Posted by hazel View Post
How many penguins appear on the screen when you boot? That'll give you the number.

But for more detailed info about type, look at /proc/cpuinfo.
are you serious? now I got a try counting penguins....
 
Old 07-18-2019, 10:54 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,940

Rep: Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211Reputation: 1211
Quote:
Originally Posted by BW-userx View Post
are you serious? now I got a try counting penguins....
Let us know if it sends you to sleep.
 
Old 07-18-2019, 12:08 PM   #7
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 955

Rep: Reputation: 499Reputation: 499Reputation: 499Reputation: 499Reputation: 499
Quote:
Originally Posted by berndbausch View Post
procinfo can't distinguish between cores and processors, as far as I know.
No, it can't. It will treat all cores as processors.
But for most desktop (home-usage) machines, the answer is 1
As far as I know only XEON motherboards, mostly used for servers, have multiple (up to 4) CPU sockets. But, of course, it might be that by now even Core * cpu's have real multi-processor capabilities. But a "normal" Core i? (or such) motherboard only has a single cpu socket, so only a single cpu (and only a single memory controller). It can have multiple cores, of course, but a core is NOT a full separate processor (among that because of the single memory processor, so all cores have to wait on each other to get/store data from/to RAM (or even L2 cache).
 
Old 07-18-2019, 12:41 PM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: FreeBSD/Slackware-14.2+/ArcoLinux
Posts: 9,153

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
lscpu
Code:
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              2
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
 
1 members found this post helpful.
Old 07-18-2019, 02:40 PM   #9
ehartman
Member
 
Registered: Jul 2007
Location: Delft, The Netherlands
Distribution: Slackware
Posts: 955

Rep: Reputation: 499Reputation: 499Reputation: 499Reputation: 499Reputation: 499
Quote:
Originally Posted by BW-userx View Post
lscpu
Code:
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          4
On-line CPU(s) list:             0-3
Thread(s) per core:              2
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1
So this probably is a single cpu chip, with 2 cores and 2 threads per core, because I think the "Socket(s)" one gives the real number of physical cpu chips.
At least my system gives
Code:
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                2
On-line CPU(s) list:   0,1
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 23
Stepping:              10
CPU MHz:               3066.803
BogoMIPS:              6133.12
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              3072K
and I know it is a Core 2 Duo cpu, so a single chip with 2 cores.

Another way is
Code:
 $ cat /proc/cpuinfo
(only giving the last core)
processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 23
model name      : Intel(R) Core(TM)2 Duo CPU     E7600  @ 3.06GHz
stepping        : 10
cpu MHz         : 3066.803
cache size      : 3072 KB
physical id     : 0
siblings        : 2
core id         : 1
cpu cores       : 2
apicid          : 1
initial apicid  : 1
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm tpr_shadow vnmi flexpriority
bogomips        : 6133.12
clflush size    : 64
cache_alignment : 64
address sizes   : 36 bits physical, 48 bits virtual
which gives the model name of the cpu chip too.

The OP hasn't told us yet if he wants to know the real physical number of cpu's or "how many parallel instruction streams can be processed", which will include cores and thread per core too.
 
Old 07-18-2019, 02:44 PM   #10
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,822

Rep: Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293
I think you all are being very helpful with the OPs homework in both of their threads.
These threads will definitely help others in the future.

I for one, was pleased to learn about lscpu -- I've always just looked at Webmin's System Information page, but, of course, that requires installing and configuring Webmin

Last edited by scasey; 07-18-2019 at 02:47 PM.
 
Old 07-18-2019, 02:53 PM   #11
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 9,158

Rep: Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990Reputation: 3990
nproc
 
1 members found this post helpful.
Old 07-18-2019, 02:55 PM   #12
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.6
Posts: 3,822

Rep: Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293Reputation: 1293
Quote:
Originally Posted by dugan View Post
nproc
Also cool. Appears to list number of cores, yes?
 
Old 07-19-2019, 05:34 AM   #13
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 3,406
Blog Entries: 9

Rep: Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897Reputation: 1897
Quote:
Originally Posted by scasey View Post
Also cool. Appears to list number of cores, yes?
That's what it does on my system. One Intel Bay Trail cpu, 4 cores.
Code:
hazel@bigboy:~
$ nproc
4
 
Old 07-20-2019, 12:08 PM   #14
dmchess
Member
 
Registered: Jan 2005
Posts: 142

Rep: Reputation: 23
Another simple way to tell, start top and then press "1".

top - 12:07:30 up 10 days, 17:08, 1 user, load average: 0.26, 0.10, 0.07
Tasks: 277 total, 1 running, 275 sleeping, 0 stopped, 1 zombie
%Cpu0 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu1 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 0.0 us, 0.3 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu3 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 0.0 us, 0.3 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu6 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu7 : 17.0 us, 2.3 sy, 0.0 ni, 80.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu8 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu9 : 0.3 us, 0.0 sy, 0.0 ni, 99.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu10 : 1.3 us, 0.0 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu11 : 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 16379904 total, 11147844 free, 1504144 used, 3727916 buff/cache
KiB Swap: 16653308 total, 16653308 free, 0 used. 14348768 avail Mem
 
  


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
One to Many or Many to Many? baldur2630 Programming 5 04-23-2013 12:09 PM
Doubt about physcial processors and logical processors umeshgupta1987 Solaris / OpenSolaris 5 08-10-2011 03:17 PM
how to find out how many processors on the server ashley75 Linux - General 7 11-27-2003 05:27 PM
Multi Booting many, many, many, OS's mac_man25 Linux - General 10 10-26-2003 09:13 AM
Will Linux Support Amd Processors And Other Than Intel Processors? halovivek Linux - Hardware 6 09-02-2003 01:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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