What does *CPU ready time* mean

In ESX / vSphere Environments you maybe already discovered a value called “CPU ready time”. And the confusing thing is, this value doesn’t tell you how long the VM was ready this day 😉

The whole definition can be found fully detailed in a VMware PDF here.

To get a quick explanation, I found a good forum thread where it’s explained quite good:

mcowger:
The rub comes when you have multi core VMs – regardless of the amount of CPU needed by the VM (lets say its a 4 core VM, and only needs 1 core worth of power), it needs to schedule onto 4 cores (because it is a 4 core VM).  While it is scheduled onto 4 processor cores, nothign else can use them, even though that VM isn’t really using all that they can do.  So, when you have a lot of low usage VM’s with 2 or 4 cores, you end up with problems scheduling them onto cores, and not so much the speed of the CPUs themselves.  Hence, the need to watch your CPU Ready times.

Source: http://communities.vmware.com/thread/130310

PowerShell Commands for daily use

I’ve just collected some simple but powerful commands here.

List all Processes by their Processor time:

Get-Process | Sort-Object cpu -descending | Select-Object -first 10 | Format-Table name, CPU -auto

List Environment Variables, in cmd.exe “echo %username%” is in Powershell:

Get-Content env:username Write-Host $env:username

Kill a running process like calc.exe instead uf using TaskManager. Trick here is that there’s already a system predefined alias for Get-Process (alias “ps”) and Stop-Process (alias “kill).

ps calc | kill

Generate random Passwords:

Add-Type -Assembly System.Web
[Web.Security.Membership]::GeneratePassword(length,non-alphanum-count)