Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
my question is when the total memory is 2 GB and as per atop and meminfo results it shows around 620mb of usage, what happend to rest of the memory
and free memory is only 380mb
where in
top shows like this
Mem: 2056040k total, 1613036k used, 443004k free, 58744k buffers
the last one is htop, it show only 620mb of used memory and rest are all free. but the problem here is i cannot utilise the live monitor from htop.
can any one suggest me how can i monitor the realtime memory usage in command line?
There is not an easy answer to your question. Unix/Linux systems manage memory very efficiently. They also attempt to use as much memory as you've paid for (memory unused is wasted money). When data is read from disk, it is stored in memory buffers. And it remains in buffers even when no longer currently in use, in the event it might be needed again soon. If not, it is purged and the memory returned to the free pool.
Each utility has its own method for showing how memory is being used; they are all generally gross-level measurements at best. Memory is used in a variety of ways, and there is no simple equation such as a+b+c = total ram.
What is it that you are trying to accomplish by monitoring real time memory usage?
Thanks for the reply mr.c
according to my audit req. i have to update average cpu/memory utilization info in a provided document everyday. but recent days the top command shows the mem utilization to 90% which no one will accept that much of utilization. so friend of mine recommended htop to have realtime figure, i tried it and its pretty good to see only 18% of mem is in use, rest are all free.
can you pls help me to have clear picture of how much total memory is being utilised, if possible is there a way we can store the htop results into some format of text file?
Sorry for the delayed reply mr.c. nice article you had recommended. will start monitoring as mentioned in the document then will get back to this topic..
They are important, but don't represent storage allocated (directly) by the applications you are running. When those applications need more memory, buffers and cache will be released to accommodate.
Have a read of this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.