Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

This is a server that is running on Vmware ESXi:

SERVER:/root # cat /etc/SuSE\-release                         
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11               
PATCHLEVEL = 2             
SERVER:/root # rpm -qa|grep -i vmware                         
vmware-open-vm-tools-common-8.0.3-258828.sles11sp1
vmware-open-vm-tools-nox-8.0.3-258828.sles11sp1
vmware-tools-nox-8.0.3-258828.sles11sp1
vmware-tools-common-8.0.3-258828.sles11sp1
SERVER:/root # 

How can I figure out how many physical CPUs are assigned to the vmware guest? I only have access to the guest, not the host

share|improve this question
1  
You need to specify your VMware platform if you want a straighter answer. ESXi? Workstation? Fusion? ESXi assigns CPU's as sockets and cores, not sure what 1.2 would equate to? Maybe you are looking for the resource pool? –  Tim Aug 2 '12 at 14:09

4 Answers 4

The lscpu, if installed, synthesize somehow the information given by cat /proc/cpuinfo. In particular you can take a look at the fields CPU(s), Core(s) per socket and Socket(s).

share|improve this answer
    
+1, far better than cpuinfo –  Amit May 22 at 19:38

Assuming you are running VMware ESXi platform.

First you can try dmidecode -t processor from the guest.

If that doesn't provide what you need, go grab the Viper toolkit or the ViJava toolkit so you can automate queries against the ESXi server to obtain the information you need.

share|improve this answer
    
Thanks for mentioning these two toolkits :) –  gasko peter Aug 2 '12 at 14:39
    
No problem. I use the ViJava TK extensively. Check out this example of how powerful the TK is for building apps/scripts: zeroex.co.cc:89/ypvms/vz (Note: Ajax takes about 10 to load after the page loads, be patient) –  Tim Aug 2 '12 at 15:25
    
+1 dmidecode is awesome. Of course the problem is that it's up to the hypervisor what kind of BIOS information it wants to export to its guests. –  ryran Aug 2 '12 at 23:54

Try this one

cat /proc/cpuinfo
share|improve this answer
    
I checked it, but it doesn't provides the info regarding vmware, that how many cpu's did the vmware host give to the vmware guest, it's a number like: 1 or 1.2, etc. –  gasko peter Aug 2 '12 at 12:27
1  
Actually it usually DOES show the number of processors. You should see a line with "processor" in it for each accessible CPU. i.e. cat /proc/cpuinfo | grep processor should return two lines. –  Garrett Bluma Aug 2 '12 at 21:13
up vote 0 down vote accepted

You can get this info only from the vSphere Client.. :\ (but fixme, if there is a way.. I just asked many people, and the conclusion was this..)

p.s.: maybe:

vmware-toolbox-cmd

can do this, but I can't see it on the servers:

http://www.virtuallyghetto.com/2011/01/how-to-extract-host-information-from.html

where does vmware-toolbox-cmd get's its information? isn't there any alternatives for it?

share|improve this answer
    
It would only be available if you installed VMware Tools in the guest. –  Michael Hampton Aug 6 '12 at 7:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.