ceilometer memory usage ratio dommemstat memory
Can I get the memory usage ratio from ceilometer. I can get cpu_util use
[root@controller ~(keystone_admin)]# ceilometer sample-list -q resource=48afa90d-20e9-4096-8c5d-6543e49a03f7 -m cpu_util
+--------------------------------------+----------+-------+-----------------+------+----------------------------+ | Resource ID | Name | Type | Volume | Unit | Timestamp | +--------------------------------------+----------+-------+-----------------+------+----------------------------+ | 48afa90d-20e9-4096-8c5d-6543e49a03f7 | cpu_util | gauge | 0.128334366425 | % | 2016-07-27T06:46:53.043000 | | 48afa90d-20e9-4096-8c5d-6543e49a03f7 | cpu_util | gauge | 0.124997847537 | % | 2016-07-27T06:36:53.048000 |
I can also get memory usage:
[root@controller ~(keystone_admin)]# ceilometer sample-list -q resource=48afa90d-20e9-4096-8c5d-6543e49a03f7 -m memory.usage
+--------------------------------------+--------------+-------+--------+------+----------------------------+ | Resource ID | Name | Type | Volume | Unit | Timestamp | +--------------------------------------+--------------+-------+--------+------+----------------------------+ | 48afa90d-20e9-4096-8c5d-6543e49a03f7 | memory.usage | gauge | 206.0 | MB | 2016-07-27T06:46:53.072000 | | 48afa90d-20e9-4096-8c5d-6543e49a03f7 | memory.usage | gauge | 206.0 | MB | 2016-07-27T06:36:53.076000 |
If I want get the memory ratio like cpu util, I need get the total memory. Is this possible? I think the memory usage ratio would caculated as: memory.usage/total.
But when I loged in the vm created with 2G and use free , below is the dispaly:
[root@c7-az-nova ~]# free
total used free shared buff/cache available
Mem: 1884124 67112 1673108 16656 143904 1670240
Swap: 0 0 0
Does anyone know how the number total 1839 is caculate?
when use virsh dommemstat below is the display:
virsh # dommemstat 36
actual 2097152
swap_in 0
swap_out 0
major_fault 458
minor_fault 764818
unused 1673108
available 1884124
rss 2260280