Hi Ng'ang'a Kioi, You are right in that these are periodically collected and stored by StatsCollector class. What hypervisor are you working with?
Regards, Anurag On 7/27/19, 4:24 PM, "Ng'ang'a Kioi" <kioie...@gmail.com> wrote: Hi everyone, I'm trying to look at how cloudstack gathers VM statistics and particularly memory stats. Looking at the list virtualmachines api, the following stats are returned for a sample VM "memory": 1024, "memoryintfreekbs": 1251804, "memorykbs": 1048576, "memorytargetkbs": 1048576, Based on the api docs memory- the memory allocated for the virtual machine memoryintfreekbs- the internal memory thats free in vm memorykbs- the memory used by the vm memorytargetkbs- the target memory in vm As indicated, memorykbs and memorytargetkbs cannot have the same values. Looking at the codebase, it seems that these values are recieved from the StatsCollector class. Is this correct? If so, could the error be originating from the below? *statsInMemory.setMemoryKBs(statsForCurrentIteration.getMemoryKBs());* *statsInMemory.setTargetMemoryKBs(statsForCurrentIteration.getTargetMemoryKBs());* anurag.awas...@shapeblue.com www.shapeblue.com Amadeus House, Floral Street, London WC2E 9DPUK @shapeblue