How-To Get Consolidated Data for Cores and RAM Used Across All Tenants
Problem
Environment
Procedure
#!/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"PreviousHow-To Get Consolidate Size Information of all The Cinder Volumes ProvisionedNextHow-To Check Consul Cluster Status
Last updated
