Ever wondered what the trend is of all your VM’s CPU Usage? You might see surprising things
The following script calculates the following things:
| Perf1yAgo |
The average VM CPU usage over a 10 days timespan exactly 1 year ago |
| PerfNow |
The average VM CPU usage over the last 10 days |
| Trend |
0 % = No change in CPU usage 100 % = CPU Usage doubled in a 1 year timespan -50 % = CPU Usage is half of what it used to be 1 year ago |
VM’s with no statistics available from 1 year ago are skipped. PoweredOff VM’s are skipped as well.
Instructions
Fire up PowerCLI and connect to one or more vCenter servers with Connect-VIServer.
Read more…
If you’re troobleshooting SAN/HBA issues, it might come in handy to enable verbose logging on your Emulex HBA driver.
Run the following command to list the drivername
vmkload_mod -l | grep lpfc
The HBA driver is our case is lpfc_740 (lpfc stands for LightPulse Fibre Channel and 740 is the version number)
List the current options for the driver by entering
esxcfg-module -g lpfc_740
Run the following command to set the verbose logging option:
esxcfg-module -s lpfc_log_verbose=0xffff lpfc_740
You can run the esxcfg-module –g lpfc_740 command again to verify the settings:
Make the change (re)boot persistent
Reboot your host (make sure no VM’s are running)
If you now check your vmkernel logfile (/var/log/vmkernel), you will see a LOT of entries from your HBA driver.
After you have done your stuff, make sure to disable to logging by running (basically, you will remove the lpfc_log_verbose option from the driver loading module)
esxcfg-module –s ‘’ lpfc_740
esxcfg-boot -b
reboot
After the reboot, open up your vmkernel logfile and verify the HBA driver entries no longer appear.