usagereport-plugin
usagereport-plugin copied to clipboard
Sum of Space memory usages is not matching with Org's memory usage
The Space total = 226560 which is not same as org's usage which is 350464
This is the output: Org ABC is consuming 350464 MB of 358400 MB. Space a1 is consuming 49536 MB memory (13%) of org quota. 50 apps: 41 running 9 stopped 52 instances: 43 running, 9 stopped Space a2 is consuming 0 MB memory (0%) of org quota. 2 apps: 0 running 2 stopped 2 instances: 0 running, 2 stopped Space a3 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a4 is consuming 78208 MB memory (21%) of org quota. 50 apps: 50 running 0 stopped 60 instances: 60 running, 0 stopped Space a5 is consuming 93568 MB memory (26%) of org quota. 50 apps: 50 running 0 stopped 66 instances: 66 running, 0 stopped Space a6 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a7 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a8 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a9 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a10 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a11 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a12 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped 0 instances: 0 running, 0 stopped Space a13 is consuming 5248 MB memory (1%) of org quota. 5 apps: 4 running 1 stopped 6 instances: 6 running, 0 stopped Space a14 is consuming 0 MB memory (0%) of org quota. 0 apps: 0 running 0 stopped
Does Org usage count come directly from PCF rather than being calculated from the spaces beneath the org?
@krujos Appreciate your response.
I think the problem is that this script is not paginating apps, so spaces with more than 50 apps will have inaccurate statistics. I learned this by trying to do something similar with the API in a dashboard and finding a similar mismatch until I started accounting for the pagination of apps in my CF API responses.
You can see this in particular by the list above because no space shows more than 50 apps running.