|
| 1 | +.. _mcli-om-server-usage-capture-command: |
| 2 | + |
| 3 | +======================================== |
| 4 | +mongocli ops-manager serverUsage capture |
| 5 | +======================================== |
| 6 | + |
| 7 | +.. default-domain:: mongodb |
| 8 | + |
| 9 | +.. contents:: On this page |
| 10 | + :local: |
| 11 | + :backlinks: none |
| 12 | + :depth: 1 |
| 13 | + :class: singlecol |
| 14 | + |
| 15 | +The ``serverUsage capture`` command generates a snapshot of the usage |
| 16 | +of all deployments in the projects and organizations associated with |
| 17 | +your profile. This snapshot includes the current information for each |
| 18 | +|mongod| and |mongos| process: |
| 19 | + |
| 20 | +- memory statistics |
| 21 | +- date |
| 22 | +- organization |
| 23 | +- project |
| 24 | +- |ipaddr| |
| 25 | +- |iana| port |
| 26 | + |
| 27 | +You can also retrieve this information using the |mms| :opsmgr:`UI |
| 28 | +</admin/general/mongodb-usage-page/>` or :opsmgr:`API |
| 29 | +</reference/api/usage/generate-daily-usage-snapshot/>`. |
| 30 | + |
| 31 | +.. _om-server-usage-capture-syntax: |
| 32 | + |
| 33 | +Syntax |
| 34 | +------ |
| 35 | + |
| 36 | +.. code-block:: text |
| 37 | + |
| 38 | + mongocli ops-manager|om serverUsage capture |
| 39 | + |
| 40 | +.. include:: /includes/fact-command-line-help.rst |
| 41 | + |
| 42 | +.. _om-server-usage-capture-options: |
| 43 | + |
| 44 | +Options |
| 45 | +------- |
| 46 | + |
| 47 | +.. list-table:: |
| 48 | + :header-rows: 1 |
| 49 | + :widths: 20 10 60 10 |
| 50 | + |
| 51 | + * - Option |
| 52 | + - Type |
| 53 | + - Description |
| 54 | + - Required? |
| 55 | + |
| 56 | + * - ``--profile``, ``-P`` |
| 57 | + - string |
| 58 | + - Name of the profile where your credentials are saved. |
| 59 | + |
| 60 | + If omitted, uses the {+default-profile+}. To learn more about |
| 61 | + creating a profile, see :ref:`mcli-configure`. |
| 62 | + |
| 63 | + - no |
| 64 | + |
| 65 | +.. _om-server-usage-download-output: |
| 66 | + |
| 67 | +Output |
| 68 | +------ |
| 69 | + |
| 70 | +If the command succeeds, it returns the message ``Snapshot captured.`` |
| 71 | +If the command returns errors, see :ref:`Troubleshooting |
| 72 | +<troubleshooting>` for recommended solutions. |
| 73 | + |
| 74 | +For more information, see the :opsmgr:`Ops Manager API </reference/api/usage/generate-daily-usage-snapshot/>`. |
| 75 | + |
| 76 | +Example |
| 77 | +------- |
| 78 | + |
| 79 | +The following command generates a snapshot. |
| 80 | + |
| 81 | +.. code-block:: sh |
| 82 | + |
| 83 | + mongocli om serverUsage capture |
| 84 | + |
| 85 | +The previous command prints the following to the terminal. |
| 86 | + |
| 87 | +.. code-block:: sh |
| 88 | + :copyable: false |
| 89 | + |
| 90 | + Snapshot captured. |
0 commit comments