esxcli debug object list command does not display all objects
search cancel

esxcli debug object list command does not display all objects

book

Article ID: 418359

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

esxcli vsan debug object list command only displays up to 100 objects, even the actual number of objects is greater than that.

[root@<ESXi hostname>:/] esxcli vsan debug object health summary get
Health Status                                              Number Of Objects
---------------------------------------------------------  -----------------
remoteAccessible                                                           0
inaccessible                                                               0
reduced-availability-with-no-rebuild                                       0
reduced-availability-with-no-rebuild-delay-timer                           0
reducedavailabilitywithpolicypending                                       0
reducedavailabilitywithpolicypendingfailed                                 0
reduced-availability-with-active-rebuild                                   0
reducedavailabilitywithpausedrebuild                                       0
data-move                                                                  0
nonavailability-related-reconfig                                           0
nonavailabilityrelatedincompliancewithpolicypending                        0
nonavailabilityrelatedincompliancewithpolicypendingfailed                  0
nonavailability-related-incompliance                                       0
nonavailabilityrelatedincompliancewithpausedrebuild                        0
healthy                                                                  894
[root@<ESXi hostname>:/] 
[root@<ESXi hostname>:/] esxcli vsan debug object list | grep 'Object UUID' | wc -l
100
[root@<ESXi hostname>:/]

Environment

VMware vSphere ESXi

Cause

This is expected behavior.
As stated in the online help, the number of objects displayed is limited.

[root@<ESXi hostname>:/] esxcli vsan debug object list --help
Usage: esxcli vsan debug object list [cmd options]

Description:
  list                  Print detailed information about vSAN objects in the cluster. This command would only show 100 objects at most by default.

 

Note: This value may vary depending on the ESXi version. Please check the maximum value in the online help.

Resolution

Add --max-number=#### option.

[root@<ESXi hostname>:/] esxcli vsan debug object list --max-number=1000 | grep 'Object UUID' | wc -l
894
[root@<ESXi hostname>:/]

 

The --all option is also available, but it may not show all objects in a large environment. In that case, try using the --max-number option.

From online help:

  --all                 If given, query all the objects in the cluster. Please make sure the host has enough resources to run.

  --max-number=<long>   Specify the maximum number of objects to query. Note: querying large number of objects can be very resource consuming.