Docs Home → MongoDB Command Line Interface
mongocli ops-manager serverUsage project hosts list![](/docs/mongocli/v1.8/assets/link.svg)
This version of the documentation is archived and no longer supported. View the current documentation to learn how to upgrade your version of MongoCLI.
The serverUsage projects hosts list
command retrieves all host
assignments for one project. You can also retrieve this information
using the Ops Manager
UI or
API.
Syntax![](/docs/mongocli/v1.8/assets/link.svg)
mongocli ops-manager|om serverUsage project|s host|s list|ls [--projectId <project-ID>] [--startDate <start-date>] [--endDate <end-date>]
Note
Use -h
or --help
to view the command-line help for
this command.
Options![](/docs/mongocli/v1.8/assets/link.svg)
Option | Type | Description | Required? |
---|---|---|---|
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--startDate | string | ISO 8601 formatted date when the list of host assignments
starts. | yes |
--endDate | string | ISO 8601 formatted date when the list of host assignments ends. | yes |
Output![](/docs/mongocli/v1.8/assets/link.svg)
If the command succeeds, it returns the following output in the default format. If the command returns errors, see Troubleshooting for recommended solutions.
HOSTNAME SERVER TYPE MEM SIZE MB CHARGEABLE <fqdn> <host-server-type> <memory-size> <true-or-false>
The default output is a subset of the fields returned by this command. For the complete list of JSON fields returned by the command, see the Public API reference for your MongoDB service: