How do you monitor Memory usage in Linux


 How do you monitor memory usage in linux machine, as my current memory probe will raise alarm if there are caches & buffers talking memory.

 But the memory will be freed up in case some app requests the memory so the actual usage is low but the memory checks I have raise alerts even if there is 11 Gb of use by buffers.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

madunix (Fadi SODAH)Chief Information Security Officer Commented:
To monitor in real time, use the following:

1)sar   ( Example  sar -r 2 10)
3)top  & ntop & atop & htop & ps

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Zephyr ICTCloud ArchitectCommented:
Another one you can use:

watch -n 10 free -h -w -l

Open in new window

It will refresh every 10 seconds and show you the used and available memory, something like this:
              total        used        free	 shared     buffers	  cache   available
Mem:           3.3G        1.4G        381M        529M         93M        1.4G        1.1G
Low:           3.3G        2.9G        381M
High:            0B          0B          0B
Swap:          3.4G        198M        3.2G

Open in new window

For detailed descriptions check out the man of free: "man free"
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.