Ubuntu # ceilometer sample-list -q 'resource_id=af804d88-41ad-4e68-8c5c-14477eac70b7' -m memory.usage
| db50965b-de08-11e6-991c-1c1b0d32b5f5 | af804d88-41ad-4e68-8c5c-14477eac70b7 | memory.usage | gauge | 1421.0 | MB | 2017-01-19T05:33:50.201000 |
| b7920493-de08-11e6-991c-1c1b0d32b5f5 | af804d88-41ad-4e68-8c5c-14477eac70b7 | memory.usage | gauge | 1421.0 | MB | 2017-01-19T05:32:50.231000 |
| 93cba4dd-de08-11e6-991c-1c1b0d32b5f5 | af804d88-41ad-4e68-8c5c-14477eac70b7 | memory.usage | gauge | 1421.0 | MB | 2017-01-19T05:31:50.213000 |
| 7094aa4b-de08-11e6-991c-1c1b0d32b5f5 | af804d88-41ad-4e68-8c5c-14477eac70b7 | memory.usage | gauge | 1421.0 | MB | 2017-01-19T05:30:51.131000 |
ÀνºÅϽº
# free -m
total used free shared buff/cache available
Mem: 2000 67 578 20 1354 1710
Swap: 0 0 0
memory.usage = used + buff/cache
1421.0 = 67 + 1354
CentOS / RHEL
# ceilometer sample-list -q 'resource_id=9e6ec5fa-dc1e-493c-b00a-415de4464593' -m memory.usage
| 3d01c93d-de09-11e6-80f3-1c1b0d32b1c2 | 9e6ec5fa-dc1e-493c-b00a-415de4464593 | memory.usage | gauge | 281.0 | MB | 2017-01-19T05:36:34.103000 |
| 19404371-de09-11e6-80f3-1c1b0d32b1c2 | 9e6ec5fa-dc1e-493c-b00a-415de4464593 | memory.usage | gauge | 279.0 | MB | 2017-01-19T05:35:34.114000 |
| f57bda4f-de08-11e6-80f3-1c1b0d32b1c2 | 9e6ec5fa-dc1e-493c-b00a-415de4464593 | memory.usage | gauge | 279.0 | MB | 2017-01-19T05:34:34.106000 |
ÀνºÅϽº
# free -m
total used free shared buffers cached
Mem: 1877 281 1595 0 109 99
-/+ buffers/cache: 73 1803
Swap: 0 0 0
memory.usage = used (buffers + cached)
CentOS used : buffer + cache Æ÷ÇԵǾîÀÖÀ½
Ubuntu used : buffer + cache º°µµ
¡Ø ÀνºÅϽº¿¡¼ »ç¿ëÇÏ°í ÀÖ´Â ¸Þ¸ð¸®¿Í ceilometer ¿¡¼ üũÇÏ´Â ¸Þ¸ð¸® »ç¿ë·®ÀÌ ´Ù¸£´Ù.
ÀÌÀ¯´Â Ubuntu ¿Í CentOS/RHEL °è¿¿¡¼ used °ª¿¡ Á¤ÀÇ°¡ ´Ù¸£±â¶§¹®¿¡ ³ªÅ¸³ª´Â Çö»óÀ¸·Î º¸ÀδÙ.
Áï, ¿ÀǽºÅÿ¡¼ memory.usage = buffer / cache ¸¦ Æ÷ÇÔÇÑ ¸Þ¸ð¸® »ç¿ë·®À» ÀǹÌÇÑ´Ù.
Ceilometer ¼öÄ¡¿Í ¿ÀÅ佺ÄÉÀϸµÀ» ±¸¼ºÇÏ°íÀÚ ÇÑ´Ù¸é.....¸Þ¸ð¸® »ç¿ëÀ²¿¡ ´ëÇØ ÀÎÁöÇÏ°í ½Ã½ºÅÛ¿¡¼ ÁÖ±âÀûÀ¸·Î ij½¬¸¦ ÃʱâÈÇÏ´Â ¹æ¹ýµµ °í·ÁÇϽñæ...
# echo 3 > /proc/sys/vm/drop_caches
cron ¿¡ /etc/cron.hourly ¿¡ µî·Ï
# pwd
/etc/cron.hourly
# cat drop_memory_cache
#!/bin/sh
echo 3 > /proc/sys/vm/drop_caches
÷ºÎ)
¸Þ¸ð¸® »ç¿ëÀ² °è»ê (%) = memory_util
buffer / cache blue print