Tuesday, December 20, 2016

ESXi sched-stats command

Frank Denneman has shared on twitter very interesting ESXi command to show CPU scheduling statistics and information.

@FrankDenneman tweet

There are not so much information about this command so one have to rely on command help ...

[root@esx01:~] sched-stats -h
Usage:
-c   : use vsi-cache instead of live kernel
-t   : specify the output type from the following list
          :    vcpu-state-times
          :    vcpu-run-times
          :    vcpu-state-counts
          :    vcpu-run-states
          :    vcpu-alloc
          :    vcpu-migration-stats
          :    vcpu-load
          :    vcpu-relations
          :    vcpu-comminfo
          :    ncpus
          :    cpu
          :    pcpu-stats
          :    pcpu-load
          :    overhead-histo
          :    sys-service-stats
          :    run-state-histo
          :    wait-state-histo
          :    coSched-stats
          :    groups
          :    worldlet-state-times
          :    worldlet-state-counts
          :    worldlet-mig-state
          :    worldlet-load
          :    worldlet-relations
          :    worldlet-comminfo
          :    power-pstates
          :    power-cstates
          :    numa-clients
          :    numa-migration
          :    numa-cnode
          :    numa-pnode
          :    numa-global
-f          : ignore version check
-w          : only show stats of the specified world
-p          : only show stats of the specified pcpu
-m          : only show stats of the specified module
-r          : reset scheduler statistics
-s : 1 to enable advanced cpu sched stats gathering, 0 to disable.
-l , : comma separated list of ids to restrict the report to;
                (not supported by all reports)
-k          : check the correctness of scheduling stats
-v          : verbose
-h          : print friendly help message

Note:
Sched-stats reads the stats data from vmkernel for each vcpu one
by one via the VSI interface. Since the scheduling stats may
continue to change during the VSI calls, what's reported by
sched-stats is not a consistent snapshot of the kernel stats.
But the inconsistency is expected to be small.

Sunday, December 11, 2016

The OVF package is invalid or could not be read.

I have just tried to deploy NSX Manager 6.2.4 virtual appliance downloaded from VMware site through WebClient. Following error message popup ...
"The OVF package is invalid or could not be read."
It sounds like corrupted file but it is very rare as it was successfully downloaded  directly from my.vmware.com.

I have double checked download and quickly realize what is wrong. OVF file should be XML file with references to vmdk files (disk images) but this OVF file was just a single large file. The single large file is typically OVA which is an archive of OVF.  OVA is nothing else then zipped TAR (aka tgz). I tried to rename file to .tgz, extract the file and voila ... there was real OVF and VMDK file. See. screenshot below

OVF directory

Deployment of real OVF (ovf descriptor + vmdk files) was successful so it is workaround #1.

Workaround #2  is just renaming file extension of downloaded OVF file (VMware-NSX-Manager-6.2.4-4292526.ovf) to OVA (VMware-NSX-Manager-6.2.4-4292526.ova) and deploy OVF/OVA again.

Hope this helps others struggling with virtual appliance deployment when OVF and OVA file extensions will be interchanged.

Note: I have double checked my.vmware.com and NSX Manager 6.2.4 is downloadable as file with .OVA extension so it was most probably already identified and repaired by VMware or something else weird happened during my download several days ago.