Org Quota Usage appears incorrect for a space in Apps Manager
search cancel

Org Quota Usage appears incorrect for a space in Apps Manager

book

Article ID: 298457

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

This article provides awareness of what is using org memory and disk resources in VMware Tanzu Application Service for VMs (TAS). This article also provides methods to locate the spaces and applications to which these processes and tasks belong.

The Apps Manager Org Quota Usage for a space appears to be incorrect.

For example, let's assume that you have an org with a memory quota of 380 GB and 15 applications running at 1 GB of memory each in a space. You might expect to see 15 GB / 380 GB (4%) on the org quota page for the space in question. However, you may see something like 205 GB / 380 GB (54%). This can happen when applications have multiple processes or tasks associated with them. It's difficult to see the resource usage from the Apps Manager UI org and space summary screens.

Environment

EAR/TPCF/TAS

Resolution

To resolve this issue, use one of the following options:
 

  • Manually look through the applications within each space and find the ones that have tasks associated with them. The problem with this approach is that the UI doesn't show the memory and disk usage for tasks. You would need to run cf tasks <app-name> against each application and note the tasks associated. 
  • Use the following command to get a list of running tasks within the org/space, and the memory used by each one:
​​cf curl "/v3/tasks?states=RUNNING&organization_guids=<org_guid>&space_guids=<space_guid>" 

You can get the guid's with cf org <org> --guid and cf space <space> --guid.


E.g:

cf curl "/v3/tasks?states=RUNNING&organization_guids=cc4d8f3d-####-####-####-a968354dbc60&space_guids=92667838-####-####-####-f165ad1cf7ae"


 You will receive an output similar to the following:

cf curl "/v3/tasks?states=RUNNING&organization_guids=cc4d8f3d-####-####-####-a968354dbc60&space_guids=92667838-####-####-####-f165ad1cf7ae"
{
   "pagination": {
      "total_results": 1,
      "total_pages": 1,
      "first": {
         "href": "https://api.run-35.slot-##.###.#####.com/v3/tasks?organization_guids=cc4d8f3d-e3d7-####-9e3c-a968354dbc60&page=1&per_page=50&space_guids=92667838-####-####-####-f165ad1cf7ae&states=RUNNING"
      },
      "last": {
         "href": "https://api.run-35.slot-##.###.#####.com/v3/tasks?organization_guids=cc4d8f3d-e3d7-####-9e3c-a968354dbc60&page=1&per_page=50&space_guids=92667838-####-####-####-f165ad1cf7ae&states=RUNNING"
      },
      "next": null,
      "previous": null
   },
   "resources": [
      {
         "guid": "ab445be7-fba3-####-####-ae9d5a936247",
         "sequence_id": 5,
         "name": "my-task2",
         "state": "RUNNING",
         "memory_in_mb": 1024,
         "disk_in_mb": 1024,
         "result": {
            "failure_reason": null
         },
         "created_at": "2021-02-02T11:19:20Z",
         "updated_at": "2021-02-02T11:19:20Z",
         "droplet_guid": "eabf2116-####-####-98c8-bdb76bb12b11",
         "relationships": {
            "app": {
               "data": {
                  "guid": "984d8bac-####-####-931d-e33f94f560fb"
               }
            }
         },
         "metadata": {
            "labels": {},
            "annotations": {}
         },
         "links": {
            "self": {
               "href": "https://api.run-35.slot-##.###.####.com/v3/tasks/ab445be7-fba3-####-a877-ae9d5a936247"
            },
            "app": {
               "href": "https://api.run-35.slot-##.###.####.com/v3/apps/984d8bac-####-4713-931d-e33f94f560fb"
            },
            "cancel": {
               "href": "https://api.run-35.slot-##.###.####.com/v3/tasks/ab445be7-fba3-####-a877-ae9d5a936247/actions/cancel",
               "method": "POST"
            },
            "droplet": {
               "href": "https://api.run-35.slot-##.###.####.com/v3/droplets/eabf2116-4aa0-####-98c8-bdb76bb12b11"
            }
         }
      }
   ]
}