{"id":4099,"date":"2012-10-15T13:50:25","date_gmt":"2012-10-15T05:50:25","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=4099"},"modified":"2023-04-28T09:48:58","modified_gmt":"2023-04-28T09:48:58","slug":"how-to-check-realtime-ram-memory-usage-available-in-linux-vps","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-check-realtime-ram-memory-usage-available-in-linux-vps\/","title":{"rendered":"How to Check Realtime RAM Memory Usage Available in Linux VPS"},"content":{"rendered":"<p><img decoding=\"async\" data-src=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/12\/Redhat-Linux-150x150.jpg\" alt=\"rhel\" title=\"Redhat Linux\" width=\"150\" height=\"150\" class=\"alignleft size-thumbnail wp-image-1499 lazyload\" data-srcset=\"https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/12\/Redhat-Linux-150x150.jpg 150w, https:\/\/webhostinggeeks.com\/howto\/wp-content\/uploads\/2011\/12\/Redhat-Linux-100x100.jpg 100w\" data-sizes=\"(max-width: 150px) 100vw, 150px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 150px; --smush-placeholder-aspect-ratio: 150\/150;\" \/>On the previous post, i have teach you on <a href=\"https:\/\/webhostinggeeks.com\/howto\/how-to-check-memory-usage-on-linux-vps-server\/\">how to check the memory usage on linux virtual Private Server (VPS)<\/a> but only top command had provide real-time information and updates . This quick post will covers on how to check realtime RAM memory usage available in Linux VPS using watch command. Watch runs command repeatedly, displaying its output change over time or at regular intervals. Watch will run until interrupted. This command has been tested on Redhat Linux Enterprise 6 (RHEL 6) and may working on CentOS 6.x as well.<\/p>\n<p>The basic syntax of watch is :<\/p>\n<pre>\n# watch [option(s)] command\n<\/pre>\n<p>1. Check memory usage using &#8220;top&#8221; command. Watch command not required for top command as top will update the result periodically. :<\/p>\n<pre>\n[root@rhel6 ~]# top\n<\/pre>\n<p>2. Check memory usage using &#8220;\/proc\/meminfo&#8221; with watch command :<\/p>\n<pre>\n[root@rhel6 ~]# watch -n 1 cat \/proc\/meminfo\n<\/pre>\n<p>Output :<\/p>\n<pre>\nEvery 1.0s: cat \/proc\/meminfo                                               Mon Oct 15 13:48:17 2012\n\nMemTotal:        1031320 kB\nMemFree:          626372 kB\nBuffers:           58576 kB\nCached:           217004 kB\nSwapCached:            0 kB\nActive:           148516 kB\nInactive:         164708 kB\nActive(anon):      37816 kB\nInactive(anon):       84 kB\nActive(file):     110700 kB\nInactive(file):   164624 kB\nUnevictable:           0 kB\nMlocked:               0 kB\nHighTotal:        141256 kB\nHighFree:            280 kB\nLowTotal:         890064 kB\nLowFree:          626092 kB\nSwapTotal:       2064376 kB\nSwapFree:        2064376 kB\nDirty:                 4 kB\nWriteback:             0 kB\nAnonPages:         37652 kB\nMapped:            19096 kB\nShmem:               264 kB\nSlab:              81048 kB\nSReclaimable:      62096 kB\nSUnreclaim:        18952 kB\n..\n..\n..\n<\/pre>\n<p>3. Check memory usage using &#8220;free&#8221; with watch command :<\/p>\n<pre>\n[root@rhel6 ~]# watch -n 1 free\n<\/pre>\n<p>Output :<\/p>\n<pre>\nEvery 1.0s: free                                                            Mon Oct 15 13:47:26 2012\n\n             total       used       free     shared    buffers     cached\nMem:       1031320     404548     626772          0      58564     217004\n-\/+ buffers\/cache:     128980     902340\nSwap:      2064376          0    2064376\n<\/pre>\n<p>4. Check memory usage using &#8220;vmstat&#8221; with watch command :<\/p>\n<pre>\n[root@rhel6 ~]# watch -n 1 vmstat\n<\/pre>\n<p>Output :<\/p>\n<pre>\nEvery 1.0s: vmstat                                                          Mon Oct 15 13:46:44 2012\n\nprocs -----------memory---------- ---swap-- -----io---- --system-- -----cpu-----\n r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa st\n 0  0      0 626280  58552 217004   30    0     0    14   46   73  0  1 98  1  0\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>On the previous post, i have teach you on how to check the memory usage on linux virtual Private Server (VPS) but only top command had provide real-time information and&#8230;<\/p>\n","protected":false},"author":6,"featured_media":1499,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[1066],"tags":[1244,1253,1326,1536,1546,2067,1879,1903],"class_list":["post-4099","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-system-performance","tag-centos","tag-centos-6-2","tag-dedicated-server","tag-linux","tag-linux-utilities","tag-memory","tag-vds","tag-vps"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=4099"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/4099\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/1499"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=4099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=4099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=4099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}