Managed OpenStack
Latest
Frequently Asked Questions
Solution
How To
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How-To Get Consolidated Data for Cores and RAM Used Across All Tenants
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
Capture consolidated data for resource utilization for all tenants in a region.
Environment
- Platform9 Managed OpenStack - All Versions
Procedure
- The following script can be used to get the consolidated data for the cores and RAM used across all tenants in a region.
Note: You will need jq package installed on the system from which you will be running this script.
#!/bin/bashexport ram_allocated=0export cores_allocated=0export TOKEN=$(openstack token issue -c id -f value)for ram in $(curl -s -k -H 'content-type: application/json' -H "X-Auth-Token: $TOKEN" https://[management plane url]/nova/v2.1/[tenant-id]/os-quota-sets/pf9_all_tenants | jq ' .[] | values[] .detail .quota_set .ram .in_use') do ram_allocated=$((ram_allocated+ram)) donefor cores in $(curl -s -k -H 'content-type: application/json' -H "X-Auth-Token: $TOKEN" https://[management plane url]/nova/v2.1/[tenant-id]/os-quota-sets/pf9_all_tenants | jq ' .[] | values[] .detail .quota_set .cores .in_use') do cores_allocated=$((cores_allocated+cores)) done echo "total cores allocated=$cores_allocated" echo "total ram allocated=$ram_allocated"VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message