Pavn is right. The "StatsCollector.VmStatsCollector" class is executed as a periodic task and collects and updates the database for VmStats. A VM Launched by virt-manager is not considered as part of this background task.
Regards, Anurag ________________________________ From: Pavan Kumar Aravapalli <pavankuma...@accelerite.com> Sent: Monday, July 29, 2019 3:26 PM To: dev@cloudstack.apache.org <dev@cloudstack.apache.org> Subject: Re: Cloudstack VM memory reporting Hi Ng'ang'a Kioi, Stats are collected at very first time, When a host [KVM] is on-boarded to Cloud stack. There after for every vm resource deployment done on the on-boarded KVM host , the stats will get updated in cloud stack DB by Management Server after deducing the utilised resource amount from the host stats. if any VM is launched from out of the cloud stack scope, i.e with the help of virt-manager, this cannot be considered by Management Server stats service. @Dev, This is based on my understanding , correct me if i am wrong. Regards, Pavan. ________________________________ From: Ng'ang'a Kioi <kioie...@gmail.com> Sent: 27 July 2019 16:24:19 To: dev@cloudstack.apache.org <dev@cloudstack.apache.org> Subject: Cloudstack VM memory reporting 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());* DISCLAIMER ========== This e-mail may contain privileged and confidential information which is the property of Accelerite, a Persistent Systems business. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Accelerite, a Persistent Systems business does not accept any liability for virus infected mails. anurag.awas...@shapeblue.comĀ www.shapeblue.com Amadeus House, Floral Street, London WC2E 9DPUK @shapeblue