How many cores do I have?

Joined
Oct 23, 2013
Messages
26
Best answers
0
Ratings
1
Points
0
#1
How to find out how many cores my processor has on my VPS Linux hosting and Windows 7 on my PC? I want to have a fast check on a new VPS or new PC.
 

LJSHost

Well-known member
Joined
Jul 5, 2016
Messages
1,031
Best answers
0
Ratings
203
Points
63
#2
Linux

Code:
cat /proc/cpuinfo | grep processor
Windows

Open the task manager and select the performance tab to see how many cores and logical processors your PC has.
 

eva2000

Well-known member
Joined
Jan 14, 2017
Messages
173
Best answers
0
Ratings
65 5
Points
28
#3
above cat of /proc/cpuinfo

or just use top command

type top and then while top is running hit the numeric key = 1

if you want to save the all core display format, while still running top and after hitting = 1 key, hit the upper case W key to write the new display format to settings file permanently.

that will expand to cpu display to all cpu cores available.

example with W key written saved expanded cpu core output for top - 8 cpu threads from cpu0-7
Code:
top -bn1
top - 13:56:49 up 7 days, 11:08,  1 user,  load average: 0.22, 0.32, 0.23
Tasks: 157 total,   1 running, 156 sleeping,   0 stopped,   0 zombie
%Cpu0  :  0.2 us,  0.1 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.2 us,  0.0 sy,  0.0 ni, 95.7 id,  4.1 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  0.2 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  :  0.2 us,  0.0 sy,  0.0 ni, 95.7 id,  4.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 32908752 total, 26703280 free,  1358996 used,  4846476 buff/cache
KiB Swap:  2095096 total,  2095096 free,        0 used. 30977140 avail Mem
 
Joined
Oct 23, 2013
Messages
26
Best answers
0
Ratings
1
Points
0
#4
Linux

Code:
cat /proc/cpuinfo | grep processor
Windows

Open the task manager and select the performance tab to see how many cores and logical processors your PC has.

[[email protected] ~]# cat /proc/cpuinfo | grep processor
processor : 0

It display 0 core?


above cat of /proc/cpuinfo
This seems worked

Code:
[[email protected] ~]# cat of /proc/cpuinfo
cat: of: No such file or directory
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 13
model name      : QEMU Virtual CPU version (cpu64-rhel6)
stepping        : 3
microcode       : 0x1
cpu MHz         : 2933.436
cache size      : 4096 KB
physical id     : 0
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pse36 clflush mmx fxsr sse sse2 syscall nx lm nopl pni cx16 hypervisor lahf_lm
bogomips        : 5866.87
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

or just use top command

type top and then while top is running hit the numeric key = 1

if you want to save the all core display format, while still running top and after hitting = 1 key, hit the upper case W key to write the new display format to settings file permanently.

that will expand to cpu display to all cpu cores available.

example with W key written saved expanded cpu core output for top - 8 cpu threads from cpu0-7
Code:
top -bn1
top - 13:56:49 up 7 days, 11:08,  1 user,  load average: 0.22, 0.32, 0.23
Tasks: 157 total,   1 running, 156 sleeping,   0 stopped,   0 zombie
%Cpu0  :  0.2 us,  0.1 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.2 us,  0.0 sy,  0.0 ni, 95.7 id,  4.1 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  0.2 us,  0.0 sy,  0.0 ni, 99.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  :  0.2 us,  0.0 sy,  0.0 ni, 99.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  :  0.2 us,  0.0 sy,  0.0 ni, 95.7 id,  4.1 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem : 32908752 total, 26703280 free,  1358996 used,  4846476 buff/cache
KiB Swap:  2095096 total,  2095096 free,        0 used. 30977140 avail Mem

When i hit 1 it display this

Code:
Tasks: 120 total,   1 running, 119 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.3 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.3 st
KiB Mem :  1883860 total,   297788 free,   342072 used,  1244000 buff/cache
KiB Swap:  2097148 total,  1999316 free,    97832 used.  1235032 avail Mem
or

top - 22:45:20 up 49 days, 8:56, 1 user, load average: 0.03, 0.27, 0.67
Tasks: 118 total, 1 running, 117 sleeping, 0 stopped, 0 zombie
%Cpu0 : 0.3 us, 0.7 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.0 hi, 0.0 si, 0.3 st
KiB Mem : 1883860 total, 298912 free, 340884 used, 1244064 buff/cache
KiB Swap: 2097148 total, 1999316 free, 97832 used. 1236228 avail Mem
My VPS has 1 core?
 

LJSHost

Well-known member
Joined
Jul 5, 2016
Messages
1,031
Best answers
0
Ratings
203
Points
63
#6
Correct, it does start counting from 0 so 0 is 1 core 1 would be 2 cores etc.
 
Joined
Feb 7, 2015
Messages
39
Best answers
0
Ratings
3
Points
0
#7
Linux

Code:
cat /proc/cpuinfo | grep processor
Windows

Open the task manager and select the performance tab to see how many cores and logical processors your PC has.
This worked and easily know a CPU with many cores
Here's one 4 cores I checked with your code
Just curious why it started from 0 (processor)


Code:
[[email protected] ~]# cat /proc/cpuinfo | grep processor
processor       : 0
processor       : 1
processor       : 2
processor       : 3
above cat of /proc/cpuinfo

or just use top command

type top and then while top is running hit the numeric key = 1

if you want to save the all core display format, while still running top and after hitting = 1 key, hit the upper case W key to write the new display format to settings file permanently.
This worked with many details when I pressed 1 with top command

Code:
[[email protected] ~]# top
top - 04:59:33 up 48 days, 23:28,  1 user,  load average: 0.24, 0.24, 0.21
Tasks: 156 total,   1 running, 155 sleeping,   0 stopped,   0 zombie
Cpu0  :  0.0%us,  0.3%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu1  :  0.3%us,  0.3%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.7%us,  0.3%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  0.7%us,  0.3%sy,  0.0%ni, 99.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:   3924152k total,  3545628k used,   378524k free,   240996k buffers
Swap:        0k total,        0k used,        0k free,  2445164k cached
 
Joined
Jan 16, 2017
Messages
53
Best answers
0
Ratings
7
Points
0
#8
To check total CPU cores and their usage, you can run top command and press 1. It will list all cpu cores and their usage. You can also check total CPU cores using : grep processor /proc/cpuinfo
 

AlbaHost

Well-known member
Joined
Jan 18, 2017
Messages
397
Best answers
1
Ratings
110 6
Points
43
#9
just type:

nproc
 
Older Threads
Newer Threads
Replies
16
Views
10,491
Replies
4
Views
1,657
Latest Threads
  • Deleted
  • Deleted by Localnode
  • Reason: Spam
Replies
0
Views
3
Replies
0
Views
1
  • Deleted
  • Deleted by fwh
Replies
0
Views
4
Recommended Threads

Latest Hosting OffersNew Reviews

Sponsors

Latest Blog ArticlesMost Viewed Threads

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top