How to get CPU info on a vmware guest

47,254

Solution 1

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?

Solution 2

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).

Solution 3

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.

Solution 4

Try this one

cat /proc/cpuinfo

Solution 5

after you have the vmware tool installed try running the commands listed below which can give you the desired details

[root@abc ~]# vmware-toolbox-cmd stat speed
2597 MHz
[root@abc ~]# vmware-toolbox-cmd stat sessionid
0xe3544b3227f59800
[root@abc ~]# vmware-toolbox-cmd stat balloon
0 MB
[root@abc ~]# vmware-toolbox-cmd stat swap
15 MB
[root@abc ~]# vmware-toolbox-cmd stat memlimit
4294967295 MB
[root@abc ~]# vmware-toolbox-cmd stat memres
0 MB
[root@abc ~]# vmware-toolbox-cmd stat cpures
0 MHz
[root@abc ~]# vmware-toolbox-cmd stat cpulimit
4294967295 MHz
[root@abc ~]#
Share:
47,254

Related videos on Youtube

gasko peter
Author by

gasko peter

Updated on September 18, 2022

Comments

  • gasko peter
    gasko peter over 1 year

    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

    • Admin
      Admin almost 12 years
      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?
  • gasko peter
    gasko peter almost 12 years
    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.
  • Tim
    Tim almost 12 years
    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)
  • Garrett Bluma
    Garrett Bluma almost 12 years
    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.
  • rsaw
    rsaw almost 12 years
    +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.
  • leandrojmp
    leandrojmp almost 10 years
    +1, far better than cpuinfo