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.

No comments: