content top

resxtops and troubleshooting Memory for ESXi/ESX hosts from the vMA

No Gravatar

Here is a quick cheat sheet for the vMA (if you need it).

  • The default user name is vi-admin password is set on install
  • To add an esx host type vifp addserver <your esxhostname.company.com>
  • To show a quick list of your servers vifp listservers
  • To initialize a connection to a particular host type vifpinit esxhostname.company.com
  • To capture logs from an esx host type vilogger enable –server <fqdn of esxhost you want to monitor> –numrotation 30 –maxfilesize 1023 –collectionperiod 100

How can I launch resxtop remotely?

$resxtop –server <fqdn of your vCenter> –vihost <fqdn of esxhost you want to monitor> –username <your username to login Virtual Center>

(Note: you will be prompted for your password)

How can I run resxtop in batch mode and store all that in a .csv ?  The command below batches it takes 60 samples every 5 seconds then stores it in a file named data.csv

$resxtop -b -a -n 60 –server <fqdn of your virtualcenter server> –vihost <fqdn of your esxhost> –username (for your virtualcenter)

Why would I ever want to run resxtops when this stuff is in vCenter?  lol.

Some quick notes now that were in esxtops remotely using the vMA….

1) resxtops updates every 5 seconds to delay it type s then the refresh interval (20 would be 20 seconds)
2) Type V to just show virtual machines
3) To drill down into a virtual machine and look at the worlds type e then the gid
4) typing c will bring up cpu, m will bring up memory, d will bring up disk and n will bring up network

Troubleshooting Memory from the vMA with resxtops

1) Determine if the balloon driver is installed in a Virtual Machine  type m for memory view then f to toggle fields select MCTL
–Now that it is selected return back to the screen looking at the MCTL if the MCTL collumn says N on a virtual machine then the balloon driver isnt installed

2) Look at MEMSZ and GRANT counters…GRANT\MEMSZ = %memory used

3) To check demand of virtual machines memory  a  quick peak at Memory Usage Counter, the Average column and the Maximum (peak) column will help greatly if average> 80 or peak >90 high demand for virtual machines memory might be causing problem. ( I know virtual center)

4) Too check to see if you ESX host swapped in the past look at SWAP/MB if the value > 0 it has swapped virtual machine memory in the past.  If the answer is no, the ESX host doesnt have any virtual machine memory swapped.

5) Look at your SWCUR for your virtual machine if  the value> 0 then the ESX host has swapped memory from your test VM.

6) Look at your MCTLSZ if this > 0 your vm is balloning, if SWR/s or SWW/s your virtual machine is swapping

7) Look at MCTLSZ for your test virtual machine if value > 0 then vm is balloning

Read More

resxtops and troubleshooting CPU for ESXi/ESX hosts from the vMA

No Gravatar

Here is a quick cheat sheet for the vMA (if you need it).

  • The default user name is vi-admin password is set on install
  • To add an esx host type vifp addserver <your esxhostname.company.com>
  • To show a quick list of your servers vifp listservers
  • To initialize a connection to a particular host type vifpinit esxhostname.company.com
  • To capture logs from an esx host type vilogger enable –server <fqdn of esxhost you want to monitor> –numrotation 30 –maxfilesize 1023 –collectionperiod 100

How can I launch resxtop remotely?

$resxtop –server <fqdn of your vCenter> –vihost <fqdn of esxhost you want to monitor> –username <your username to login Virtual Center>

(Note: you will be prompted for your password)

How can I run resxtop in batch mode and store all that in a .csv ?  The command below batches it takes 60 samples every 5 seconds then stores it in a file named data.csv

$resxtop -b -a -n 60 –server <fqdn of your virtualcenter server> –vihost <fqdn of your esxhost> –username (for your virtualcenter)

Why would I ever want to run resxtops when this stuff is in vCenter?  lol.

Some quick notes now that were in esxtops remotely using the vMA….

1) resxtops updates every 5 seconds to delay it type s then the refresh interval (20 would be 20 seconds)
2) Type V to just show virtual machines
3) To drill down into a virtual machine and look at the worlds type e then the gid
4) typing c will bring up cpu, m will bring up memory, d will bring up disk and n will bring up network

Troubleshooting CPU Problems on ESX Hosts and VMs

The first thing you should do is look at your physical ESX host CPU

Again, Typing c will bring the CPU section of resxtops you can add and remove and rearrange fields typing f
Look at your PCPU UTIL -% if the average is over 75% or peaks >90% it is very possible ESX host CPU is saturated; service console runs at PCPU 0

The 2nd thing you should do is check Cpu Ready of your VMs if your CPU ready is for most vms is hovering around 20% or higher they are waiting too long for CPU either adjust resource pool or vmotion to a different host.

The third thing I would do it look at individual VMs CPU %USED and %RDY.  A high ready could be because the host or a resource pool make adjustments accordingly, a high %used like 75% or higher might be a sign to give it another cpu.  However is your application SMP friendly?

Does this VM really need 2 CPUs?

If it does it should be using them….right?

To check if the VM is really making use of the cpus you gave it expand a world of a VM.  Look at your vCPU( again from the resxtops cpu view type e then the gid of your vm)….if one of the vCPU is very low and one a lot higher chances are your virtual machine isn’t symetric multiprocessing and you should remove a cpu.  Giving CPUs to a VirtualMachine that isnt Symetric Multiprocessing is bad for performance….

What about swapping?
To check swapping look at the %SWPWT column above 5% performance of the VM will degrade significantly

Read More
content top