This short (and sweet) article will give you an idea how to use those commands, and you can pick the one that fits your needs the most. These tools can be easily used from the command line. Luckily, Linux gives you a few handy tools that you would need to monitor memory usage. If your server runs out of memory, or runs short on memory, your website or service can stop or may run slow. Especially, if you use caching systems such as Redis or Memcached. If you run the free command without this option to obtain amounts in bytes, the numbers will add up exactly.Monitoring RAM resources of your VPS is very important. (The discrepancy between the 1829 MB that we calculated and the 1830 MB shown in the output is due to rounding because we used the -m option. So if you add the free memory (665 MB), buffers memory (149 MB), and cached memory (1015 MB) values, you obtain 1829 MB, which is the actual amount of memory available for applications. Although it is technically being “used” by Linux in the background, for all practical purposes this memory is free and available. This memory, listed in the buffers and cached columns, is available immediately for any application that may need it. This is because Linux uses free memory for disk caching to improve performance. In fact, the server is only using 172 MB of RAM, and has 1830 MB of free RAM. You may be tempted to look at the Mem row, scan the used and free columns, and determine that the server is using 1338 MB of RAM, and the amount of free RAM is only 665 MB. For example, consider the following sample output from a server: To display statistics in bytes, run the free command without the -m option. For easier readability, use the -m option to display memory usage statistics in megabytes.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |