{"id":3090,"date":"2014-02-07T01:25:50","date_gmt":"2014-02-07T06:25:50","guid":{"rendered":"https:\/\/www.inmotionhosting.com\/support\/2014\/02\/07\/linux-check-memory-usage\/"},"modified":"2025-02-05T23:10:52","modified_gmt":"2025-02-06T04:10:52","slug":"check-memory-usage","status":"publish","type":"post","link":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/","title":{"rendered":"How to Check the Memory Usage on Linux"},"content":{"rendered":"<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured-1024x538.png\" alt=\"featured image with text check memory usage diagnose memory issues in Linux\" class=\"wp-image-129254\" srcset=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured-1024x538.png 1024w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured-300x158.png 300w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured-768x403.png 768w, https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png 1200w\" sizes=\"auto, (min-width: 1360px) 876px, (min-width: 960px) calc(61.58vw + 51px), calc(100vw - 80px)\" \/><\/figure>\n\n\n\n<p>Understanding Linux memory usage and how to check for used and free memory or RAM in Linux can be difficult. But once you learn about the <a href=\"#linux-page-cache\">Linux page cache<\/a> and how to read the status of it, it\u2019s really quite simple.<\/p>\n\n\n\n<p>Linux very efficiently caches frequently used files from the hard drive, to very fast to access RAM on the server. Data is stored electronically in RAM, so its speed is not limited by physical magnetic heads or spindle motors.<\/p>\n\n\n\n<p>In this guide I\u2019ll go over <strong>Linux free memory<\/strong>, and how to properly read <strong>Linux memory info<\/strong>.<a name=\"free-m\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"free-m\">Linux free -m<\/h2>\n\n\n\n<p>The most common way you\u2019ll see on the web to check for free memory in Linux is by using the <strong>free<\/strong> command.<\/p>\n\n\n\n<p>Using the <strong style=\"color: red;\">free -m<\/strong> command to check your Linux memory usage, displays the values as <strong>MB<\/strong> instead of <strong>KB<\/strong>.<\/p>\n\n\n\n<p>Most people will run this command and panic thinking they only have <span style=\"color: #0aff00; background-color: #3a3a3a; border: 2px solid #F00; padding: 1px 5px 1px 5px;\">1 MB<\/span> of free memory on the server:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">root@server [~]# <strong style=\"color: red;\">free -m<\/strong>\ntotal    used    free    shared    buffers    cached Mem: \n<span style=\"color: #09f;\">1024<\/span>    <span style=\"border: 1px solid #fff500; padding: 0px 2px; color: #f09917;\">1022<\/span>    <span style=\"color: #0aff00; border: 1px solid red; padding: 0px 2px 0px 2px;\">1<\/span>        0        0        <span style=\"color: #fff500;\">822<\/span> \n-\/+ buffers\/cache: <span style=\"color: #f00; border: 1px solid #1BFF11; padding: 0px 2px 0px 2px;\">200<\/span>    <span style=\"color: #1bff11; border: 1px solid; padding: 0px 2px 0px 2px;\">823<\/span> \nSwap: 0    0    0<\/pre>\n\n\n\n<p>The <strong>free<\/strong> column beside <strong>-\/+ buffers\/cache<\/strong> with <span style=\"color: #0aff00; background-color: #3a3a3a; border: 2px solid #0AFF00; padding: 2px 5px 2px 5px;\">823 MB<\/span> is the actual free memory available to Linux.<\/p>\n\n\n\n<p><span style=\"color: #09f; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">1024 MB<\/span> is the total system memory available, which would be physical RAM.<\/p>\n\n\n\n<p><span style=\"color: #0aff00; background-color: #3a3a3a; border: 2px solid #FF0000; padding: 2px 5px 2px 5px;\">1 MB<\/span> and <span style=\"color: #0aff00; background-color: #3a3a3a; border: 2px solid #0AFF00; padding: 2px 5px 2px 5px;\">823 MB<\/span> both show <strong>free<\/strong> because an application has access to both for memory storage.<\/p>\n\n\n\n<p><span style=\"color: #0aff00; background-color: #3a3a3a; border: 2px solid #F00; padding: 2px 5px 2px 5px;\">1 MB<\/span> <strong>free<\/strong> plus the <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">822 MB<\/span> <strong>cached<\/strong> gives the <span style=\"color: #0aff00; background-color: #3a3a3a; border: 2px solid #0AFF00; padding: 2px 5px 2px 5px;\">823 MB<\/span> of memory actually <strong>free<\/strong> to use if needed.<a name=\"linux-page-cache\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"linux-page-cache\">Linux page cache<\/h2>\n\n\n\n<p>Linux uses something called a page cache in order to cache frequently hit files from the hard drive into memory.<\/p>\n\n\n\n<p>There is an awesome helpful tool called <a href=\"https:\/\/hoytech.com\/vmtouch\/\" target=\"_blank\" rel=\"noopener\">vmtouch<\/a> which allows you to directly interact with the Linux page cache. Below I\u2019m using this to check if any parts of a <strong>100 MB<\/strong> log file called <strong>access_log<\/strong> are in the page cache already:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">root@server [~]# <strong style=\"color: red;\">vmtouch -v \/home\/access_log<\/strong> \n\/home\/access_log [      ] <span style=\"color: #00b1ff;\">0\/25642<\/span>\nFiles: 1      \nDirectories: 0   \nResident Pages: <span style=\"color: #00b1ff;\">0\/25642<\/span>  <span style=\"color: #fff500;\">0\/100M<\/span>  <span style=\"color: #0aff00;\">0%<\/span>          \nElapsed: 0.000568 seconds<\/pre>\n\n\n\n<p>You can see that <span style=\"color: #00b1ff; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">0\/25642<\/span> of all <strong>resident pages<\/strong> that make up this file are in the page cache.<\/p>\n\n\n\n<p>This is also represented as <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">0\/100 MB<\/span> worth of that file\u2019s data, or <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">0%<\/span>.<\/p>\n\n\n\n<p>Here I\u2019m using the <strong>time<\/strong> command to show how long a <strong>grep<\/strong> search takes initially:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">root@server [~]# <strong style=\"color: red;\">time grep wp-login.php access_log -c<\/strong> 702754  \nreal    <span style=\"color: #0aff00;\">0m30.056s<\/span> \nuser    0m0.192s \nsys     0m0.082s<\/pre>\n\n\n\n<p>It took <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">30.056 seconds<\/span> to read that file from the hard drive, let\u2019s see if any of it made it to the page cache:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">root@server [~]# <strong style=\"color: red;\">vmtouch -v \/home\/access_log<\/strong> \n\/home\/access_log [OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO] <span style=\"color: #00b1ff;\">25642\/25642<\/span>             \nFiles: 1      \nDirectories: 0   \nResident Pages: <span style=\"color: #00b1ff;\">25642\/25642<\/span>  <span style=\"color: #fff500;\">100M\/100M<\/span>  <span style=\"color: #0aff00;\">100%<\/span>          \nElapsed: 0.003133 seconds<\/pre>\n\n\n\n<p>All <span style=\"color: #00b1ff; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">25642\/25642<\/span> <strong>resident pages<\/strong> are in the page cache now, and all <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">100 MB<\/span> worth of data, or <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">100%<\/span>.<\/p>\n\n\n\n<p>We know the whole <strong>access_log<\/strong> file is in memory, let\u2019s see what happens when we try to search in the file again:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">root@server [~]# <strong style=\"color: red;\">time grep wp-admin access_log -c<\/strong> 103161  \nreal    <span style=\"color: #0aff00;\">0m0.168s<\/span> \nuser    0m0.137s \nsys     0m0.030s<\/pre>\n\n\n\n<p>It took <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">30.056 seconds<\/span> reading the file from disk, down to just <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">0.168 seconds<\/span> reading it from RAM.<\/p>\n\n\n\n<p>That\u2019s over a <strong>17,000%<\/strong> speed increase! This is why I say that Linux uses memory very efficiently.<\/p>\n\n\n\n<p>The same thing applies to your applications and scripts that run on the server. Linux will try to move them to the page cache for quicker access. If another application needs more memory, it can simply take it back.<\/p>\n\n\n\n<p>This throws a lot of people off because they see Linux is <strong>using<\/strong> a lot of memory, while in reality it\u2019s using it to speed things along while the full memory available to the server isn\u2019t actively needed for running applications.<a name=\"sar-r\"><\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"sar-r\">Linux sar -r<\/h2>\n\n\n\n<p>If you wanted to take a look at your Linux memory usage historically then the <a href=\"\/support\/server\/linux\/using-the-linux-sar-command\/\">Linux sar command<\/a> is a great tool which uses <strong>System Activity Report<\/strong> logs to pull historical usage data from your server:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">root@server [~]# <strong style=\"color: red;\">sar -r<\/strong> \n10:06:01 PM    <span style=\"color: #00b1ff;\">kbmemfree<\/span> <span style=\"color: red;\">kbmemused<\/span>  <span style=\"color: #0aff00;\">%memused<\/span>     kbbuffers  <span style=\"color: #fff500;\">kbcached<\/span>  kbcommit   %commit     \n10:06:01 PM    <span style=\"color: #00b1ff;\">688956<\/span>    <span style=\"color: red;\">359620<\/span>     <span style=\"color: #0aff00;\">34.30<\/span>        0          <span style=\"color: #fff500;\">142912<\/span>    0           0.00 \n10:16:01 PM    <span style=\"color: #00b1ff;\">688792<\/span>    <span style=\"color: red;\">359784<\/span>     <span style=\"color: #0aff00;\">34.31<\/span>        0          <span style=\"color: #fff500;\">143000<\/span>    0           0.00 \n10:26:01 PM    <span style=\"color: #00b1ff;\">678744<\/span>    <span style=\"color: red;\">369832<\/span>     <span style=\"color: #0aff00;\">35.27<\/span>        0          <span style=\"color: #fff500;\">152968<\/span>    0           0.00 \n10:36:01 PM    <span style=\"color: #00b1ff;\">678052<\/span>    <span style=\"color: red;\">370524<\/span>     <span style=\"color: #0aff00;\">35.34<\/span>        0          <span style=\"color: #fff500;\">153516<\/span>    0           0.00 \n10:46:01 PM    <span style=\"color: #00b1ff;\">677532<\/span>    <span style=\"color: red;\">371044<\/span>     <span style=\"color: #0aff00;\">35.39<\/span>        0          <span style=\"color: #fff500;\">154024<\/span>    0           0.00 \n10:56:01 PM    <span style=\"color: #00b1ff;\">676688<\/span>    <span style=\"color: red;\">371888<\/span>     <span style=\"color: #0aff00;\">35.47<\/span>        0          <span style=\"color: #fff500;\">154036<\/span>    0           0.00 \n11:06:01 PM    <span style=\"color: #00b1ff;\">676160<\/span>    <span style=\"color: red;\">372416<\/span>     <span style=\"color: #0aff00;\">35.52<\/span>        0          <span style=\"color: #fff500;\">154216<\/span>    0           0.00 \n11:16:01 PM    <span style=\"color: #00b1ff;\">3644<\/span>      <span style=\"color: red;\">1044932<\/span>    <span style=\"color: #0aff00;\">99.65<\/span>        0          <span style=\"color: #fff500;\">60588<\/span>     0           0.00 \nAverage:       <span style=\"color: #00b1ff;\">682327<\/span>    <span style=\"color: red;\">366249<\/span>     <span style=\"color: #0aff00;\">34.93<\/span>        0          <span style=\"color: #fff500;\">113811<\/span>    0           0.00 <\/pre>\n\n\n\n<p>The <span style=\"color: #00b1ff; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">kbmemfree<\/span> column shows how much memory was <strong>free<\/strong>.<\/p>\n\n\n\n<p>The <span style=\"color: red; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">kbmemused<\/span> column shows how much memory was <strong>used<\/strong>.<\/p>\n\n\n\n<p>The <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">%memused<\/span> column shows how much memory was <strong>used<\/strong> as a percentage of total memory available.<\/p>\n\n\n\n<p>The <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">kbcached<\/span> column shows how much memory was <strong>cached<\/strong>.<\/p>\n\n\n\n<p>The command below goes through your <strong>sar<\/strong> logs and shows anytime that your server\u2019s memory is spiking.<\/p>\n\n\n\n<p>When <span style=\"color: red; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">kbmemused<\/span> is over <span style=\"color: red; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">917504 KB<\/span> or <span style=\"color: red; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">896 MB<\/span>, and <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">kbcached<\/span> is under <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">131072 KB<\/span> or <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">128MB<\/span> this command will output the memory usage stats from <strong>sar<\/strong>.<\/p>\n\n\n\n<p>Doing it this way we can ensure that we\u2019re only looking at times when our actual <strong>free memory<\/strong> on the server has dipped below <strong>128MB<\/strong>. That way we don\u2019t start panicking when the server says <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">99%<\/span> of memory is being used, but in reality that memory is being used by the Linux page cache.<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">for log in `ls -1 \/var\/log\/sa\/sa[0-9]* | sed 's#@##'`; do echo $log; sar -r -f $log | egrep -v \"Linux|kbmemfree\" | awk '{ if ($4&gt;=<strong style=\"color: red;\">917504<\/strong> &amp;&amp; $7&lt;=<strong style=\"color: #fff500;\">131072<\/strong>) print $0}'; echo \"\"; done | sed 's#\\(\/var\/log.*\\)#\\1\\n--------------kbmemfree kbmemused %memused kbbuffers kbcached kbcommit %commit#' | less<\/pre>\n\n\n\n<p>Here is the output from the above command:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">\/var\/log\/sa\/sa06 \n--------------  <span style=\"color: #00b1ff;\">kbmemfree<\/span> <span style=\"color: red;\">kbmemused<\/span>   <span style=\"color: #0aff00;\">%memused<\/span>   kbbuffers  <span style=\"color: #fff500;\">kbcached<\/span>  kbcommit   %commit\n12:16:01 AM     <span style=\"color: #00b1ff;\">25208<\/span>     <span style=\"color: red;\">1023368<\/span>     <span style=\"color: #0aff00;\">97.60<\/span>      0          <span style=\"color: #fff500;\">37536<\/span>     0          0.00 \n12:26:01 AM     <span style=\"color: #00b1ff;\">23708<\/span>     <span style=\"color: red;\">1024868<\/span>     <span style=\"color: #0aff00;\">97.74<\/span>      0          <span style=\"color: #fff500;\">38792<\/span>     0          0.00 \n12:36:01 AM     <span style=\"color: #00b1ff;\">13532<\/span>     <span style=\"color: red;\">1035044<\/span>     <span style=\"color: #0aff00;\">98.71<\/span>      0          <span style=\"color: #fff500;\">41756<\/span>     0          0.00<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"proc-meminfo\">\/proc\/meminfo<\/h2>\n\n\n\n<p>With Linux there is a <strong>\/proc<\/strong> pseudo-file system that doesn\u2019t contain any real phyical files, but does allow you to take a peak at how the Linux kernel is controlling the system via various config files.<\/p>\n\n\n\n<p>One of these is called <strong>\/proc\/meminfo<\/strong> and this is where commands like <strong>free<\/strong> get their data from. You can directly look at these values yourself by simply accessing this pseudo-file:<\/p>\n\n\n\n<pre style=\"margin-bottom: 20px; color: #fff; background: #3A3A3A; padding: 10px 30px 10px 10px;\">root@server [~]# <strong style=\"color: red;\">egrep \"MemTotal|MemFree|Cached\" \/proc\/meminfo<\/strong> \nMemTotal:        <span style=\"color: #09f;\">1048576 kB<\/span> \nMemFree:          <span style=\"color: #0aff00;\">842752 kB<\/span> \nCached:           <span style=\"color: #fff500;\">841728 kB<\/span><\/pre>\n\n\n\n<p>The VPS I\u2019m looking at has <span style=\"color: #09f; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">1048576 kB<\/span> of total system memory, which is <span style=\"color: #09f; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">1024 MB<\/span>, or <span style=\"color: #09f; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">1 GB<\/span> of RAM.<\/p>\n\n\n\n<p>Of that total available memory on the VPS, <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">842752 kB<\/span> or <span style=\"color: #0aff00; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">823 MB<\/span> of that RAM is not in use, or free to use.<\/p>\n\n\n\n<p>There is <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">841728 kB<\/span> or <span style=\"color: #fff500; background-color: #3a3a3a; padding: 3px 5px 3px 5px;\">822 MB<\/span> of memory currently being used by the Linux page cache to speed things up.<\/p>\n\n\n\n<p>I know from the earlier testing I did, that 100 MB worth of that page cache usage is from my 100 MB log file that got placed in the page cache for quick access.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Understanding Linux memory usage and how to check for used and free memory or RAM in Linux can be difficult. But once you learn about the Linux page cache and how to read the status of it, it&#8217;s really quite simple. Linux very efficiently caches frequently used files from the hard drive, to very fast<a class=\"moretag\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\"> Read More ><\/a><\/p>\n","protected":false},"author":57020,"featured_media":129254,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4308],"tags":[],"class_list":["post-3090","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Check the Memory Usage on Linux<\/title>\n<meta name=\"description\" content=\"Learn how to check Linux memory usage to make sure you&#039;re looking at the correct Linux free memory values and find out about the Linux page cache.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Check the Memory Usage on Linux\" \/>\n<meta property=\"og:description\" content=\"Learn how to check Linux memory usage to make sure you&#039;re looking at the correct Linux free memory values and find out about the Linux page cache.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\" \/>\n<meta property=\"og:site_name\" content=\"InMotion Hosting Support Center\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/inmotionhosting\/\" \/>\n<meta property=\"article:published_time\" content=\"2014-02-07T06:25:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-06T04:10:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jesse Owens\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:site\" content=\"@InMotionHosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jesse Owens\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\"},\"author\":{\"name\":\"Jesse Owens\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/db97af6358b0c1726e01e49180e5f71c\"},\"headline\":\"How to Check the Memory Usage on Linux\",\"datePublished\":\"2014-02-07T06:25:50+00:00\",\"dateModified\":\"2025-02-06T04:10:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\"},\"wordCount\":874,\"commentCount\":3,\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png\",\"articleSection\":[\"Linux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\",\"name\":\"How to Check the Memory Usage on Linux\",\"isPartOf\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png\",\"datePublished\":\"2014-02-07T06:25:50+00:00\",\"dateModified\":\"2025-02-06T04:10:52+00:00\",\"description\":\"Learn how to check Linux memory usage to make sure you're looking at the correct Linux free memory values and find out about the Linux page cache.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png\",\"width\":1200,\"height\":630,\"caption\":\"featured image with text check memory usage diagnose memory issues in Linux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.inmotionhosting.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Check the Memory Usage on Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#website\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"name\":\"InMotion Hosting Support Center\",\"description\":\"Web Hosting Support &amp; Tutorials\",\"publisher\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#organization\",\"name\":\"InMotion Hosting\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"contentUrl\":\"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg\",\"width\":696,\"height\":696,\"caption\":\"InMotion Hosting\"},\"image\":{\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/inmotionhosting\/\",\"https:\/\/x.com\/InMotionHosting\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/db97af6358b0c1726e01e49180e5f71c\",\"name\":\"Jesse Owens\",\"url\":\"https:\/\/www.inmotionhosting.com\/support\/author\/jesseo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Check the Memory Usage on Linux","description":"Learn how to check Linux memory usage to make sure you're looking at the correct Linux free memory values and find out about the Linux page cache.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/","og_locale":"en_US","og_type":"article","og_title":"How to Check the Memory Usage on Linux","og_description":"Learn how to check Linux memory usage to make sure you're looking at the correct Linux free memory values and find out about the Linux page cache.","og_url":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/","og_site_name":"InMotion Hosting Support Center","article_publisher":"https:\/\/www.facebook.com\/inmotionhosting\/","article_published_time":"2014-02-07T06:25:50+00:00","article_modified_time":"2025-02-06T04:10:52+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png","type":"image\/png"}],"author":"Jesse Owens","twitter_card":"summary_large_image","twitter_creator":"@InMotionHosting","twitter_site":"@InMotionHosting","twitter_misc":{"Written by":"Jesse Owens","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#article","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/"},"author":{"name":"Jesse Owens","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/db97af6358b0c1726e01e49180e5f71c"},"headline":"How to Check the Memory Usage on Linux","datePublished":"2014-02-07T06:25:50+00:00","dateModified":"2025-02-06T04:10:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/"},"wordCount":874,"commentCount":3,"publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png","articleSection":["Linux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/","url":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/","name":"How to Check the Memory Usage on Linux","isPartOf":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage"},"thumbnailUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png","datePublished":"2014-02-07T06:25:50+00:00","dateModified":"2025-02-06T04:10:52+00:00","description":"Learn how to check Linux memory usage to make sure you're looking at the correct Linux free memory values and find out about the Linux page cache.","breadcrumb":{"@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#primaryimage","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png","width":1200,"height":630,"caption":"featured image with text check memory usage diagnose memory issues in Linux"},{"@type":"BreadcrumbList","@id":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/check-memory-usage\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.inmotionhosting.com\/support\/"},{"@type":"ListItem","position":2,"name":"How to Check the Memory Usage on Linux"}]},{"@type":"WebSite","@id":"https:\/\/www.inmotionhosting.com\/support\/#website","url":"https:\/\/www.inmotionhosting.com\/support\/","name":"InMotion Hosting Support Center","description":"Web Hosting Support &amp; Tutorials","publisher":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.inmotionhosting.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.inmotionhosting.com\/support\/#organization","name":"InMotion Hosting","url":"https:\/\/www.inmotionhosting.com\/support\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/","url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","contentUrl":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2023\/02\/inmotion-hosting-logo-yoast.jpg","width":696,"height":696,"caption":"InMotion Hosting"},"image":{"@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/inmotionhosting\/","https:\/\/x.com\/InMotionHosting"]},{"@type":"Person","@id":"https:\/\/www.inmotionhosting.com\/support\/#\/schema\/person\/db97af6358b0c1726e01e49180e5f71c","name":"Jesse Owens","url":"https:\/\/www.inmotionhosting.com\/support\/author\/jesseo\/"}]}},"jetpack_featured_media_url":"https:\/\/www.inmotionhosting.com\/support\/wp-content\/uploads\/2014\/02\/memory-usage-featured.png","jetpack_sharing_enabled":true,"primary_category":{"id":4308,"name":"Linux","slug":"linux","link":"https:\/\/www.inmotionhosting.com\/support\/server\/linux\/"},"_links":{"self":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3090","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/users\/57020"}],"replies":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/comments?post=3090"}],"version-history":[{"count":9,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3090\/revisions"}],"predecessor-version":[{"id":129255,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/posts\/3090\/revisions\/129255"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media\/129254"}],"wp:attachment":[{"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/media?parent=3090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/categories?post=3090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.inmotionhosting.com\/support\/wp-json\/wp\/v2\/tags?post=3090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}