Johnny Zhang
esxtop is a great tool to monitor your host resource. What about if you want more information on the VM itself?
Connect to ESX server via ssh --> "esxtop" --> "c" (to switch to the CPU screen) Now you will see somthing like this:
Now what about if I want to see the VM named "bs-bcs-vc01"?
I can type "e" --> now it will ask me about the GID which is 20 in this case. so I type in "20" hit enter.
You now can see the CPU
usage on all virtual CPU and the monitor processes (VMM), remote connections (MKS)
Johnny Zhang
There are times you need to get a quick report on the server uptime. There is a quick way to do this

vmkuptime.pl --text

The script will read through your existing vmkernel log files and figure out the servers total up time, total down time, longest up and down time. Number of unscheduled downtimes.

You can use this to show your boss how good you know your server with some hard work! (one command)
Johnny Zhang
I remember some customers were asking if there is a way to find out how many vmotions in total the vCenter kicked off.

You might able to find this out by query from the SQL database (Yes, you need to have access to the DB)

I test this on vCenter 2.5 (There maybe some modification on vCenter 4.0 which I will get a follow up later when I test it myself)

Log into SQL managment studio --> New query --> type in:

USE Your_DB_Name
GO

SELECT
Entity_name,
complete_state,
queue_time,
start_time,
complete_time,
event_chain_id,
username

FROM vpx_task

WHERE name='vim.VirtualMachine.migrate'

GO

You should get the information you are looking for. If you want more details you can use

SELECT *

FROM vpx_task

WHERE name='vim.VirtualMachine.migrate'

GO