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 09-01-2016, 01:47 PM   #1
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Rep: Reputation: 0
Cant find number of cpus in my Guest machine


Hi all,


PHP Code:
Host    Windows 7
Guest        
Oracle linux 5.5
Work station 
Vmware 10 
My host machine says it has 4 cpus.
In linux machine how do i find number of cpus ?

# lscpu
bash: lscpu: command not found

PHP Code:
# uname -a
Linux OEL5.SYSTEM.COM 2.6.18-194.el5 #1 SMP Mon Mar 29 20:06:41 EDT 2010 i686 i686 i386 GNU/Linux 
PHP Code:
# cat /proc/cpuinfo
processor       0
vendor_id       
GenuineIntel
cpu family      
6
model           
69
model name      
Intel(RCore(TMi3-4010U CPU 1.70GHz
stepping        
1
cpu MHz         
1696.109
cache size      
3072 KB
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 mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss nx pdpe1gb rdtscp constant_tsc up ida nonstop_tsc arat pni ssse3 sse4_1 sse4_2 popcnt [8]
bogomips        3392.21 
Thanks.
Attached Thumbnails
Click image for larger version

Name:	cc.png
Views:	13
Size:	61.9 KB
ID:	22914  

Last edited by Joy Stick; 09-01-2016 at 01:52 PM.
 
Old 09-01-2016, 01:51 PM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
You show only one CPU. (hint: the count starts with 0 as it is the index in a table of CPUs, so processor 0 is ONE CPU)
 
1 members found this post helpful.
Old 09-01-2016, 01:57 PM   #3
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hi JPollard,

But my host machine shows 4 CPU's
Please see attached screen shot above post
Why Host shows cpu count is 4 but guest OS CPU count is 1 ?

Thanks.
 
Old 09-01-2016, 02:12 PM   #4
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,001
Blog Entries: 26

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Quote:
Originally Posted by Joy Stick View Post
Hi JPollard,

But my host machine shows 4 CPU's
Please see attached screen shot above post
Why Host shows cpu count is 4 but guest OS CPU count is 1 ?

Thanks.
I'm assuming because when you created it in the hypervisor, you only allocated a single CPU to it. The hypervisor will only allocate as many CPU's as you tell it to, and you should never allocate all your physical CPU's (threads) to another VM, as it will cause issues with your host OS.

Last edited by Timothy Miller; 09-01-2016 at 02:13 PM.
 
Old 09-01-2016, 02:15 PM   #5
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hello Again,

At that time of Linux installation , we do not set any CPU count ! am i right ??

Actually what do you mean hypervisor ?

Is it possibilities to set 4 cpu to my linux machine ?
 
Old 09-01-2016, 02:19 PM   #6
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,001
Blog Entries: 26

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Quote:
Originally Posted by Joy Stick View Post
Hello Again,

At that time of Linux installation , we do not set any CPU count ! am i right ??

Actually what do you mean hypervisor ?

Is it possibilities to set 4 cpu to my linux machine ?
I'm assuming by the name of the workstation that you're using VMWare (player maybe) as your hypervisor?
Depending on the hypervisor, some will allow you to set all the physical cores to the client (I know vbox allows it), but it's not a good idea as it will cause your host OS to have issues as the guest is attempting to use all of them.

Some hypervisors create it with the default of 1, and you need to edit the properties to allocate more than 1.

If you can confirm what you're using, it'd be a lot easier to assist.
 
1 members found this post helpful.
Old 09-01-2016, 02:24 PM   #7
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by Joy Stick View Post
Hello Again,

At that time of Linux installation , we do not set any CPU count ! am i right ??
Not at installation - at the time the virtual machine was created.

The Linux installation will use as many CPUs as you allocate to the virtual machine. MOST management functions will allow you to change the resources allocated without needing reinstallation, though you normally have to shut down the specific VM being modified. Once modified just booting the virtual machine will allow Linux to handle the rest.
Quote:
Actually what do you mean hypervisor ?
https://en.wikipedia.org/wiki/Hypervisor
Quote:
Is it possibilities to set 4 cpu to my linux machine ?
You might - but since your host is Windows THAT might not allow it.

Well, I would suggest no more than 3. That allows the fourth CPU to be available for management functions of the host system.
 
1 members found this post helpful.
Old 09-01-2016, 02:52 PM   #8
Joy Stick
Member
 
Registered: Dec 2015
Distribution: RHEL 4.7
Posts: 127

Original Poster
Rep: Reputation: 0
Hi JPollard,

Thanks alot !!

Few question from my side,

Is there any difference between core and cpu in system/server ?
is this right ? number of cores = number of processors ?
 
Old 09-01-2016, 02:58 PM   #9
Timothy Miller
Moderator
 
Registered: Feb 2003
Location: Arizona, USA
Distribution: Debian, EndeavourOS, OpenSUSE, KDE Neon
Posts: 4,001
Blog Entries: 26

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Quote:
Originally Posted by Joy Stick View Post
Hi JPollard,

Thanks alot !!

Few question from my side,

Is there any difference between core and cpu in system/server ?
is this right ? number of cores = number of processors ?
Sometimes, but not usaully (anymore).

Most cpu's now have more than 1 core, even though it's a single processor.

Also, if you have a cpu that supports Hyperthreading (or whatever AMD will be calling that same technology with their upcoming Zen release), then even though you have only 2 actual CPU cores (and still only a single processor), your OS will see 4 cores.
 
  


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
How to find Machine serial number of solaris machine? adastane Solaris / OpenSolaris 15 01-09-2012 08:29 AM
How to find the number of physical processors and architecture in a hp-ux machine shawshank_blr Other *NIX 3 07-24-2009 09:24 AM
How to find the number of physical processors in a AIX machine shawshank_blr AIX 13 07-17-2009 10:08 PM
Find Serial Number of Machine zael Programming 4 10-27-2003 12:39 PM
how do i find number of cpus in one machine? doublefailure Linux - General 3 03-26-2002 02:52 PM

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

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